GeomagneticField
class calculates the geomagnetic field at the spacecraft's position from the IGRF model- This class also adds noise to emulate the difference between the IGRF model and the real world.
src/environment/local/geomagnetic_field.cpp, .hpp
GeomagneticField
class is defined.
src/environment/local/local_environment.cpp, .hpp
GeomagneticField
class is used here as a member variable ofLocalEnvironment
class.
src/library/external/igrf/igrf.cpp, h
- A magnetic field in the ECI frame is calculated by the IGRF model.
- Set a coefficient file path for the IGRF and random walk / white noise in .ini file
coefficient_file
: File path to the IGRF coefficients table.magnetic_field_random_walk_standard_deviation_nT
: Standard deviation of the random walk noisemagnetic_field_random_walk_limit_nT
: Limit of the random walk noisemagnetic_field_white_noise_standard_deviation_nT
: Standard deviation of the normal random noise
- Public functions
CalcMagneticField
: Update the magnetic fieldGetGeomagneticField_i_nT
: Return the magnetic field (nT) in the ECIGetGeomagneticField_b_nT
: Return the magnetic field (nT) in the body-fixed coordinate
- IGRF calculates the magnetic field based on a spherical harmonic expansion of magnetic scalar potential
$V$ .- The coefficients of the spherical harmonic expansion of
$V$ is updated by IAGA. The latest version is the 13th generation, and S2E uses this version.
- The coefficients of the spherical harmonic expansion of
- Please refer here for the details of IGRF.
- The calculated magnetic field is compared with Matlab's IGRF function calculation in the ECI frame.
- input files
- Default initialize files
- initial values
- To check the result in an example orbit, the EndTime was changed to 9000 s.
simulation_start_time_utc = 2020/01/01 11:00:00.0 simulation_duration_s = 9000 simulation_step_s = 5 orbit_update_period_s = 0.1 log_output_period_s = 5 simulation_speed_setting = 0
- Especially, we chose the following TLE for orbit calculation (ISS orbit).
tle1=1 25544U 98067A 20076.51604214 .00016717 00000-0 10270-3 0 9005 tle2=2 25544 51.6412 86.9962 0006063 30.9353 329.2153 15.49228202 17647
-
Error between S2E and MATLAB
- International Geomagnetic Reference Field, https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html#:~:text=The%20International%20Association%20of%20Geomagnetism,interior%2C%20its%20crust%20and%20its
- IAGA web page, https://www.ngdc.noaa.gov/IAGA/vmod/index.html
- MATLAB
igrfmagm
, https://jp.mathworks.com/help/aerotbx/ug/igrfmagm.html