From 1812694a2116190176d512fb67e520795430ecc1 Mon Sep 17 00:00:00 2001 From: Tomoki Date: Thu, 4 Jan 2024 17:43:02 +0900 Subject: [PATCH] fix name of functions and variables --- .../components/laser_emitter.ini | 12 ++++----- s2e-ff/src/components/aocs/laser_emitter.hpp | 26 +++++++++---------- .../aocs/quadrant_photodiode_sensor.cpp | 2 +- .../simulation/spacecraft/ff_components_2.cpp | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/s2e-ff/data/initialize_files/components/laser_emitter.ini b/s2e-ff/data/initialize_files/components/laser_emitter.ini index 15f0256a..5c110566 100644 --- a/s2e-ff/data/initialize_files/components/laser_emitter.ini +++ b/s2e-ff/data/initialize_files/components/laser_emitter.ini @@ -18,9 +18,9 @@ emitting_direction_c(2) = 1.0 emission_angle_rad = 0.1 emission_power_W = 2.16 -beam_waist_m = 0.785e-3 -rayleigh_range_m = 1.93 -rayleigh_range_offset_m = 4.65 +radius_beam_waist_m = 0.912e-3 +rayleigh_length_m = 3.62 +rayleigh_length_offset_m = 4.67 [LASER_EMITTER_1] quaternion_b2c(0) = 0.0 @@ -39,6 +39,6 @@ emitting_direction_c(2) = 1.0 emission_angle_rad = 0.1 emission_power_W = 2.16 -beam_waist_m = 0.785e-3 -rayleigh_range_m = 1.93 -rayleigh_range_offset_m = 4.65 +radius_beam_waist_m = 0.912e-3 +rayleigh_length_m = 3.62 +rayleigh_length_offset_m = 4.67 diff --git a/s2e-ff/src/components/aocs/laser_emitter.hpp b/s2e-ff/src/components/aocs/laser_emitter.hpp index 67a967d8..732fa67a 100644 --- a/s2e-ff/src/components/aocs/laser_emitter.hpp +++ b/s2e-ff/src/components/aocs/laser_emitter.hpp @@ -14,7 +14,7 @@ /** * @class LaserEmitter - * @brief Corner Cube Reflector + * @brief Laser Emitter */ class LaserEmitter { public: @@ -63,12 +63,12 @@ class LaserEmitter { inline double GetEmissionAngle_rad() const { return emission_angle_rad_; } inline double GetEmissionPower_W() const { return emission_power_W_; } - inline double GetBeamWaist_m() const { return beam_waist_m_; } - inline double GetRayleighRange_m() const { return rayleigh_range_m_; } - inline double GetRayleighRangeOffset_m() const { return rayleigh_range_offset_m_; } + inline double GetRadiusBeamWaist_m() const { return radius_beam_waist_m_; } + inline double GetRayleighLength_m() const { return rayleigh_length_m_; } + inline double GetRayleighLengthOffset_m() const { return rayleigh_length_offset_m_; } - inline double GetBeamRadius_m(const double emission_distance_m) const { - double beam_radius_m = beam_waist_m_ * pow(1 + pow((emission_distance_m - rayleigh_range_offset_m_) / rayleigh_range_m_, 2.0), 0.5); + inline double GetBeamWidthRadius_m(const double emission_distance_m) const { + double beam_radius_m = radius_beam_waist_m_ * pow(1 + pow((emission_distance_m - rayleigh_length_offset_m_) / rayleigh_length_m_, 2.0), 0.5); return beam_radius_m; } @@ -77,10 +77,10 @@ class LaserEmitter { double emission_angle_rad_ = 0.0; //!< Laser emitting angle from the emitting direction [rad] libra::TranslationFirstDualQuaternion dual_quaternion_c2b_; //!< Dual quaternion from body to component frame - double emission_power_W_ = 0.0; //!< Laser emission power [W] - double beam_waist_m_ = 0.0; //!< Beam waist of the laser [m] - double rayleigh_range_m_ = 0.0; //!< Rayleigh range of the laser [m] - double rayleigh_range_offset_m_ = 4.65; //!< Rayleigh range position offset of the laser [m] + double emission_power_W_ = 0.0; //!< Laser emission power [W] + double radius_beam_waist_m_ = 0.0; //!< Beam waist of the laser [m] + double rayleigh_length_m_ = 0.0; //!< Rayleigh length (range) of the laser [m] + double rayleigh_length_offset_m_ = 4.65; //!< Rayleigh length (range) position offset of the laser [m] // Reference const Dynamics* dynamics_; @@ -101,9 +101,9 @@ class LaserEmitter { emission_angle_rad_ = ini_file.ReadDouble(section_name.c_str(), "emission_angle_rad"); emission_power_W_ = ini_file.ReadDouble(section_name.c_str(), "emission_power_W"); - beam_waist_m_ = ini_file.ReadDouble(section_name.c_str(), "beam_waist_m"); - rayleigh_range_m_ = ini_file.ReadDouble(section_name.c_str(), "rayleigh_range_m"); - rayleigh_range_offset_m_ = ini_file.ReadDouble(section_name.c_str(), "rayleigh_range_offset_m"); + radius_beam_waist_m_ = ini_file.ReadDouble(section_name.c_str(), "radius_beam_waist_m"); + rayleigh_length_m_ = ini_file.ReadDouble(section_name.c_str(), "rayleigh_length_m"); + rayleigh_length_offset_m_ = ini_file.ReadDouble(section_name.c_str(), "rayleigh_length_offset_m"); } }; diff --git a/s2e-ff/src/components/aocs/quadrant_photodiode_sensor.cpp b/s2e-ff/src/components/aocs/quadrant_photodiode_sensor.cpp index 488793a0..be570034 100644 --- a/s2e-ff/src/components/aocs/quadrant_photodiode_sensor.cpp +++ b/s2e-ff/src/components/aocs/quadrant_photodiode_sensor.cpp @@ -75,7 +75,7 @@ void QuadrantPhotodiodeSensor::MainRoutine(int count) { actual_vertical_displacement_m_ = qpd_vertical_displacement_m; } - qpd_received_laser_beam_radius_m = inter_spacecraft_communication_.GetLaserEmitter(laser_id).GetBeamRadius_m(qpd_laser_distance_m); + qpd_received_laser_beam_radius_m = inter_spacecraft_communication_.GetLaserEmitter(laser_id).GetBeamWidthRadius_m(qpd_laser_distance_m); qpd_received_laser_power_W = inter_spacecraft_communication_.GetLaserEmitter(laser_id).GetEmissionPower_W(); CalcSensorOutput(qpd_received_laser_power_W, qpd_received_laser_beam_radius_m, qpd_horizontal_displacement_m, qpd_vertical_displacement_m); diff --git a/s2e-ff/src/simulation/spacecraft/ff_components_2.cpp b/s2e-ff/src/simulation/spacecraft/ff_components_2.cpp index f629ede0..e5e67e1f 100644 --- a/s2e-ff/src/simulation/spacecraft/ff_components_2.cpp +++ b/s2e-ff/src/simulation/spacecraft/ff_components_2.cpp @@ -27,7 +27,7 @@ FfComponents2::FfComponents2(const Dynamics* dynamics, const Structure* structur corner_cube_reflectors_.push_back(new CornerCubeReflector(file_name, dynamics_, id)); } inter_spacecraft_communication.SetCornerCubeReflector(corner_cube_reflectors_); - + file_name = sat_file.ReadString("COMPONENT_FILES", "laser_emitter_file"); config_->main_logger_->CopyFileToLogDirectory(file_name); IniAccess laser_emitter_file(file_name);