From b6c5796121b61881dc473ac90ad70bd492860189 Mon Sep 17 00:00:00 2001 From: Marius Eggert Date: Wed, 14 Dec 2022 10:31:20 +0100 Subject: [PATCH] fixed init for SensorProcessing and type of timeDiff --- mission/controller/acs/SensorProcessing.cpp | 3 +-- mission/controller/acs/SensorProcessing.h | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mission/controller/acs/SensorProcessing.cpp b/mission/controller/acs/SensorProcessing.cpp index 5b4267e7..f5d2568b 100644 --- a/mission/controller/acs/SensorProcessing.cpp +++ b/mission/controller/acs/SensorProcessing.cpp @@ -21,8 +21,7 @@ using namespace Math; -SensorProcessing::SensorProcessing(AcsParameters *acsParameters_) - : savedMgmVecTot{0, 0, 0}, validMagField(false), validGcLatitude(false) {} +SensorProcessing::SensorProcessing(AcsParameters *acsParameters_) {} SensorProcessing::~SensorProcessing() {} diff --git a/mission/controller/acs/SensorProcessing.h b/mission/controller/acs/SensorProcessing.h index 77205669..1a094dab 100644 --- a/mission/controller/acs/SensorProcessing.h +++ b/mission/controller/acs/SensorProcessing.h @@ -70,15 +70,15 @@ class SensorProcessing { const AcsParameters::GpsParameters *gpsParameters, acsctrl::GpsDataProcessed *gpsDataProcessed); - double savedMgmVecTot[3]; + double savedMgmVecTot[3] = {0.0, 0.0, 0.0}; timeval timeOfSavedMagFieldEst; - double savedSusVecTot[3]; + double savedSusVecTot[3] = {0.0, 0.0, 0.0}; timeval timeOfSavedSusDirEst; - bool validMagField; + bool validMagField = false; - double savedPosSatE[3]; - uint32_t timeOfSavedPosSatE; - bool validSavedPosSatE; + double savedPosSatE[3] = {0.0, 0.0, 0.0}; + double timeOfSavedPosSatE = 0.0; + bool validSavedPosSatE = false; const float zeroVector[3] = {0.0, 0.0, 0.0}; SusConverter susConverter;