Fix for MAG Field Vector calculation #786

Merged
meggert merged 2 commits from mgm4-disabled-fix into main 2023-08-21 14:51:30 +02:00
Showing only changes of commit b9167c7e22 - Show all commits

View File

@ -25,7 +25,8 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
gpsDataProcessed->altitude.value, timeOfMgmMeasurement, magIgrfModel);
gpsValid = true;
}
if (!mgm0valid && !mgm1valid && !mgm2valid && !mgm3valid && !mgm4valid) {
if (not mgm0valid and not mgm1valid and not mgm2valid and not mgm3valid and
(not mgm4valid or not mgmParameters->useMgm4)) {
{
PoolReadGuard pg(mgmDataProcessed);
if (pg.getReadResult() == returnvalue::OK) {