-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copter: No wind estimate when using EK3_SRC1_YAW = GPS #26650
Comments
Thanks for the report, I've added this to the Copter-4.5.0 issues list although I see you said the same issue appears with 4.4. In any case, I'll try to reproduce the issue in SITL. |
@rmackay9 Thank you! Could you please give me a hint where in the code this problem might arise? |
This issue can be reproduced in SITL meaning that it is likely caused by a bug in the EKF. The steps to reproduce are below: First confirm that wind estimates work with all default parameters
Next load the gps-for-yaw parameters and repeat the flight
This bug exists in Copter-4.4 as well. FYI @tridge, @priseborough |
I think the problem arises from canEstimateWind being false in void NavEKF3_core::setWindMagStateLearningMode(). void NavEKF3_core::resetQuatStateYawOnly(ftype yaw, ftype yawVariance, rotationOrder order) is called from void NavEKF3_core::setYawFromMag(). This function is usually called from void NavEKF3_core::SelectMagFusion() which correctly exits before execution of void NavEKF3_core::setYawFromMag() since no compass is being used. My temporary fix would be to set finalInflightYawInit in void NavEKF3_core::SelectMagFusion() when GPS-YAW is correctly initialized:
What is your opinion on this @tridge, @priseborough, @rmackay9? All the best |
Thanks very much for the analysis. I've slightly fixed the formatting of your comment and I think you meant "recordYawResetsCompleted" instead of "recordYawReset()". Yes, surely this is related to the "canEstimateWind" check here.
I wonder if maybe it is just a mixup between "finalInflightYawInit" and "yawAlignComplete" which can be seen about 10 lines lower? I don't really understand the difference between these two variables. I've asked @priseborough his opinion. Perhaps @tridge will have an opinion too |
It should be calling recordYawResetsCompleted() when the EKF yaw is reset to the GPS yaw I'll submit a PR. |
Ref #27636 |
Fixed in master and we can include it in an upcoming beta, thanks @priseborough |
Bug report
Issue details
I am using a HERE 4 Dual GPS Configuration for Yaw and it works really well. However, when selecting EK3_SRC1_YAW = (GPS or GPS with Compass Fallback), there are no wind estimates shown in the wind_vel and wind_dir messages. Also, there is no wind estimate shown in the Log under VWN and VWE. The EK3_DRAG_BCOEF_* and EK3_DRAG_MCOEF parameters have been configures correctly. When selecting EK3_SRC1_YAW = Compass, the wind estimates are shown and available.
Version
ArduCopter 4.4.4
Platform
[ ] All
[ ] AntennaTracker
[ X ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine
Airframe type
QUAD X
Hardware type
Cube Orange
Logs
The text was updated successfully, but these errors were encountered: