Topocentric position from "azelra" coordinates

Hi all,

how to go from TrackingCoordinates (or something equivalent) to the topocentric, Cartesian position vector?

By looking at the code in TopocentricFrame, I came up with that:

TrackingCoordinates tc;
final SinCos scAz  = FastMath.sinCos(tc.getAzimuth());
final SinCos scEl  = FastMath.sinCos(tc.getElevation());
final Vector3D topocentricPosition = new Vector3D(scEl.cos() * scAz.sin(), scEl.cos() * scAz.cos(), scEl.sin()).scalarMultiply(tc.getRange());

So first is it correct? And then is there a native way to do it in Orekit?
If no, we should probably add it.

Cheers,
Romain.

See this thread

There is no way to do it in Orekit, but for sure it should be something we add in 12.1.

Well the reference thread is for the transform from satellite to ground, but the idea seems similar to me: in fact we should have both computations available.

Thanks for your answer Luc.

I’ve created this issue for my original question.

As usual, contributions welcomed!

Cheers,
Romain.

Hey Romain,

The Vector3D class has a constructor that takes az and el (alpha, delta)? You should be able to use that, then scalar multiply the result by range. Just be careful that alpha is the mathematical angle (anti-clockwise from the x-axis, or East in your case) and az usually means clockwise from North.

Mark.

1 Like