Page 1 of 1

Alt hold with sonar

Posted: Wed Nov 19, 2014 7:36 am
by ezio
Why we still don't have altitude hold with sonar?
We have sonar supported for years now, alt hold using sonar has been successfully implemented in MW 1.9 ( as I remember correctly). The code for 2.2 and 2.3 exist and it works very well (youtube).

What is the point to support 5 different sonar sensors and don't use it for anything? Where is the logic here?


Maybe someone can give me a reasonable answer.

Re: Alt hold with sonar

Posted: Wed Nov 19, 2014 4:53 pm
by waltr
Maybe because it really doesn't work well. Or not enough people have actually tried using it.
Someone in the past thought it a good idea and put code in MW for SONAR so it is available for anyone wishing to try using it and writing more code..

Re: Alt hold with sonar

Posted: Wed Nov 19, 2014 9:59 pm
by handsomejackuk
i want this and would love to get hold of the code and some idea on how to set it up.....

Re: Alt hold with sonar

Posted: Wed Nov 19, 2014 10:59 pm
by copterrichie
I have seen some pretty good demonstrations but all were under nine fleet. my personally testing with sonic measurement accuracy was best under six feet. In my opinion, ultrasonic would be a great addition for auto-landing but beyond that, it is useless for anything other than hovering between 6 to 9 feet max..

Re: Alt hold with sonar

Posted: Thu Nov 20, 2014 12:16 am
by ezio
copterrichie wrote:I have seen some pretty good demonstrations but all were under nine fleet. my personally testing with sonic measurement accuracy was best under six feet. In my opinion, ultrasonic would be a great addition for auto-landing but beyond that, it is useless for anything other than hovering between 6 to 9 feet max..


It will work only at low altitude but it far more precise then baro (which doesn't work very well in current implementation). At high altitude +-1m doesn't matter but at lower altitude ... it is a different story.

one implementation is here: viewtopic.php?f=7&t=1282&start=50#p43426
So maybe someone can port it to the main _shared.

Re: Alt hold with sonar

Posted: Sun Nov 23, 2014 10:25 pm
by Lecostarius
I tried Sonar myself. It took me a long time to make it work. I could not get the cheap boards to work at all (they only worked reliably as long as the copter was not running and producing noise and turbulences and vibration), and even for the expensive MaxBotix Sonar, I had to use the one with the narrowest beam (dont remember the type name, I can look it up if you are interested). Finally, with a lot of foam and mounted with some 10 cm distance to the copter frame, it worked nice and stable. It worked even for higher altitude than 2 meters (6 feet - what copterrichie wrote), but only on hard surface (tarmac). On grass, it worked for 2 meters, higher than that it worked so-so and would occasionally not get the reflection at all, probably because the grass was absorbing too much of the ultrasound.
I would agree that auto-landing would be a great application; or terrain following if the terrain does not contain trees :-)

Re: Alt hold with sonar

Posted: Mon Nov 24, 2014 1:56 am
by copterrichie
Yes, I did fail to mention, there was a substantial difference in accuracy when I was testing on my concrete patio and on the grass. :)