TargetPointing Constraint

All -

Is there a suggested way to put a constraint on TargetPointing (e.g. only 30deg off nadir) or at least be able to analyze the geometry after accesses are computed?


Hi @JanzelO,

If you want to put a constraint on TargetPointing I think you’ll have to write your own custom AttitudeProvider.

Could you develop a little, I’m not sure I understand what you’re looking for.
If you want to get the angle between your target and the nadir direction you can do it in the getAttitude method of your AttitudeProvider, using the method getTargetPV of TargetPointing.
Then if you want to constrain the angle you’ll have to do it there too, and decide of a method to constrain it.

MaximeJ -

I’m not a dedicated Java programmer - more of a scientific programmer/engineer - so I’m still struggling on how to extend features in Orekit. I suppose I’ll dive into the source code for the Attitude provider to see if I could extend that class.

By “after” - I meant a way to compute positions of the satellite platform vs the target for a computed time interval (ex. an access time interval) without having to run the propagation again for during individual time slices, acquires geometries and compute the metrics that I’m interested in. Just inquiring if there may be a better (elegant) way to accomplish this rather than the method that I described.


Ok - I wanted to update this thread in case it helps others. I believe a new Event Detector would benefit my analysis. I’ve started digging into the Orekit source code to understand how Event Detectors are implemented. I’ve now created a new Event Detector entitled RangeDetector. I modeled the code from CircularFOVDetector. The inputs are a range threshold and a target location. Here is the declaration of the example constructor.

public RangeDetector( final PVCoordinatesProvider pvTarget, final double rangeThresh) {this ( DEFAULT_MAXCHECK , DEFAULT_THRESHOLD , DEFAULT_MAX_ITER , new ContinueOnEvent(), pvTarget, rangeThresh);

Now for the g function - I computed the vector distance between the spacecraft and the target position which I presume will both be in the same coordinate system. I wanted to ensure that the sign of g will be positive is the satellite is in range and negative elsewhere. Did I do all of this correctly?


final PVCoordinates satPV = s.getPVCoordinates();
final PVCoordinates targPV = targetPVProvider.getPVCoordinates(s.getDate(), s.getFrame()); // Coordinate in sc frame
final double dist = Vector3D.distance(satPV.getPosition(),targPV.getPosition());

return rangeThresh - dist;


It is correct. Only the comment in wrong, the coordinates will not be in spacecraft frame but in
the frame in which the spacecraft state is computed, which is the inertial frame used by the propagator.

Beware that the events will be triggered when target enter a sphere centered on spacecraft, regardless of the target being above or below horizon. This detector will therefore be best used combined with other detectors that check some masking effects.