CssiSpaceWeatherData error with Celestrack data

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.

Ok I just saw the documentation mentions an FTP as well as Celestrack as source for the files. The file provided by the FTP works with no problem. So, I don’t know maybe the one from celestrack follows a diferent format. The header seems diferent.

Upping thread

Hi all,
I remember other people having similar problems with Celestrack CSSI data ( CssiSpaceWeather throws error ). I think the only problem is in the predicted data where one column is missing compared to AGI data. Since in my experience, Celestrack data is updated more frequently, it would be very nice if we could use that data source as well without any intermediate adjustment steps needed :smiley:

1 Like

Good idea, could you open an issue on the forge for that please @BS_space ?

I was about to do that and found @evan.ward already created a very similar issue a year ago :slight_smile:

Oh, great! I forgot. Sorry about that @BS_space :smiley: