Hello all,
I am trying to instantiate different atmospheres to use in my orbit propagation and am having some trouble with JB2008.
I had a look at some older posts (Implementing the JR2008 atmospheric model and Atmosphere Model) and am wondering whether it is still the case that I have to provide the SOLFSMY file myself? And if I do I am not sure how to do it correctly…
Currently my implementation of DTM2000 and NRLMSISE00 work but JB2008 does not.
My DTM and NRLMSISE implementation is as follows:
#DTM200 and NRLMSISE00
from org.orekit.models.earth.atmosphere import NRLMSISE00, DTM2000
from org.orekit.models.earth.atmosphere.data import MarshallSolarActivityFutureEstimation
msafe = MarshallSolarActivityFutureEstimation(
MarshallSolarActivityFutureEstimation.DEFAULT_SUPPORTED_NAMES,
MarshallSolarActivityFutureEstimation.StrengthLevel.AVERAGE)
atmosphere = NRLMSISE00(msafe, sun, wgs84Ellipsoid)
# atmosphere = DTM2000(msafe, sun, wgs84Ellipsoid)
For JB2008 I have been trying along these lines but I have not managed to feed the SOLFSYM and DTCFILE to the JB2008 successfully:
from org.orekit.models.earth.atmosphere.data import JB2008SpaceEnvironmentData, SOLFSMYDataLoader, DtcDataLoader
from org.orekit.models.earth.atmosphere import JB2008, JB2008InputParameters
sol_data_loader = SOLFSMYDataLoader(utc)
dtc_data_loader = DtcDataLoader(utc)
# i downloaded these manually from https://sol.spacenvironment.net/
sol_file_path = "external/jb08_inputs/SOLFSMY.TXT"
dtc_file_path = "external/jb08_inputs/DTCFILE.TXT"
with open(sol_file_path, 'rb') as sol_file, open(dtc_file_path, 'rb') as dtc_file:
sol_data_loader.loadData(sol_file, "SOLFSMY.TXT")
dtc_data_loader.loadData(dtc_file, "DTCFILE.TXT")
jb08_data = JB2008SpaceEnvironmentData(JB2008SpaceEnvironmentData.DEFAULT_SUPPORTED_NAMES_SOLFSMY,
JB2008SpaceEnvironmentData.DEFAULT_SUPPORTED_NAMES_DTC)
jb08_params = JB2008InputParameters()
atmosphere = JB2008(jb08_data, sun, wgs84Ellipsoid, utc)
The error I am currently stuck on is:
---------------------------------------------------------------------------
InvalidArgsError Traceback (most recent call last)
Cell In[46], line 10
7 dtc_file_path = "external/jb08_inputs/DTCFILE.TXT"
9 with open(sol_file_path, 'rb') as sol_file, open(dtc_file_path, 'rb') as dtc_file:
---> 10 sol_data_loader.loadData(sol_file, "SOLFSMY.TXT")
11 dtc_data_loader.loadData(dtc_file, "DTCFILE.TXT")
13 jb08_data = JB2008SpaceEnvironmentData(JB2008SpaceEnvironmentData.DEFAULT_SUPPORTED_NAMES_SOLFSMY,
14 JB2008SpaceEnvironmentData.DEFAULT_SUPPORTED_NAMES_DTC)
InvalidArgsError: (<class 'org.orekit.models.earth.atmosphere.data.SOLFSMYDataLoader'>, 'loadData', (<_io.BufferedReader name='external/jb08_inputs/SOLFSMY.TXT'>, 'SOLFSMY.TXT'))
Any help much appreciated.
Best,
Charles