Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
200km committed Jul 20, 2024
1 parent d521601 commit d2c23bd
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
8 changes: 4 additions & 4 deletions src/components/base/sensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ class Sensor {
math::Vector<N> Measure(const math::Vector<N> true_value_c);

private:
math::Matrix<N, N> scale_factor_; //!< Scale factor matrix
math::Vector<N> range_to_const_c_; //!< Output range limit to be constant output value at the component frame
math::Vector<N> range_to_zero_c_; //!< Output range limit to be zero output value at the component frame
math::Matrix<N, N> scale_factor_; //!< Scale factor matrix
math::Vector<N> range_to_const_c_; //!< Output range limit to be constant output value at the component frame
math::Vector<N> range_to_zero_c_; //!< Output range limit to be zero output value at the component frame
randomization::NormalRand normal_random_noise_c_[N]; //!< Normal random
RandomWalk<N> random_walk_noise_c_; //!< Random Walk
RandomWalk<N> random_walk_noise_c_; //!< Random Walk

/**
* @fn Clip
Expand Down
4 changes: 2 additions & 2 deletions src/components/ideal/force_generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class ForceGenerator : public Component, public ILoggable {
math::Vector<3> generated_force_rtn_N_{0.0}; //!< Generated force in the RTN frame [N]

// Noise
randomization::NormalRand magnitude_noise_; //!< Normal random for magnitude noise
randomization::NormalRand direction_noise_; //!< Normal random for direction noise
randomization::NormalRand magnitude_noise_; //!< Normal random for magnitude noise
randomization::NormalRand direction_noise_; //!< Normal random for direction noise
double direction_error_standard_deviation_rad_; //!< Standard deviation of direction error [rad]

/**
Expand Down
4 changes: 2 additions & 2 deletions src/components/ideal/torque_generator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class TorqueGenerator : public Component, public ILoggable {
math::Vector<3> generated_torque_b_Nm_{0.0}; //!< Generated torque in the body fixed frame [Nm]

// Noise
randomization::NormalRand magnitude_noise_; //!< Normal random for magnitude noise
randomization::NormalRand direction_noise_; //!< Normal random for direction noise
randomization::NormalRand magnitude_noise_; //!< Normal random for magnitude noise
randomization::NormalRand direction_noise_; //!< Normal random for direction noise
double direction_error_standard_deviation_rad_; //!< Standard deviation of direction error [rad]

/**
Expand Down
6 changes: 3 additions & 3 deletions src/components/real/aocs/gnss_receiver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ class GnssReceiver : public Component, public ILoggable {
// Simple position observation
randomization::NormalRand position_random_noise_ecef_m_[3]; //!< Random noise for position at the ECEF frame [m]
randomization::NormalRand velocity_random_noise_ecef_m_s_[3]; //!< Random noise for velocity at the ECEF frame [m]
math::Vector<3> position_ecef_m_{0.0}; //!< Observed position in the ECEF frame [m]
math::Vector<3> velocity_ecef_m_s_{0.0}; //!< Observed velocity in the ECEF frame [m/s]
GeodeticPosition geodetic_position_; //!< Observed position in the geodetic frame
math::Vector<3> position_ecef_m_{0.0}; //!< Observed position in the ECEF frame [m]
math::Vector<3> velocity_ecef_m_s_{0.0}; //!< Observed velocity in the ECEF frame [m/s]
GeodeticPosition geodetic_position_; //!< Observed position in the geodetic frame

// Time observation
UTC utc_ = {2000, 1, 1, 0, 0, 0.0}; //!< Observed time in UTC [year, month, day, hour, min, sec]
Expand Down
4 changes: 2 additions & 2 deletions src/components/real/propulsion/simple_thruster.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ class SimpleThruster : public Component, public ILoggable {
double duty_ = 0.0; //!< PWM Duty [0.0 : 1.0]
double thrust_magnitude_max_N_ = 0.0; //!< Maximum thrust magnitude [N]
double direction_noise_standard_deviation_rad_ = 0.0; //!< Standard deviation of thrust direction error [rad]
randomization::NormalRand magnitude_random_noise_; //!< Normal random for thrust magnitude error
randomization::NormalRand direction_random_noise_; //!< Normal random for thrust direction error
randomization::NormalRand magnitude_random_noise_; //!< Normal random for thrust magnitude error
randomization::NormalRand direction_random_noise_; //!< Normal random for thrust direction error
// outputs
Vector<3> output_thrust_b_N_{0.0}; //!< Generated thrust on the body fixed frame [N]
Vector<3> output_torque_b_Nm_{0.0}; //!< Generated torque on the body fixed frame [Nm]
Expand Down
3 changes: 2 additions & 1 deletion src/disturbances/magnetic_disturbance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ void MagneticDisturbance::CalcRMM() {
static math::Vector<3> random_walk_std_dev(residual_magnetic_moment_.GetRandomWalkStandardDeviation_Am2());
static math::Vector<3> random_walk_limit(residual_magnetic_moment_.GetRandomWalkLimit_Am2());
static RandomWalk<3> random_walk(0.1, random_walk_std_dev, random_walk_limit); // [FIXME] step width is constant
static randomization::NormalRand normal_random(0.0, residual_magnetic_moment_.GetRandomNoiseStandardDeviation_Am2(), global_randomization.MakeSeed());
static randomization::NormalRand normal_random(0.0, residual_magnetic_moment_.GetRandomNoiseStandardDeviation_Am2(),
global_randomization.MakeSeed());

rmm_b_Am2_ = residual_magnetic_moment_.GetConstantValue_b_Am2();
for (int i = 0; i < 3; ++i) {
Expand Down
6 changes: 3 additions & 3 deletions src/math_physics/randomization/global_randomization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class GlobalRandomization {
long MakeSeed();

private:
static const unsigned int kMaxSeed = 0xffffffff; //!< Maximum value of seed
randomization::MinimalStandardLcg base_randomizer_; //!< Base of global randomization
long seed_; //!< Seed of global randomization
static const unsigned int kMaxSeed = 0xffffffff; //!< Maximum value of seed
randomization::MinimalStandardLcg base_randomizer_; //!< Base of global randomization
long seed_; //!< Seed of global randomization
};

extern GlobalRandomization global_randomization; //!< Global randomization
Expand Down
2 changes: 1 addition & 1 deletion src/math_physics/randomization/random_walk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class RandomWalk : public math::OrdinaryDifferentialEquation<N> {
virtual void DerivativeFunction(double x, const math::Vector<N>& state, math::Vector<N>& rhs);

private:
math::Vector<N> limit_; //!< Limit of random walk
math::Vector<N> limit_; //!< Limit of random walk
randomization::NormalRand normal_randomizer_[N]; //!< Random walk excitation noise
};

Expand Down

0 comments on commit d2c23bd

Please sign in to comment.