All,
I am planning on trying out different sonar solutions on my quad and was wondering how the transition between using the sonar and using the barometer for altitude hold is programmed? I am running ArduPiratesNG (rev. 527).
I have looked through the code and it appears it transitions at a fixed altitude, but I can't find where that altitude is set. I would really like the ability to change it, if possible.
Also, will ACM use sonar and baro together? Thanks for your help!
-Robert
Replies
At the moment the Sonar is used until circa 5.6 meters. After thtat Baro gets in.
To find the relative code follow this:
In system.pde you have:
max_distance is defined in the Rangefinder library (eg if you have MXBitx XL: AP_RangeFinder_MaxsonarXL.cpp) and for the XL EZ4 is 700 (in cm.).
If( AP_RangeFinder_down.distance > sonar_threshold ) {
sonar_status = SONAR_STATUS_BAD;
...
}
if (AP_mode == AP_ALTITUDE_HOLD || AP_mode == AP_ALT_GPS_HOLD)
...
Hope this helps.
Emile
transition between these two sensors is actually not implemented yet ;)
I don't know if this is included in ACM
your forum post is actually on page one in arducopter category (you should wait at least one day to get answers, not everybody is located in the US ;) )
Anyone have any ideas about this? Thanks!
**I am shamelessly bumping my own thread, since I can't see it on the regular forums anymore...I think it got pushed back to the second page, but isn't displaying.