Sorry to insist, but SONAR in 2.0.37 was perfect.
Please have a look to this video. This is using 2.0.37, defaults PIDs and the behaviour, I consider almost perfect.
Same hardware with 2.0.38 is really much worst and oscillating. Maybe it could be re-consider to come back to the 2.0.37 philosophy.
Noise problems are ALL solved isolating and shielding cables to SONAR and separating from ESC (as recomended in the WIKI)
Testing alt-hold on the 2.0.40 very good. The best ever
I´m updated to 2.0.39 and now SONAR is much better that in 2.0.38 and similar to the very best 2.0.37. I dont know the changes done but now is close to a perfect one. Still osme PID adjustements in my copter but defaults are already very good.
I use the board2560 and the Max sonar MB 1200 (with the old board STMega 1280 ad Max Sonar MB1240 it doesn´t work).
I'll be several days out. I'll do when come back
For a multi-copter (Hex) what model of Sonar module is recommended? My intention is to have the aircraft RTL and then decend to landing using the Sonar probe. First, is this duable using the APM and .37 software or am I getting ahead of myself?
Could someone try a simple experiment for me?
Replace the read function in RangeFinder.cpp (in libraries) with this one:
this will read the slightly filter values from the ADC and skip the mode filter.
Would median filtering make any difference?
this seems to be a very good graphical helpin PID tuning. Thx
BTW my AH is rock steady. Just experiment with your PID using this as a helper.
Its in my flightbox as an cheatsheet :)
Observe your copter and try to find the behavour in this diagram.
Kc = your P
Ti = 1/your I ( so more I is to the left)