Skip to content
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

Allow setting of EKF3 wind state from MAV_CMD_EXTERNAL_WIND_ESTIMATE #28279

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

This is mostly @priseborough 's work, I've just tidied things up a bit.

  • I've ensured the wind estimates replay correctly
  • I've ensured the WIND mavlink message contains the wind estimate while EKF3 is in charge
  • I've checked the XKF2[0].VW* messages to contain the supplied data
  • the supplied wind estimates don't last long during a bog-standard Plane takeoff in SITL, the Plane replaces them quickly

zeroCols(P,22,23);

// set the wind state variances
if (is_positive(speed_accuracy)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does is_positive() do for a NaN?


// reset the NE wind velocity states to the measurement
Vector2F wind_vel_prev = stateStruct.wind_vel;
stateStruct.wind_vel.x = -speed * cosF(radians(direction));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to check sign convention for ekf3 wind state vs external wind state

@peterbarker
Copy link
Contributor Author

  • Try passing a nan in in the autotest suite for the accuracies and see what happens
  • Check the sign is correct; set a wind estimate and a simulated speed to match, take-off and make sure estimates remain consistent

@peterbarker
Copy link
Contributor Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants