Understanding purpose of Thrust Direction And Attitude Provider when setting up a maneuver

I am setting up a script to compute and apply low thrust maneuvers to my satellite. I have set up my custom maneuver as follows:

# Set up thrust direction and attitude provider
    thrustDirProvider = ThrustDirectionAndAttitudeProvider.buildFromDirectionInLOF(
                    LOFType.QSW,    # local orbital frame (QSW frame is same as RTN )
                    thrustDirectionProvider,  # variableDirectionInFrame
                    Vector3D.MINUS_I  # thrusterAxisInSatelliteFrame
                )

    # Define custom maneuver and add to propagator
    customManeuver = Maneuver(thrustDirProvider, maneuverTrigger, customPropulsionModel)
    propagator_num.addForceModel(customManeuver)

My script works. However, i am unable to understand the purpose of the ThrustDirectionAndAttitudeProvider being used. I have also noticed that changing the thrusterAxisInSatelliteFrame from Vector3D.MINUS_I to Vector3D.MINUS_J doesn’t change the output (orbital elements) of the simulation

Can someone explain what this ThrustDirectionAndAttitudeProvider does during propagation?

Additional info: In my script getDirection() and getThrustVector() methods of my custom PropulsionModel are already set up to return the thrust vector and thrust direction in satellite frame. And computeThrustDirection() method in my custom ThrustDirectionProvider returns the thrust direction in local orbit (RTN) frame.

Hi there,

I would advise you not to use ThrustDirectionAndAttitudeProvider.
You can use any ThrustPropulsionModel in Maneuver and pass an AttitudeProvider as override if need be (otherwise it will use the SpacecraftState Attitude).

Cheersr,
Romain.

Hi Romain,

Thank you for your response. Is there a specific reason you ask me not to use the ThrustDirectionAndAttitudeProvider ?

The description of this class says this “manages” both the attitude of the satellite and the direction of thrust. Does this mean that this sets the attitude of the satellite according to the required thrust direction?

Hi,

ThrustDirectionAndAttitudeProvider is made for use with ConfigurableLowThrustManeuver, which is obsolete and has been removed on the develop branch.

The class Maneuver that you are already using is the one to go with. It takes three arguments:

  • Maneuver triggers. The simplest one is DateBasedManeuverTrigger that fires on a given time interval.
  • A propulsion model. If your thrust vector is constant in a given frame (not necessarily inertial), you can use BasicConstantThrustPropulsionModel
  • An optional (can be null) AttitudeProvider. If null, the attitude from the propagation will be used. If non-null, the provider you’re passing will be used. For example if you pass new LofOffset(frame, LofType.QSW) it will assume the thrust vector is given the QSW

Cheers,
Romain.

Hi Romain @Serrof ,

I have a couple follow-up question for you on using the ThrustPropulsionModel and defining a custom Maneuver class.

  1. If i need to use a fixed spacecraft attitude during maneuvers, should i provide that attitude in defining the customManeuver (in place of “None” as i am currently using)?
customManeuver = Maneuver(None, maneuverTrigger, customPropulsionModel)
propagator_num.addForceModel(customManeuver)
  1. Is this the only place where the fixed maneuver attitude needs to be defined?
    My getAcceleration method in the ThrustPropulsionModel clas currently returns the acceleration in the spacecraft frame as follows:
def getAcceleration(self, s, maneuverAttitude, params):
        '''
        get the acceleration vector in spacecraft frame
        '''
        thrust_vector = self.getThrustVector(s)
        acceleration = thrust_vector.scalarMultiply(1.0 / s.getMass())

        return acceleration

However i notice that the methods’s description says “Get the acceleration of the spacecraft during maneuver and in maneuver frame. Acceleration is computed here using the thrust vector in S/C frame.” Do I need to update my getAcceleration function with the required fixed attitude during maneuver?

Apologies if my questions were silly. I am not very clear on how orekit is using attitude internally, particularly since till now i wasn’t defining a specific attitude and had been using the default s/c attitude where needed.

Any advice will be much appreciated.

Hi there,

The getAcceleration method returns a vector in the s.getFrame() where s is the SpacecraftState given as input. So basically your propagation frame, usually inertial

If the satellite always uses the same attitude mode, you can define it at propagator’s level via the AttitudeProvider and it will be used by the Maneuver. But if you have a specific orientation, like in a local orbital frame, you should pass this so-called override to Maneuver. It will only be used inside the force model so it won’t affect the Attitude. Hope this helps.

Cheers,
Romain.