From 295a2e3fdc2dab0066c9d12477b677bc72f5fc22 Mon Sep 17 00:00:00 2001 From: Marius Eggert Date: Mon, 19 Sep 2022 15:37:05 +0200 Subject: [PATCH] added SensorValues --- mission/controller/acs/SensorValues.cpp | 35 +++++++++ mission/controller/acs/SensorValues.h | 99 +++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 mission/controller/acs/SensorValues.cpp create mode 100644 mission/controller/acs/SensorValues.h diff --git a/mission/controller/acs/SensorValues.cpp b/mission/controller/acs/SensorValues.cpp new file mode 100644 index 00000000..f3a52dea --- /dev/null +++ b/mission/controller/acs/SensorValues.cpp @@ -0,0 +1,35 @@ +/* + * SensorValues.cpp + * + * Created on: 30 Mar 2022 + * Author: rooob + */ +#include + +#include +#include +#include + +namespace ACS { + +SensorValues::SensorValues() { +} + +SensorValues::~SensorValues() { +} + +ReturnValue_t SensorValues::update() { +// lp_var_t quaternion(objects::STAR_TRACKER, PoolIds::CALI_QW, nullptr, pool_rwm_t::VAR_READ); +// ReturnValue_t result = quaternion.read(); + +// if ( result != RETURN_OK) { +// return RETURN_FAILED; +// } +// quatJB[3] = static_cast(quaternion.value); +// quatJBValid = quaternion.isValid(); + + return RETURN_OK; +} +} + + diff --git a/mission/controller/acs/SensorValues.h b/mission/controller/acs/SensorValues.h new file mode 100644 index 00000000..1a328e16 --- /dev/null +++ b/mission/controller/acs/SensorValues.h @@ -0,0 +1,99 @@ +/* Created on: 08.03.2022 + * Author: Robin + */ + +#ifndef SENSORVALUES_H_ +#define SENSORVALUES_H_ + +#include + +namespace ACS { + +class SensorValues: public HasReturnvaluesIF { +public: + SensorValues(); + virtual ~SensorValues(); + + ReturnValue_t update(); + + float mgm0[3]; + float mgm1[3]; + float mgm2[3]; + float mgm3[3]; + float mgm4[3]; + + bool mgm0Valid; + bool mgm1Valid; + bool mgm2Valid; + bool mgm3Valid; + bool mgm4Valid; + + float sus0[3]; + float sus1[3]; + float sus2[3]; + float sus3[3]; + float sus4[3]; + float sus5[3]; + float sus6[3]; + float sus7[3]; + float sus8[3]; + float sus9[3]; + float sus10[3]; + float sus11[3]; + + bool sus0Valid; + bool sus1Valid; + bool sus2Valid; + bool sus3Valid; + bool sus4Valid; + bool sus5Valid; + bool sus6Valid; + bool sus7Valid; + bool sus8Valid; + bool sus9Valid; + bool sus10Valid; + bool sus11Valid; + + + double rmu0[3]; + double rmu1[3]; + double rmu2[3]; + + bool rmu0Valid; + bool rmu1Valid; + bool rmu2Valid; + + double quatJB[4]; // output star tracker. quaternion or dcm ? refrence to which KOS? + bool quatJBValid; + int strIntTime[2]; + + double gps0latitude; //Reference is WGS84, so this one will probably be geodetic + double gps0longitude; //Should be geocentric for IGRF + double gps0altitude; + double gps0Velocity[3]; // speed over ground = ?? + double gps0Time; //utc + +// valid ids for gps values ! + int gps0TimeYear; + int gps0TimeMonth; + int gps0TimeHour; // should be double + bool gps0Valid; + + + bool mgt0valid; + +// Reaction wheel measurements + double speedRw0; // RPM [1/min] + double speedRw1; // RPM [1/min] + double speedRw2; // RPM [1/min] + double speedRw3; // RPM [1/min] + bool validRw0; + bool validRw1; + bool validRw2; + bool validRw3; + +}; +} /* namespace ACS */ + +#endif ENSORVALUES_H_ +