Reading the Sonar works for your altitude for <10 feet right? After that the baro takes over.
In the APM I see that when I lift the quad over my head I still read like 1m or 0m. Any thoughts on that?
In CLI mode it reads like 20cm to 80cm... However its noticeably off. Do I need to calibrate this thing? This is the LAST thing I need working before we get into missions. I am so stoked!
Riley
Replies
There is no doubt that the sonar's absolute accuracy varies quite a bit - but on my quad I'm not too worried about it since it's only used for transmitter switch triggered alt hold. In this model you only care that the sonar's value is repeatable to the value set when the alt hold mode switch is set. In this role it doesn't matter that it isn't exactly 1 meter - but that it hovers at the same height over time that happens to read 1 meter. If you are using the sonar for "exact" navigation at low altitude then compensation would be needed. However, it does burn cpu cycles on the AVR that I personally would rather have keeping the update rate high until we transition to ARM processors. So my suggestion is that any compensation be a compile time switch if it is implemented.
You know, I have been meaning to look at this again, but I keep getting distracted. There is a discussion you might be intererested in here
Read the whole thread and you will have the means, if not the answer, to solve this.
I'm not sure why the sonar readings are not always accurate; I half-suspect that different models work differently in their output. I have been meaning to setup some tests with different models, and create a better algorithm, or even a calibration routine, but I haven't gotten to it.