[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Developers] Need a STOA detector



Hi Nathanael,

"Brown, Nathanael J K" <njbrown@sandia.gov> a écrit :

I need a detector that activates when the STOA (sun-target-observer angle) is less than a certain value. The closest solution I can find is using the AngularSeparationDetector, however, this appears to be using the SOT (sun-observer-target) angle for the proximity angle. Is there some way to relate the proximity angle in the AngularSeparationDetector to the STOA?

It is not possible directly.
It is however easy to create your own STOADetector class. You could
copy the existing AngularSeparationDetector class and look at the
g(final SpacecraftState s) method at the end. This is the method
that implicitly defines the event. The event is considered to
occur when the sign of the value returned by this method changes. So
in the current implementation (sun-observer-target angle), the methods
returns separation - proximityAngle with separation computed as:

final double separation = Vector3D.angle(sPV.getPosition().subtract(oPV.getPosition()), bPV.getPosition().subtract(oPV.getPosition()));

where sPV.getPosition() is the spacecraft position, bPV.getPosition() is
the beacon position (here it would be the Sun) and oPV.getPosition() is
the observer position.

So in your implementation, you would only need to change the computation
of separation as follows:

final double separation = Vector3D.angle(oPV.getPosition().subtract(sPV.getPosition()), bPV.getPosition().subtract(sPV.getPosition()));

that is you basically switch observer and spacecraft. The rest of the
class could remain the same (except for its documentation, of course).

Hope this helps,
Luc


Thanks,

Nathanael Brown