Hi, I am trying to read the data currently available in celestrack to feed the Class CssiSpaceWeatherData, but I am getting an error in the line before END OBSERVED.
This is the part of the code that is giving an error:
source = DataSource(os.path.join("data/space-weather/SpaceWeather-All-v1.2.txt"))
atmos_params = CssiSpaceWeatherData(source)
And this is the error output:
Traceback (most recent call last):
File "<string>", line 1, in <module>
orekit.JavaError: <super: <class 'JavaError'>, <JavaError object>>
Java stacktrace:
org.orekit.errors.OrekitException: imposible de analizar la línea 24.827 del fichero data/space-weather/SpaceWeather-All-v1.2.txt :
2025 09 03 2619 15 43 33 20 20 17 10 23 7 173 32 18 7 7 6 4 9 3 11 0.6 3 147 163.8 157.3 149.8 161.0 154.8 145.7
at org.orekit.models.earth.atmosphere.data.CssiSpaceWeatherDataLoader.loadData(CssiSpaceWeatherDataLoader.java:163)
at org.orekit.models.earth.atmosphere.data.AbstractSolarActivityData.<init>(AbstractSolarActivityData.java:129)
at org.orekit.models.earth.atmosphere.data.CssiSpaceWeatherData.<init>(CssiSpaceWeatherData.java:222)
at org.orekit.models.earth.atmosphere.data.CssiSpaceWeatherData.<init>(CssiSpaceWeatherData.java:203)
at org.orekit.models.earth.atmosphere.data.CssiSpaceWeatherData.<init>(CssiSpaceWeatherData.java:183)
at org.orekit.models.earth.atmosphere.data.CssiSpaceWeatherData.<init>(CssiSpaceWeatherData.java:164)
Caused by: java.lang.NumberFormatException: For input string: " "
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:569)
at java.lang.Integer.parseInt(Integer.java:615)
at org.orekit.models.earth.atmosphere.data.CssiSpaceWeatherDataLoader.loadData(CssiSpaceWeatherDataLoader.java:143)
... 5 more
I have tried unziping the space-weather txt file that comes with orekit and do the same, but that works fine. Before that I was wondering if this is the supposed way of reading non-default data, but given the original orekit file works fine, I am guessing there is a problem with the file provided by Celestrack (Attached).
SW-All.txt (3.2 MB)
That is the original name, I changed it to make it the same as the orekit file just in case it had to do with the naming.