if we land at a remote location with a different height we should not
update baro and home. This also prevents us updating baro and home if
we disarm in flight
When building for px4-v2 we have an warning because we are checking for
the value of this undefined macro. Just change both checks to use
"defined()".
../../libraries/AP_HAL_PX4/Util.cpp:115:7: warning: "CONFIG_ARCH_BOARD_PX4FMU_V4" is not defined [-Wundef]
#elif CONFIG_ARCH_BOARD_PX4FMU_V4
^
when this is set the board RGB LED will be controlled by MAVLink
instead of internally. This is useful for cases where the LED patterns
and colours needed are specified by an external authority (such as the
OBC organisers)
When switching over to a back up magnetometer, ensure that the earth field estimate are reset. other wise mag earth field estimates due to the previous failed mag could cause data from the new mag to be rejected.
This bug created a race condition whereby if the EKF had to reset the yaw to the GPS ground course to recover from a bad magnetometer, the new heading could be over-written by the bad magnetic heading when the plane reached the height for the scheduled reset.
If the GPS receiver was disconnected and no data received, then then the gpsGoodToAlign check did not get a chance to run and becasue it was previously true the EKF would switch back into aiding.
This prevents this by ensuring that gpsGoodToAlign defaults to false when the check is not being performed.
An additional check has also been dded to ensure that there is GPS data to fuse before we declare ready to use GPS.
Switching in and out of aiding modes was being performed in more than one place and was using two variables.
The reversion out of GPS mode due to prolonged loss of GPS was not working.
This consolidates the logic and ensures that PV_AidingMode is only changed by the setAidingMode function.
The filter status logic calculations were being repeated every time the get function was called.
The logic is now updated once per filter update step and a separate get function added
Split publishing of local position into horiz and vert components with separate validity checks
Split status reporting into separate update and get functions and only update once after each loop update. This removes unnecessary re-calculation of the status logic and ensures all consumers get the same data (avoid possible race conditions).
If we start GPS aiding before the gyro bias variances have reduced, glitches on the GPS can cause attitude disturbances that degrade flight accuracy during early flight.
The minimum version for gcc was supposed to be 4.9 for any platform.
However our build instructions are outdated. Remove the problematic
parts that use the sparse-endian.h header while we don't fix the setup
for windows.
When building for px4-v2 we have an warning because we are checking for
the value of this undefined macro. Just change both checks to use
"defined()".
../../libraries/AP_BoardConfig/AP_BoardConfig.cpp:36:7: warning: "CONFIG_ARCH_BOARD_PX4FMU_V4" is not defined [-Wundef]
#elif CONFIG_ARCH_BOARD_PX4FMU_V4
^