Final Version of the ACS Controller #367

Merged
muellerr merged 78 commits from eggert/acs into develop 2023-02-08 13:50:11 +01:00
Showing only changes of commit c6e8c40b2c - Show all commits

View File

@ -139,6 +139,7 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
Igrf13Model igrf13; Igrf13Model igrf13;
// So the line above should not be done here. Update: Can be done here as long updated coffs // So the line above should not be done here. Update: Can be done here as long updated coffs
// stored in acsParameters ? // stored in acsParameters ?
igrf13.schmidtNormalization();
igrf13.updateCoeffGH(timeOfMgmMeasurement); igrf13.updateCoeffGH(timeOfMgmMeasurement);
// maybe put a condition here, to only update after a full day, this // maybe put a condition here, to only update after a full day, this
// class function has around 700 steps to perform // 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, const bool validGps,
acsctrl::GpsDataProcessed *gpsDataProcessed) { acsctrl::GpsDataProcessed *gpsDataProcessed) {
// name to convert not process // name to convert not process
double gdLongitude, gcLatitude; double gdLongitude, gcLatitude;
if (validGps) { if (validGps) {
// Transforming from Degree to Radians and calculation geocentric lattitude from geodetic // Transforming from Degree to Radians and calculation geocentric lattitude from geodetic
gdLongitude = gps0longitude * PI / 180; gdLongitude = gpsLongitude * PI / 180;
double latitudeRad = gps0latitude * PI / 180; double latitudeRad = gpsLatitude * PI / 180;
double eccentricityWgs84 = 0.0818195; double eccentricityWgs84 = 0.0818195;
double factor = 1 - pow(eccentricityWgs84, 2); double factor = 1 - pow(eccentricityWgs84, 2);
gcLatitude = atan(factor * tan(latitudeRad)); gcLatitude = atan(factor * tan(latitudeRad));
// validGcLatitude = true;
} }
{ {
PoolReadGuard pg(gpsDataProcessed); PoolReadGuard pg(gpsDataProcessed);