When using Orekit for orbit prediction with an atmospheric drag model, the predicted orbit 10 days out shows a 6-second difference compared to STK

Sigh… worth a shot. I’ll keep thinking about it.

1 Like

Hi @a_gior,

I think if you start from AbstractSolarActivityData, rename it ConstantSolarActivityData, and implement the required method with constant values returned it should work.
For example, for constant F10.7, implement:

/** {@inheritDoc} */
    public double getDailyFlux(final AbsoluteDate date) {
        // Return constant value
        return myInputDailysFlux;
    }

And so on.

Hope this helps,
Maxime

Dear @MaximeJ ,
thank you for the reply. Unfortunately I do not have much experience in Java, in fact I am always using Orekit with the Python wrapper.

Would it be possible to do this modification directly on Python instead?

Thanks in advance.

Hi @a_gior,

I believe in Python you will have to subclass PythonAbstractSolarActivityData and implement all the methods (get24HoursKp, getAp etc.) with constant values returned.
You will find an example of subclassing a Python-Orekit class here (see section “Subclassing Java classes in Python”).

Hope this helps,
Maxime

Dear @MaximeJ ,
thank you so much for your inputs. In the end, I managed to implement a different class by using PythonNRLMSISE00InputParameters. As per the STK interface, I had as inputs the solar flux and Kp only.

The only difference is that this class I need to define the Ap vector instead of the Kp and, for this reason, I have used the (inverted) Ap to Kp relation from [1] to create a list of seven equal-value Ap, as it was implemented already in the class MarshallSolarActivityFutureEstimation (line 344).

image

I leave here the snippet of the class I have defined, in the case it might be useful to others, but also to check if defining the Ap list as I did is representative of the Kp I wanted to replicate. I have done this since I noticed that NRLMSISE00.getDensity() uses inputParams.getAp(date) (line 1180) and not the Kp.

Kp = 3.
ConstFlux = 120.

class ConstantModel(PythonNRLMSISE00InputParameters):
    def __init__(self):
        super(ConstantModel, self).__init__()

    def getAp(self, absoluteDate: AbsoluteDate) -> typing.List[float]:
        Ap = float(1/0.154 * np.sinh(Kp/1.89))
        return ([Ap, Ap, Ap, Ap, Ap, Ap, Ap])
    
    def getAverageFlux(self, absoluteDate: AbsoluteDate) -> float:
        return ConstFlux
    
    def getDailyFlux(self, absoluteDate: AbsoluteDate) -> float:
        return ConstFlux
    
    def getMaxDate(self):
        return initialDate.shiftedBy(10*365*24*60*60.) #to bypass the Date check
    
    def getMinDate(self):
        return initialDate.shiftedBy(0.0) #to bypass the Date check

inputParameters_Drag = ConstantModel()
atmosphere = NRLMSISE00(inputParameters_Drag, sun, earth)

Regards!

[1] 1. Jacchia, L. G. “CIRA 1972, recent atmospheric models, and improvements in progress.” COSPAR, 21st Plenary Meeting. Vol. 1. 1978.

2 Likes

Thanks for sharing your code @a_gior !