Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
200km committed Dec 17, 2024
1 parent 9421a39 commit f365e39
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/dynamics/attitude/controlled_attitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ math::Vector<3> ControlledAttitude::CalcTargetDirection_i(AttitudeControlMode mo
direction = OuterProduct(orbit_->GetPosition_i_m(), orbit_->GetVelocity_i_m_s());
} else if (mode == AttitudeControlMode::kEarthSurfacePointing) {
math::Vector<3> earth_surface_target_position_ecef_m = target_earth_surface_position_.CalcEcefPosition();
math::Vector<3> earth_surface_target_position_i_m = local_celestial_information_->GetGlobalInformation().GetEarthRotation().GetDcmJ2000ToEcef().Transpose()*earth_surface_target_position_ecef_m;
math::Vector<3> earth_surface_target_position_i_m =
local_celestial_information_->GetGlobalInformation().GetEarthRotation().GetDcmJ2000ToEcef().Transpose() *
earth_surface_target_position_ecef_m;

direction = earth_surface_target_position_i_m - orbit_->GetPosition_i_m();
}
Expand Down
20 changes: 10 additions & 10 deletions src/dynamics/attitude/controlled_attitude.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class ControlledAttitude : public Attitude {
ControlledAttitude(const AttitudeControlMode main_mode, const AttitudeControlMode sub_mode, const math::Quaternion quaternion_i2b,
const math::Vector<3> main_target_direction_b, const math::Vector<3> sub_target_direction_b,
const math::Matrix<3, 3>& inertia_tensor_kgm2, const geodesy::GeodeticPosition target_earth_surface_position,
const environment::LocalCelestialInformation* local_celestial_information,
const orbit::Orbit* orbit, const std::string& simulation_object_name = "attitude");
const environment::LocalCelestialInformation* local_celestial_information, const orbit::Orbit* orbit,
const std::string& simulation_object_name = "attitude");
/**
* @fn ~ControlledAttitude
* @brief Destructor
Expand Down Expand Up @@ -104,14 +104,14 @@ class ControlledAttitude : public Attitude {
virtual void Propagate(const double end_time_s);

private:
AttitudeControlMode main_mode_; //!< Main control mode
AttitudeControlMode sub_mode_; //!< Sub control mode
math::Vector<3> main_target_direction_b_; //!< Main target direction on the body fixed frame
math::Vector<3> sub_target_direction_b_; //!< Sub target direction on tge body fixed frame
double previous_calc_time_s_ = -1.0; //!< Previous time of velocity calculation [sec]
math::Quaternion previous_quaternion_i2b_; //!< Previous quaternion
math::Vector<3> previous_omega_b_rad_s_; //!< Previous angular velocity [rad/s]
geodesy::GeodeticPosition target_earth_surface_position_; //!< Target position on the Earth surface
AttitudeControlMode main_mode_; //!< Main control mode
AttitudeControlMode sub_mode_; //!< Sub control mode
math::Vector<3> main_target_direction_b_; //!< Main target direction on the body fixed frame
math::Vector<3> sub_target_direction_b_; //!< Sub target direction on tge body fixed frame
double previous_calc_time_s_ = -1.0; //!< Previous time of velocity calculation [sec]
math::Quaternion previous_quaternion_i2b_; //!< Previous quaternion
math::Vector<3> previous_omega_b_rad_s_; //!< Previous angular velocity [rad/s]
geodesy::GeodeticPosition target_earth_surface_position_; //!< Target position on the Earth surface

const double kMinDirectionAngle_rad = 30.0 * math::deg_to_rad; //!< Minimum angle b/w main and sub direction
// TODO Change with ini file
Expand Down

0 comments on commit f365e39

Please sign in to comment.