Skip to content

Commit

Permalink
SIH: organise ECEF member variables
Browse files Browse the repository at this point in the history
  • Loading branch information
bresch committed Nov 19, 2024
1 parent 0627e29 commit f0625a6
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/modules/simulation/simulator_sih/sih.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,6 @@ class Sih : public ModuleBase<Sih>, public ModuleParams
static constexpr double gravity_equator = 9.7803253359;
};

matrix::Vector3d _p_E;
matrix::Vector3f _v_E;
matrix::Vector3f _v_E_dot;
double _lat;
double _lon;
double _alt;
matrix::Dcmf _R_N2E;

#if defined(ENABLE_LOCKSTEP_SCHEDULER)
void lockstep_loop();
Expand Down Expand Up @@ -213,11 +206,21 @@ class Sih : public ModuleBase<Sih>, public ModuleParams
matrix::Vector3f _v_N{}; // velocity in local navigation frame (NED, body-fixed) [m/s]
matrix::Vector3f _v_N_dot{}; // time derivative of velocity in local navigation frame [m/s2]
matrix::Quatf _q{}; // quaternion attitude in local navigation frame
matrix::Quatf _q_E{}; // quaternion attitude in ECEF
matrix::Vector3f _w_B{}; // body rates in body frame [rad/s]
float _u[NB_MOTORS] {}; // thruster signals

matrix::Vector3f _gravity_E{};
double _lat{0.0};
double _lon{0.0};
double _alt{0.0};

// Quantities in Earth-centered-Earth-fixed coordinates
matrix::Vector3f _gravity_E{};
matrix::Quatf _q_E{};
matrix::Vector3d _p_E{};
matrix::Vector3f _v_E{};
matrix::Vector3f _v_E_dot{};
matrix::Dcmf _R_N2E; // local navigation to ECEF frame rotation matrix

float _u[NB_MOTORS] {}; // thruster signals

enum class VehicleType {MC, FW, TS};
VehicleType _vehicle = VehicleType::MC;
Expand Down

0 comments on commit f0625a6

Please sign in to comment.