Sonar and baro issues

In the CLI when I enter the altitude test mode I never seem to get a response from the sonar. I get values that look like this:B_alt: 3801088, S_alt: -805257695B_alt: 3801096, S_alt: -805257695B_alt: 3801122, S_alt: -805257695B_alt: 3801122, S_alt: -805257695B_alt: 3801114, S_alt: -805257695or sometimes like this:B_alt: 70, S_alt: -805257695B_alt: 96, S_alt: -805257695B_alt: 122, S_alt: -805257695B_alt: 140, S_alt: -805257695B_alt: 114, S_alt: -805257695Which raises another question: what kind of values am I supposed to be getting for the barometer?I've confirmed that the sonar is enabled, I've also checked it with a voltmeter to see that it's outputting a voltage relative to it's proximity to objects. I'm using a Maxbotix LV-EZ4 sonar.I'm also pretty certain that my barometer was working under Ardupirates, as I was able to use altitude hold fairly high up. Anyway, it seems to respond to changes in the quad's height (me waving it around), I'm just not sure why I get values in the millions sometimes, and values in the hundreds some other times.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Moderator
    This has been fixed as of r2242 with a change to a printf type variable. Either check the changes in the trunk and make the modification manually, or download the latest trunk code to get up to date. ;)
  • am also getting weird numbers, B_alt oscillates around 100+/-50, sometimes dropping to 0 and sometimes  up to 65000, without any movement of the apm, also no props installed, so that cant be the issue...
  • Also looking at code it seems to default to use the XL sonar rather than LV. I tried changing that to LV like in pirates code , but it generates a compile error.

    Al
This reply was deleted.

Activity