Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
200km committed Oct 1, 2024
1 parent 9888bb5 commit 282cead
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 14 deletions.
2 changes: 0 additions & 2 deletions src/dynamics/dynamics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

#include "dynamics.hpp"

#include "../simulation/multiple_spacecraft/relative_information.hpp"

namespace s2e::dynamics {

Dynamics(const simulation::SimulationConfiguration* simulation_configuration, const environment::SimulationTime* simulation_time,
Expand Down
11 changes: 8 additions & 3 deletions src/dynamics/dynamics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@
#include "../environment/global/simulation_time.hpp"
#include "../environment/local/local_environment.hpp"
#include "../math_physics/math/vector.hpp"
#include "../simulation/multiple_spacecraft/relative_information.hpp"
#include "../simulation/simulation_configuration.hpp"
#include "../simulation/spacecraft/structure/structure.hpp"
#include "dynamics/attitude/initialize_attitude.hpp"
#include "dynamics/orbit/initialize_orbit.hpp"
#include "dynamics/thermal/node.hpp"
#include "dynamics/thermal/temperature.hpp"

class s2e::simulation::RelativeInformation;
class s2e::environment::LocalEnvironment;
namespace s2e::simulation {
class RelativeInformation;
}
namespace s2e::environment {
class LocalEnvironment;
}

namespace s2e::dynamics {

Expand Down Expand Up @@ -53,7 +58,7 @@ class Dynamics {
* @param [in] simulation_time: Simulation time
* @param [in] local_celestial_information: Local celestial information
*/
void Update(const simulation::SimulationTime* simulation_time, const environment::LocalCelestialInformation* local_celestial_information);
void Update(const environment::SimulationTime* simulation_time, const environment::LocalCelestialInformation* local_celestial_information);

/**
* @fn LogSetup
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/orbit/orbit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum class OrbitPropagateMode {
kSgp4, //!< SGP4 propagation using TLE without thruster maneuver
kRelativeOrbit, //!< Relative dynamics (for formation flying simulation)
kKepler, //!< Kepler orbit propagation without disturbances and thruster maneuver
kEncke, //!< Encke orbit propagation with disturbances and thruster maneuver
kEncke, //!< Encke orbit propagation with disturbances and thruster maneuver
kTimeSeriesFile //!< Orbit propagation using time series file
};

Expand Down
1 change: 0 additions & 1 deletion src/dynamics/orbit/time_series_file_orbit_propagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,3 @@ bool TimeSeriesFileOrbitPropagation::UpdateInterpolationInformation() {

return true;
}

1 change: 0 additions & 1 deletion src/dynamics/orbit/time_series_file_orbit_propagation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,3 @@ class TimeSeriesFileOrbitPropagation : public Orbit {
};

#endif // S2E_DYNAMICS_ORBIT_TIME_SERIES_FILE_ORBIT_PROPAGATION_HPP_

4 changes: 4 additions & 0 deletions src/environment/local/local_environment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#include "simulation/simulation_configuration.hpp"
#include "solar_radiation_pressure_environment.hpp"

namespace s2e::math {
class Dynamics;
}

namespace s2e::environment {

/**
Expand Down
2 changes: 1 addition & 1 deletion src/setting_file_reader/wings_operation_file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ class WingsOperationFile {
size_t line_pointer_ = 0; //!< Line pointer
};

} // namespace s2e::setting_file_reader
} // namespace s2e::setting_file_reader

#endif // S2E_LIBRARY_INITIALIZE_WINGS_OPERATION_FILE_HPP_
11 changes: 8 additions & 3 deletions src/simulation/multiple_spacecraft/relative_information.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
#ifndef S2E_MULTIPLE_SPACECRAFT_RELATIVE_INFORMATION_HPP_
#define S2E_MULTIPLE_SPACECRAFT_RELATIVE_INFORMATION_HPP_

#include <map>
#include <string>

#include "../../dynamics/dynamics.hpp"
#include "../../logger/loggable.hpp"
#include "../../logger/logger.hpp"

namespace s2e::dynamics {
class Dynamics;
}

namespace s2e::simulation {

/**
Expand Down Expand Up @@ -42,7 +47,7 @@ class RelativeInformation : public logger::ILoggable {
* @param [in] spacecraft_id: ID of target spacecraft
* @param [in] dynamics: Dynamics information of the target spacecraft
*/
void RegisterDynamicsInfo(const size_t spacecraft_id, const dynamics::dynamics::Dynamics* dynamics);
void RegisterDynamicsInfo(const size_t spacecraft_id, const dynamics::Dynamics* dynamics);
/**
* @fn RegisterDynamicsInfo
* @brief Remove dynamics information of target spacecraft
Expand Down Expand Up @@ -129,12 +134,12 @@ class RelativeInformation : public logger::ILoggable {
* @brief Return the dynamics information of a spacecraft
* @param [in] target_spacecraft_id: ID of the spacecraft
*/
inline const dynamics::dynamics::Dynamics* GetReferenceSatDynamics(const size_t reference_spacecraft_id) const {
inline const dynamics::Dynamics* GetReferenceSatDynamics(const size_t reference_spacecraft_id) const {
return dynamics_database_.at(reference_spacecraft_id);
};

private:
std::map<const size_t, const dynamics::dynamics::Dynamics*> dynamics_database_; //!< Dynamics database of all spacecraft
std::map<const size_t, const dynamics::Dynamics*> dynamics_database_; //!< Dynamics database of all spacecraft

std::vector<std::vector<math::Vector<3>>> relative_position_list_i_m_; //!< Relative position list in the inertial frame in unit [m]
std::vector<std::vector<math::Vector<3>>> relative_velocity_list_i_m_s_; //!< Relative velocity list in the inertial frame in unit [m/s]
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/com_port_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ int ComPortInterface::DiscardInBuffer() {
return 0;
}

} // namespace s2e::utilities
} // namespace s2e::utilities
2 changes: 1 addition & 1 deletion src/utilities/quantization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ double quantization(const double continuous_number, const double resolution) {

float quantization_float(const double continuous_number, const double resolution) { return (float)quantization(continuous_number, resolution); }

} // namespace s2e::utilities
} // namespace s2e::utilities

0 comments on commit 282cead

Please sign in to comment.