|
|
|
@ -173,6 +173,22 @@ void NavEKF2_core::getVelNED(Vector3f &vel) const
@@ -173,6 +173,22 @@ void NavEKF2_core::getVelNED(Vector3f &vel) const
|
|
|
|
|
vel = outputDataNew.velocity + velOffsetNED; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// return estimate of true airspeed vector in body frame in m/s
|
|
|
|
|
// returns false if estimate is unavailable
|
|
|
|
|
bool NavEKF2_core::getAirSpdVec(Vector3f &vel) const |
|
|
|
|
{ |
|
|
|
|
if (inhibitWindStates || PV_AidingMode == AID_NONE) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
vel = outputDataNew.velocity + velOffsetNED; |
|
|
|
|
vel.x -= stateStruct.wind_vel.x; |
|
|
|
|
vel.y -= stateStruct.wind_vel.y; |
|
|
|
|
Matrix3f Tnb; // rotation from nav to body frame
|
|
|
|
|
outputDataNew.quat.inverse().rotation_matrix(Tnb); |
|
|
|
|
vel = Tnb * vel; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Return the rate of change of vertical position in the down direction (dPosD/dt) of the body frame origin in m/s
|
|
|
|
|
float NavEKF2_core::getPosDownDerivative(void) const |
|
|
|
|
{ |
|
|
|
|