mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_GPS: use 3D velocity for uBlox
this makes uBlox use the 3D velocity for ground course and speed, ensuring we use a consistent value everywhere (so same vector in EKF as in navigation)
This commit is contained in:
parent
7abaa75653
commit
428923b4b1
@ -928,6 +928,8 @@ AP_GPS_UBLOX::_parse_gps(void)
|
||||
state.velocity.x = _buffer.velned.ned_north * 0.01f;
|
||||
state.velocity.y = _buffer.velned.ned_east * 0.01f;
|
||||
state.velocity.z = _buffer.velned.ned_down * 0.01f;
|
||||
state.ground_course = wrap_360(degrees(atan2f(state.velocity.y, state.velocity.x)));
|
||||
state.ground_speed = pythagorous2(state.velocity.y, state.velocity.x);
|
||||
state.have_speed_accuracy = true;
|
||||
state.speed_accuracy = _buffer.velned.speed_accuracy*0.01f;
|
||||
#if UBLOX_FAKE_3DLOCK
|
||||
|
Loading…
Reference in New Issue
Block a user