88
99#include " FprimeZephyrReference/Components/DetumbleManager/DetumbleManagerComponentAc.hpp"
1010
11+ #include < cmath>
12+
1113namespace Components {
1214
1315class DetumbleManager final : public DetumbleManagerComponentBase {
@@ -32,14 +34,31 @@ class DetumbleManager final : public DetumbleManagerComponentBase {
3234 U32 context // !< The call order
3335 ) override ;
3436
35- // Variables
37+ // Constants
3638 Drv::MagneticField EMPTY_MG_FIELD = Drv::MagneticField(0.0 , 0.0 , 0.0 , -1 );
37- Drv::MagneticField prevMgField = Drv::MagneticField(0.0 , 0.0 , 0.0 , -1 );
38-
3939 Drv::DipoleMoment EMPTY_DP_MOMENT = Drv::DipoleMoment(0.0 , 0.0 , 0.0 );
40+ const double PI = 3.14159265358979323846 ;
41+
42+ // Proves V3 Magnetorquer Information
43+ F64 COIL_VOLTAGE = 3.3 ;
44+ F64 COIL_NUM_TURNS_X_Y = 48 ;
45+ F64 COIL_LENGTH_X_Y = 0.053 ;
46+ F64 COIL_WIDTH_X_Y = 0.045 ;
47+ F64 COIL_AREA_X_Y = this ->COIL_LENGTH_X_Y * this ->COIL_WIDTH_X_Y;
48+ F64 COIL_RESISTANCE_X_Y = 57.2 ;
49+ F64 COIL_MAX_CURRENT_X_Y = this ->COIL_VOLTAGE / this ->COIL_RESISTANCE_X_Y;
50+ I64 COIL_NUM_TURNS_Z = 153 ;
51+ F64 COIL_DIAMETER_Z = 0.05755 ;
52+ F64 COIL_AREA_Z = this ->PI * powf (this ->COIL_DIAMETER_Z / 2 , 2.0 );
53+ F64 COIL_RESISTANCE_Z = 248.8 ;
54+ F64 COIL_MAX_CURRENT_Z = this ->COIL_VOLTAGE / this ->COIL_RESISTANCE_Z;
55+
56+ // Variables
57+ Drv::MagneticField prevMgField = Drv::MagneticField(0.0 , 0.0 , 0.0 , -1 );
4058
4159 // Functions
4260 bool executeControlStep ();
61+ void setDipoleMoment (Drv::DipoleMoment dpMoment);
4362};
4463
4564} // namespace Components
0 commit comments