FieldofView on x axis to detect planets along the tangent line

Hi All,

I’m new to this super cool library. I have done some tasks already listed below.

  1. define tle propagator.
  2. determine various Planet’s Lat/Lon in EME2000 frame at a given date
  3. define the camera fieldofview using circularfieldofview method
  4. propagate the S/C to the enddate.

What I don’t understand is how to find the planets in spacecraft FOV along the tangent line only, such that S/C’s camera is along x axis and I have to find the planet’s/stars rise and set events along the tangent line which I define manually (Tangent line here refers to looking at planets through earth atmosphere at certain predefined altitudes 0km-50km)

Implementation ideas would be much helpful.

I really appreciate any help you can provide. :slight_smile:

Hi @asuthoshcr,

Thanks and welcome to the Orekit community !!

Well done! :+1:

I guess you already found out the FieldOfViewDetector in the library.
That’s the one you’ll need; its attribute PVCoordinateProvider must be your planet/star.
For a planet you can use the CelestialBody class (ex. CelestialBody venus = CelestialBodyFactory.getVenus())

Now the difficulty will be to define the proper AttitudeProvider that will allow you to point the center of your FOV (x axis) towards your target altitude.

You can start with a LofOffset attitude provider with no rotation and the TNW LOF frame. That way your x axis will be along orbital velocity (T), z axis along orbital momentum (W) and y axis will complete the trihedron (y axis N will be along the opposite of orbital radius if your orbit is circular).
ex.: AttitudeProvider lofOffset = new LofOffset(inertialFrame, LOFType.TNW);
(here inertialFrame is your propagation frame)
→ Check that you have consistent rise/set events with this.
Note that the AttitudeProvider must be added to your propagator using method setAttitudeProvider(..)

From there you can rotate x axis around z axis to look down in the direction you want.
ex.: AttitudeProvider lofOffset = new LofOffset(inertialFrame, LOFType.TNW, RotationOrder.ZXY, FastMath.toRadians(10.), 0., 0.);
(Looking down 10 degrees)

A quick drawing for a circular orbit got me an angle cos(\theta)=\frac{R_t + h}{r} where r is the radius of the orbit. But I may be wrong.

I’m not sure we have examples for this in the tutorials, but you can look at the CircularFieldOfViewTest for pointers.

Good luck!
Maxime