Cleaner Calculation of MGM and SUS Rate #775

Merged
muellerr merged 7 commits from mgm-sus-rate-calc into main 2023-08-14 15:28:33 +02:00
6 changed files with 51 additions and 145 deletions
Showing only changes of commit 819f5c299d - Show all commits

View File

@@ -20,6 +20,9 @@ will consitute of a breaking change warranting a new major release:
- The handling function of the GPS data is only called once per GPS read. This should remove - The handling function of the GPS data is only called once per GPS read. This should remove
the fake fix-has-changed events. the fake fix-has-changed events.
## Changed
- GPS Fix has changed event is no longer triggered for the EM
## Changed ## Changed
- MGM and SUS rates now will only be calculated, if 2 valid consecutive datapoints are available. - MGM and SUS rates now will only be calculated, if 2 valid consecutive datapoints are available.
The stored value of the last timestep will now be reset, if no actual value is available. The stored value of the last timestep will now be reset, if no actual value is available.

View File

@@ -238,7 +238,9 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
} }
} }
if (gpsSet.fixMode.value != newFix) { if (gpsSet.fixMode.value != newFix) {
#if OBSW_Q7S_EM != 1
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, newFix); triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, newFix);
#endif
} }
gpsSet.fixMode = newFix; gpsSet.fixMode = newFix;
gpsSet.fixMode.setValid(modeIsSet); gpsSet.fixMode.setValid(modeIsSet);