I’ve run into a problem with frame transformation which makes me wonder if I conceptually misunderstood something. Maybe you can help? I’d like the AzEl of a satellite vector in the Topocentric Frame of a ground station. I tried two different methods, but they don’t agree and I don’t understand why.
There are several conventions to define azimuth. From the top of my mind, Orekit’s one is to measure it from the north pointing vector. So it’s not equal to the so called alpha angle of Hipparchus’ Vector3D in the topocentric frame.
Hi Romain, thanks for the comment. I looked at the source of the TopocentricFrame.getElevation() / getAzimuth() methods, and you’re right they use different definitions than the Vector3D.delta / .alpha attributes. In the end, I used my own calculation instead - below in case this is helpful to anybody:
elv = asin(vec.x/vec.norm)
azm = atan2(vec.y, vec.z)
This yields elevation above/below the (y,z) plane, and azimuth around the x-axis, from the position vector of the object being viewed in the same (local) frame.
Hum the thing is that in Orekit’s topocentric frame, Z is the zenith direction, so your code doesn’t yield an elevation (a.k.a. altitude) as understood for angular measurements. As hinted in your first post, elevation actually is Vector3D’s delta.
Agree, as you said it depends on how (relative to what plane) you define it. The equations above are for az/el relative to the y/z plane, with the y-axis marking zero azimuth. In the Topocentric frame as Orekit uses it, it’s the x/y plane, with x pointing north defining the zero azm angle.
I’ve used this for both a ground station (Topocentric, Az/El relative to x/y plane) and a satellite (Local Vertical Local Horizontal frame, AzEl in y/z plane) and the results look consistent.