diff --git a/mission/controller/acs/SensorProcessing.cpp b/mission/controller/acs/SensorProcessing.cpp index 56217a8f..975b38b1 100644 --- a/mission/controller/acs/SensorProcessing.cpp +++ b/mission/controller/acs/SensorProcessing.cpp @@ -1,5 +1,7 @@ #include "SensorProcessing.h" +#include + SensorProcessing::SensorProcessing() {} SensorProcessing::~SensorProcessing() {} @@ -16,12 +18,8 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const double magIgrfModel[3] = {0.0, 0.0, 0.0}; bool gpsValid = false; if (gpsDataProcessed->source.value != acs::GpsSource::NONE) { - Igrf13Model igrf13; igrf13.schmidtNormalization(); igrf13.updateCoeffGH(timeAbsolute); - // ToDo - // maybe put a condition here, to only update after a full day, this - // class function has around 700 steps to perform igrf13.magFieldComp(gpsDataProcessed->gdLongitude.value, gpsDataProcessed->gcLatitude.value, gpsDataProcessed->altitude.value, timeAbsolute, magIgrfModel); gpsValid = true; diff --git a/mission/controller/acs/SensorProcessing.h b/mission/controller/acs/SensorProcessing.h index fea0fd01..7caa29f8 100644 --- a/mission/controller/acs/SensorProcessing.h +++ b/mission/controller/acs/SensorProcessing.h @@ -35,6 +35,8 @@ class SensorProcessing { static constexpr double ZERO_VEC_D[3] = {0, 0, 0}; static constexpr double ECCENTRICITY_WGS84 = 0.0818195; + Igrf13Model igrf13; + protected: void processMgm(const float *mgm0Value, bool mgm0valid, const float *mgm1Value, bool mgm1valid, const float *mgm2Value, bool mgm2valid, const float *mgm3Value, bool mgm3valid,