its definitely cutoff on v39 but not on v38 which is what I dont understand
v38 output (i know its out of sync with one column so I move as such to have same output as v39)
the start of v38 is like a saw tooth cause my LG is flimsy and wont take off nicely (for this particular frame only) and had to do a hand launch where the throttle has climbed.
Its the same story for all 3 frames which I think the new filtering on v39 is very aggressive that its dropping the readouts or something else...since all them have good alt hold. V38 good in holding height when its triggered but it tend to drop height slowly moving any direction and climbs when stopping but at least it dont climb. PID changes make it aggressive for my taste at least this way I can play around just watch out when getting too low.
Your plots look very similar to mine a while back. On 2.024 I had the behavior in your v38 plot and on 2.028 or so it looked like v39 on your plot. I'm not sure how you currently have your sonar mounted, but all my problems went away when I moved my sonar away from the core electronics and also moved the signal cable away from my ESC and wiring. I would get the same drop outs on altitude and depending on Jason's filtering would see no signal or a fairly good signal with drop outs. Moving my signal cable to loop over the top of the arches to the sonar (and using a shielded cable) essentially removed all of my drop outs.
I really got frustrated from how different each build worked on my setup and moving the sonar completely away from any ESC fixed me up. My current logs show the baro line and sonar line lining up very nicely in my new configuration.
Take a look at my old post here where I tried moving my sonar from near an ESC to the very center under the core electronics. Neither plot is very pretty but one is a lot worse than the other and did make a difference on the climbing issue.
You can see a plot of my baro and sonar after the fix in this thread - with a bunch of discussion about the issue:
Hope this helps.
You mean like this
The other 2 are pretty much isolated except the last.
Surprisingly the unshielded but with ferrite ring is the most stable on alt_hold and loiter maybe because of the dwaft 10A esc. Since v33 this has been the same setup. Except for the 2nd photo as that was recently built (v38)
Thanks Heino for all the suggestion. Tho I have than a lot of cli test on sonar and there is no clipping of the output. Also it doesnt explain why that frame (2nd one) is so stable in hovering at alt_hold during the v38 (the graph out was from this frame v38). As well as on other 2 frame specially the AC frame. So I think it only leaves the clipping is with the new filtering. It doesnt match my setup which explains why others have luck and I dont. Since v33all test have been good on this arrangement so I wont be changing to v39 for now I guess. I'll stick with v38 for now and just toy with PIDs
Looks very much like you have a noisy sonar
The difference between v38 and v39 is filtering of the sonar data
v38 averages the noise and signal together
v39 uses a mode filter to remove the noise
If you have more noise than signal then in v39 you will get bad data
the v38 graph shows some dropouts in sonar signal (and this is after averaging) but at times it looks good - this is what other people have been seeing with their noisy sonars.
The v39 graph shows some good data (but not much) this is when the ratio of good data to bad is greater than 1:1
Looks like you have done all the recommended things in mounting the sonar, shielding its signal cable and routing the cables as far from the ESCs as possible.
Have you looked at the power supply to your sonar? Maxbotics has a recommended resistor/capacitor filter for noisy power supplies on their FAQ pages. The ferrite could be helping with power supply noise rather than signal noise. have you tried using a separate BEC (ie not one of the ESC BECs)
Heino's comment about having any part of your airframe in the field of view is critical. In your second picture above I'd expect the sonar to read zero nearly all the time because the closest object is your landing gear.
Thanks Andrew, thats pretty much what Heino told me. As you can see on photos my sonar are shielded and far away from the ESC. Except the 3 photo which is the most stable out of the 3. Agree on V38 mode filter but this has been stable since V33 except the flying part but still ok to play around. Also I have Hercules BEC on all 3 frames so for me V38 is my best option. Scrapping the V39 I would trade a small semi ok alt_hold and agressive loiter of v39 with the great filtering of v38 and stable loiter of v38. Thanks tho for the suggestions