Browse Source

AP_NavEKF3: add configuredToUseGPSForPosXY

c415-sdk
Randy Mackay 4 years ago committed by Andrew Tridgell
parent
commit
adfc92523b
  1. 7
      libraries/AP_NavEKF3/AP_NavEKF3.cpp
  2. 5
      libraries/AP_NavEKF3/AP_NavEKF3.h

7
libraries/AP_NavEKF3/AP_NavEKF3.cpp

@ -1418,6 +1418,13 @@ bool NavEKF3::using_external_yaw(void) const @@ -1418,6 +1418,13 @@ bool NavEKF3::using_external_yaw(void) const
return core[primary].using_external_yaw();
}
// check if configured to use GPS for horizontal position estimation
bool NavEKF3::configuredToUseGPSForPosXY(void) const
{
// 0 = use 3D velocity, 1 = use 2D velocity, 2 = use no velocity, 3 = do not use GPS
return (sources.getPosXYSource() == AP_NavEKF_Source::SourceXY::GPS);
}
// write the raw optical flow measurements
// rawFlowQuality is a measured of quality between 0 and 255, with 255 being the best quality
// rawFlowRates are the optical flow rates in rad/sec about the X and Y sensor axes.

5
libraries/AP_NavEKF3/AP_NavEKF3.h

@ -387,7 +387,10 @@ public: @@ -387,7 +387,10 @@ public:
// are we using an external yaw source? This is needed by AHRS attitudes_consistent check
bool using_external_yaw(void) const;
// check if configured to use GPS for horizontal position estimation
bool configuredToUseGPSForPosXY(void) const;
// Writes the default equivalent airspeed in m/s to be used in forward flight if a measured airspeed is required and not available.
void writeDefaultAirSpeed(float airspeed);

Loading…
Cancel
Save