From b9167c7e22b94a23b4d0993a73a7a96b17aa87c3 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 21 Aug 2023 14:33:55 +0200 Subject: [PATCH 1/2] valid check now includes allowed use of mgm4 --- mission/controller/acs/SensorProcessing.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mission/controller/acs/SensorProcessing.cpp b/mission/controller/acs/SensorProcessing.cpp index 686a2fcf..4405790c 100644 --- a/mission/controller/acs/SensorProcessing.cpp +++ b/mission/controller/acs/SensorProcessing.cpp @@ -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) { -- 2.43.0 From 26bf178b2a62f678b726be8a67e5d502327f5366 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 21 Aug 2023 14:41:16 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5220985e..db8ff779 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ will consitute of a breaking change warranting a new major release: - `PDEC_CONFIG_CORRUPTED` event now actually contains the readback instead of the expected config +- Magnetic field vector was not calculated if only MGM4 was available, but still written to + the dataset. This would result in a NaN vector. Allowance for usage of MGM4 is now checked + before entering calculation. # [v6.4.0] 2023-08-16 -- 2.43.0