Skip to content

Commit

Permalink
Merge pull request #399 from ut-issl/hotfix/fix-typo-magetometer
Browse files Browse the repository at this point in the history
[Hotfix] Fix typo magetometer
  • Loading branch information
200km authored May 8, 2023
2 parents da89310 + d888559 commit a0bf942
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_policy(SET CMP0048 NEW)
project(S2E
LANGUAGES CXX
DESCRIPTION "S2E: Spacecraft Simulation Environment"
VERSION 6.0.2
VERSION 6.0.3
)

cmake_minimum_required(VERSION 3.13)
Expand Down
2 changes: 1 addition & 1 deletion data/sample/initialize_files/sample_satellite.ini
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ structure_file = ../../data/sample/initialize_files/sample_structure.ini

[COMPONENT_FILES]
gyro_file = ../../data/sample/initialize_files/components/gyro_sensor.ini
magetometer_file = ../../data/sample/initialize_files/components/magnetometer.ini
magnetometer_file = ../../data/sample/initialize_files/components/magnetometer.ini
stt_file = ../../data/sample/initialize_files/components/star_sensor.ini
ss_file = ../../data/sample/initialize_files/components/sun_sensor.ini
gnss_file = ../../data/sample/initialize_files/components/gnss_receiver.ini
Expand Down
8 changes: 4 additions & 4 deletions src/components/real/aocs/initialize_magnetometer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "../../base/initialize_sensor.hpp"
#include "library/initialize/initialize_file_access.hpp"

Magnetometer InitMagetometer(ClockGenerator* clock_generator, int sensor_id, const std::string file_name, double component_step_time_s,
const GeomagneticField* geomagnetic_field) {
Magnetometer InitMagnetometer(ClockGenerator* clock_generator, int sensor_id, const std::string file_name, double component_step_time_s,
const GeomagneticField* geomagnetic_field) {
IniAccess magsensor_conf(file_name);
const char* sensor_name = "MAGNETOMETER_";
const std::string section_name = sensor_name + std::to_string(static_cast<long long>(sensor_id));
Expand All @@ -28,8 +28,8 @@ Magnetometer InitMagetometer(ClockGenerator* clock_generator, int sensor_id, con
return magsensor;
}

Magnetometer InitMagetometer(ClockGenerator* clock_generator, PowerPort* power_port, int sensor_id, const std::string file_name,
double component_step_time_s, const GeomagneticField* geomagnetic_field) {
Magnetometer InitMagnetometer(ClockGenerator* clock_generator, PowerPort* power_port, int sensor_id, const std::string file_name,
double component_step_time_s, const GeomagneticField* geomagnetic_field) {
IniAccess magsensor_conf(file_name);
const char* sensor_name = "MAGNETOMETER_";
const std::string section_name = sensor_name + std::to_string(static_cast<long long>(sensor_id));
Expand Down
12 changes: 6 additions & 6 deletions src/components/real/aocs/initialize_magnetometer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
#include <components/real/aocs/magnetometer.hpp>

/**
* @fn InitMagetometer
* @fn InitMagnetometer
* @brief Initialize functions for magnetometer without power port
* @param [in] clock_generator: Clock generator
* @param [in] sensor_id: Sensor ID
* @param [in] file_name: Path to the initialize file
* @param [in] component_step_time_s: Component step time [sec]
* @param [in] geomagnetic_field: Geomegnetic environment
*/
Magnetometer InitMagetometer(ClockGenerator* clock_generator, int sensor_id, const std::string file_name, double component_step_time_s,
const GeomagneticField* geomagnetic_field);
Magnetometer InitMagnetometer(ClockGenerator* clock_generator, int sensor_id, const std::string file_name, double component_step_time_s,
const GeomagneticField* geomagnetic_field);
/**
* @fn InitMagetometer
* @fn InitMagnetometer
* @brief Initialize functions for magnetometer with power port
* @param [in] clock_generator: Clock generator
* @param [in] power_port: Power port
Expand All @@ -29,7 +29,7 @@ Magnetometer InitMagetometer(ClockGenerator* clock_generator, int sensor_id, con
* @param [in] component_step_time_s: Component step time [sec]
* @param [in] geomagnetic_field: Geomegnetic environment
*/
Magnetometer InitMagetometer(ClockGenerator* clock_generator, PowerPort* power_port, int sensor_id, const std::string file_name,
double component_step_time_s, const GeomagneticField* geomagnetic_field);
Magnetometer InitMagnetometer(ClockGenerator* clock_generator, PowerPort* power_port, int sensor_id, const std::string file_name,
double component_step_time_s, const GeomagneticField* geomagnetic_field);

#endif // S2E_COMPONENTS_REAL_AOCS_INITIALIZE_MAGNETOMETER_HPP_
8 changes: 4 additions & 4 deletions src/simulation_sample/spacecraft/sample_components.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ SampleComponents::SampleComponents(const Dynamics* dynamics, Structure* structur
global_environment_->GetSimulationTime().GetComponentStepTime_s(), dynamics_));

// Magnetometer
file_name = iniAccess.ReadString("COMPONENT_FILES", "magetometer_file");
file_name = iniAccess.ReadString("COMPONENT_FILES", "magnetometer_file");
configuration_->main_logger_->CopyFileToLogDirectory(file_name);
magnetometer_ = new Magnetometer(InitMagetometer(clock_generator, pcu_->GetPowerPort(2), 1, file_name,
global_environment_->GetSimulationTime().GetComponentStepTime_s(),
&(local_environment_->GetGeomagneticField())));
magnetometer_ = new Magnetometer(InitMagnetometer(clock_generator, pcu_->GetPowerPort(2), 1, file_name,
global_environment_->GetSimulationTime().GetComponentStepTime_s(),
&(local_environment_->GetGeomagneticField())));

// StarSensor
file_name = iniAccess.ReadString("COMPONENT_FILES", "stt_file");
Expand Down

0 comments on commit a0bf942

Please sign in to comment.