Relative position of satellite from camera

Hello All,

I’m trying to simulate a scenario where I detect the passage of a slave satellite in the field-of-view of a camera onboard a master satellite. I’m trying to do so by using the InterSatDirectViewDetector combined with the FieldOfViewDetector (and combined with the logical not). I have a couple of questions, and would much appreciate any possible feedback:

  1. I see from the InterSatDirectViewDetector that the master and slave propagators shall not run in a propagators parallelizer. Shall I then propagate them side by side in a loop?
  2. Since the target is a spacecraft, I’m not sure how define the target in the FieldOfViewDetector. The input is a PVCoordinatesProvider, so should I define the detector in a propagation loop and retrieve the PV coordinates of the slave propagator with getPVCoordinates()? It doesn’t seem efficient this way;
  3. Am I implementing correctly the combination of the InterSatDirectViewDetector with the FieldOfViewDetector? The code is below;
  4. Finally, what I want to achieve is actually the XY positions of the target spacecraft from the camera sensor point-of-view. I don’t need at this point to define pixels in the camera, but need to get the orbit path as a X-Y plot of the camera. Is that possible via Orekit?

Below is my implementation of the final detector:

interSatDetector = InterSatDirectViewDetector(earth,propSlaveSat).withHandler(ContinueOnEvent())

masterSensorFOV = DoubleDihedraFieldOfView(center, Vector3D vec1, radians(halfAngleX),
		Vector3D vec2, radians(halfAngleY), margin)
fovDetector = FieldOfViewDetector(PVCoordinatesProvider target, masterSensorFOV).withHandler(ContinueOnEvent())
finalDetector = BooleanDetector.andCombine([

Hoping it’s not too many questions, thank you very much in advance.


Hello @leoghizoni,

I’ll try to answer your questions :

  1. Indeed, both objects should not run in a propagator parallelizer to avoid recursive call of each other propagate method. The best way is to either use an analytical propagator for both or, and this is the most generic way, to compute and save their ephemeris beforehand.
  2. Following 1/, the generated ephemeris will be a BoundedPropagator which itself extends Propagator which again, extends PVCoordinatesProvider. Hence you’ll simply use previously computed ephemeris as input.
  3. You’ll have to modify your code according to points 1/ and 2/ but you didn’t make any obvious mistake i think.
  4. To do so, you’ll have to project the position of the slave satellite on a plane which origin will be the camera, with its normal vector being colinear to the camera direction.

Hope that my answers were understandable :sweat_smile:.

Forgot to say for 4/ that you can do it in a custom step handler to save these coordinates




I had a similar problem not too long ago! To not repeat too much I’ll just link you thread in which @Vincent and @MaximeJ were very helpful: I know that this example does not answer all your questions but there you can find working examples for similar problem.

1 Like