Closed marcmerlin closed 3 years ago
You can watch around https://youtu.be/wxkHGI85wMU?t=1m29s It shows at 1:33 61kph alledged wind behind me, and yet my ground speed is only 5kph over my airspeed. Clearly things don't add up, and by quite a lot.
At https://youtu.be/wxkHGI85wMU?t=47s the wind was 33kph
hi Marc, The EKF was indeed showing high wind: The best clue as to why is the GPS heading versus the compass heading: that shows about a 47 degree crab angle, which would be consistent with high wind. So either the compass was off by a lot, or you really did have a lot more wind up there than you thought. Looking at your airspeed versus ground speed at different ground courses gives some clues: that seems to show about a 6m/s which, which is 21km/hr. So I think that you either have bad compass calibration or you have bad airspeed sensing. I think compass error is most likely, particularly given the two compasses don't agree with each other at all.
@tridge thanks for having had a look. 21kph peak sounds totally reasonable (it was much less on the ground, but sure it's common that it's higher as you gain altitude), but the screenshot I pasted showed 60kph, which was definitely wrong. So you're saying the 2 compasses didn't agree, even though I had just redone a calibration recently (as required by the upgrade to 3.8). The compass value I got in the OSD may have been off by a bit but generally looked sane. Would you say that compass error would really account for showing 60kph+ wind when it fact the wind was only around 20kph? Am I seeing a different value for the compass in the OSD (which again was mostly correct looking) than the one used by AP internally to compute the wind vector?
More to the point, I noted that around 1:32 in the video, things clearly look wrong. 1) AS 49kph 2) GS 54kph 3) tail wind 61kph Clearly those things don't even come close to adding up.
@magicrub do you have someone who would have time to look at this? Wind vector calculation really looks wrong. I hope my last 2 updates make it pretty clear? Thanks.
@priseborough could possibly confirm compass problems?
It looks like a combination of bad compass calibration/interference and variation in wind speed with height. The EKF learned the compass errors, but the wind estimates then took several minutes to recover because the airspeed sensor was being rejected by the EKF for most of the flight.
The magnetometer had large in-flight biases that had to be learned by the EKF. Both IMU1 and 2 EKF's were consistent.
There is a significant airspeed sensor inconsistency that appears at launch and doesn't improve until late in flight. See the airspeed innovations:
Wind estimates also come good at the same time:
Thanks @priseborough I agree that the current airspeed sensors are junk and require constant calibration. Good news @proficnc has a CAN airspeed sensor in the pipeline that should improve things. You would be a good candidate to beta test it if you're willing. Plus, the developer for that sensor is right down the street form you ( @jschall )
@marcmerlin you always have the most interesting logs :) Is this ready to be closed?
@priseborough thanks for the analysis. The magic happening behind the scenes is definitely not obvious. It looks like in a case like this everything works in the end, but it took a bit over a minute to stabilize. @magicrub I'm happy to beta test a new wind sensor from @jschall , send me details But back to the case at hand, maybe as an RFE, would it make sense for ardupilot not to output/display a wind vector when it doesn't have a high enough confidence level/while it's learning, or output a wind speed of '1' until EKF is working? Giving bad data is much worse than outputting no data.
Giving bad data is much worse than outputting no data.
We don't handle the case of having bad data, it is assumed that if it's plugged in then it's working. There is working being done by @WickedShell to detect clogged pitot tubes and this logic could venture into the same realm so its something we'll keep in mind.
The airspeed is pretty much the only sensor that isn't overly fault tolerant. When it gives bad data, bad things happen.
@magicrub I was referring to this comment from @priseborough "the airspeed sensor was being rejected by the EKF for most of the flight" If EKF is rejecting the wind sensor, I actually would rather that it shows me a windspeed of -1 or something obvious to say that there is no reliable windspeed data. I'm assuming that AP reverted to the magic guessing it does to guess wind speed without an airspeed sensor.
But even in that case (the no airspeed sensor case), why would it ever output clearly nonsensical data? See my previous comment: "More to the point, I noted that around 1:32 in the video, things clearly look wrong. AS 49kph GS 54kph tail wind 61kph"
No matter what sensors are missing, it's obvious that one of those numbers is wrong, no? If AP can't fix its no airspeed sensor computed wind speed guess to compute numbers that at least add up, it could return a windspeed of -1 until the numbers mostly add up.
As for "The magnetometer had large in-flight biases that had to be learned by the EKF" Those are theoretically saved and don't have to be relearned for the next flight, correct?
The current code does not save mag biases learned by the EKF in flight.
Thanks @priseborough , so it sounds like there are a few things that can be improved: 1) save mag biases, is there even a good reason not, to? 2) have an option not to show the wind vector until the airspeed sensor is being accepted by EKF 3) have a sanity check to disable airspeed data while it is nonsensical, like the example I gave: AS 49kph GS 54kph tail wind 61kph
@magicrub , sorry the last comment/questions were meant for you :)
@magicrub @WickedShell is there something that you'd agree is actionable here, or do you want me to close this? Clearly things can be improved, but it's maybe neither obvious, nor needed by enough people, to matter.
It sounds like this was caused by a hardware/param setup issue, we now have much better support for detecting failing airspeed. ARSPD_WIND_MAX
and ARSPD_WIND_WARN
along with EKF sensor land affinity.
On this airframe, I've often seen totally wrong wind vectors on my OSD like this screenshot. The wind was reasonably light, absolutely not 60kph, not even 20kph. Maybe 10 at most.
lzma -9 of the .bin (not zipped, remove .zip) 00000010_half.BIN.lzma.zip