From c6e8c40b2c2f4d5176baff1909ea358b04042f0f Mon Sep 17 00:00:00 2001 From: Marius Eggert Date: Mon, 12 Dec 2022 14:50:27 +0100 Subject: [PATCH] added schmidt normalization + cleanup --- mission/controller/acs/SensorProcessing.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mission/controller/acs/SensorProcessing.cpp b/mission/controller/acs/SensorProcessing.cpp index c02398ce..6055b50d 100644 --- a/mission/controller/acs/SensorProcessing.cpp +++ b/mission/controller/acs/SensorProcessing.cpp @@ -139,6 +139,7 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const Igrf13Model igrf13; // So the line above should not be done here. Update: Can be done here as long updated coffs // stored in acsParameters ? + igrf13.schmidtNormalization(); igrf13.updateCoeffGH(timeOfMgmMeasurement); // maybe put a condition here, to only update after a full day, this // class function has around 700 steps to perform @@ -550,19 +551,18 @@ void SensorProcessing::processGyr( } } -void SensorProcessing::processGps(const double gps0latitude, const double gps0longitude, +void SensorProcessing::processGps(const double gpsLatitude, const double gpsLongitude, const bool validGps, acsctrl::GpsDataProcessed *gpsDataProcessed) { // name to convert not process double gdLongitude, gcLatitude; if (validGps) { // Transforming from Degree to Radians and calculation geocentric lattitude from geodetic - gdLongitude = gps0longitude * PI / 180; - double latitudeRad = gps0latitude * PI / 180; + gdLongitude = gpsLongitude * PI / 180; + double latitudeRad = gpsLatitude * PI / 180; double eccentricityWgs84 = 0.0818195; double factor = 1 - pow(eccentricityWgs84, 2); gcLatitude = atan(factor * tan(latitudeRad)); - // validGcLatitude = true; } { PoolReadGuard pg(gpsDataProcessed);