do not use raw gps data anywhere
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
parent
1069572392
commit
a9fe166b32
@ -24,19 +24,20 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
|
|||||||
bool mgm4valid, timeval timeOfMgmMeasurement,
|
bool mgm4valid, timeval timeOfMgmMeasurement,
|
||||||
const AcsParameters::MgmHandlingParameters *mgmParameters,
|
const AcsParameters::MgmHandlingParameters *mgmParameters,
|
||||||
acsctrl::GpsDataProcessed *gpsDataProcessed,
|
acsctrl::GpsDataProcessed *gpsDataProcessed,
|
||||||
const double gpsAltitude, bool gpsValid,
|
|
||||||
acsctrl::MgmDataProcessed *mgmDataProcessed) {
|
acsctrl::MgmDataProcessed *mgmDataProcessed) {
|
||||||
// ---------------- IGRF- 13 Implementation here
|
// ---------------- IGRF- 13 Implementation here
|
||||||
// ------------------------------------------------
|
// ------------------------------------------------
|
||||||
double magIgrfModel[3] = {0.0, 0.0, 0.0};
|
double magIgrfModel[3] = {0.0, 0.0, 0.0};
|
||||||
if (gpsValid) {
|
bool gpsValid = false;
|
||||||
|
if (gpsDataProcessed->source.value != acs::GpsSource::NONE) {
|
||||||
Igrf13Model igrf13;
|
Igrf13Model igrf13;
|
||||||
igrf13.schmidtNormalization();
|
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
|
||||||
igrf13.magFieldComp(gpsDataProcessed->gdLongitude.value, gpsDataProcessed->gcLatitude.value,
|
igrf13.magFieldComp(gpsDataProcessed->gdLongitude.value, gpsDataProcessed->gcLatitude.value,
|
||||||
gpsAltitude, timeOfMgmMeasurement, magIgrfModel);
|
gpsDataProcessed->altitude.value, timeOfMgmMeasurement, magIgrfModel);
|
||||||
|
gpsValid = true;
|
||||||
}
|
}
|
||||||
if (!mgm0valid && !mgm1valid && !mgm2valid && !mgm3valid && !mgm4valid) {
|
if (!mgm0valid && !mgm1valid && !mgm2valid && !mgm3valid && !mgm4valid) {
|
||||||
{
|
{
|
||||||
@ -627,11 +628,7 @@ void SensorProcessing::process(timeval now, ACS::SensorValues *sensorValues,
|
|||||||
sensorValues->mgm3Rm3100Set.fieldStrengths.value,
|
sensorValues->mgm3Rm3100Set.fieldStrengths.value,
|
||||||
sensorValues->mgm3Rm3100Set.fieldStrengths.isValid(),
|
sensorValues->mgm3Rm3100Set.fieldStrengths.isValid(),
|
||||||
sensorValues->imtqMgmSet.mtmRawNt.value, sensorValues->imtqMgmSet.mtmRawNt.isValid(),
|
sensorValues->imtqMgmSet.mtmRawNt.value, sensorValues->imtqMgmSet.mtmRawNt.isValid(),
|
||||||
now, &acsParameters->mgmHandlingParameters, gpsDataProcessed,
|
now, &acsParameters->mgmHandlingParameters, gpsDataProcessed, mgmDataProcessed);
|
||||||
sensorValues->gpsSet.altitude.value,
|
|
||||||
(sensorValues->gpsSet.latitude.isValid() && sensorValues->gpsSet.longitude.isValid() &&
|
|
||||||
sensorValues->gpsSet.altitude.isValid()),
|
|
||||||
mgmDataProcessed);
|
|
||||||
|
|
||||||
processSus(sensorValues->susSets[0].channels.value, sensorValues->susSets[0].channels.isValid(),
|
processSus(sensorValues->susSets[0].channels.value, sensorValues->susSets[0].channels.isValid(),
|
||||||
sensorValues->susSets[1].channels.value, sensorValues->susSets[1].channels.isValid(),
|
sensorValues->susSets[1].channels.value, sensorValues->susSets[1].channels.isValid(),
|
||||||
|
@ -31,8 +31,8 @@ class SensorProcessing {
|
|||||||
const float *mgm2Value, bool mgm2valid, const float *mgm3Value, bool mgm3valid,
|
const float *mgm2Value, bool mgm2valid, const float *mgm3Value, bool mgm3valid,
|
||||||
const float *mgm4Value, bool mgm4valid, timeval timeOfMgmMeasurement,
|
const float *mgm4Value, bool mgm4valid, timeval timeOfMgmMeasurement,
|
||||||
const AcsParameters::MgmHandlingParameters *mgmParameters,
|
const AcsParameters::MgmHandlingParameters *mgmParameters,
|
||||||
acsctrl::GpsDataProcessed *gpsDataProcessed, const double gpsAltitude,
|
acsctrl::GpsDataProcessed *gpsDataProcessed,
|
||||||
bool gpsValid, acsctrl::MgmDataProcessed *mgmDataProcessed);
|
acsctrl::MgmDataProcessed *mgmDataProcessed);
|
||||||
|
|
||||||
void processSus(const uint16_t *sus0Value, bool sus0valid, const uint16_t *sus1Value,
|
void processSus(const uint16_t *sus0Value, bool sus0valid, const uint16_t *sus1Value,
|
||||||
bool sus1valid, const uint16_t *sus2Value, bool sus2valid,
|
bool sus1valid, const uint16_t *sus2Value, bool sus2valid,
|
||||||
|
Loading…
Reference in New Issue
Block a user