Flight Question Target Elevation Angle

Wolf

Donator
Donator
Joined
Feb 10, 2008
Messages
1,094
Reaction score
26
Points
48
Location
Milan
Is there a way to get or derive the orbiting target elevation angle in Orbiter?
 
I'm not sure I understood the question: do you mean you're on the ground and you want to know the angle from the horizon of an orbiting vessel/object?
 
I've used this solution earlier to find the elevation angle of the Sun (SelectedObject) from the location of a vessel (FocusObject)
PHP:
oapiGetRelativePos(FocusObject, ReferenceObject, &StarReferenceVector);
oapiGetRelativePos(FocusObject, SelectedObject, &StarSelectedVector);
StarAngle = acos((StarSelectedVector.x * StarReferenceVector.x + StarSelectedVector.y * StarReferenceVector.y + StarSelectedVector.z * StarReferenceVector.z) / (length(StarSelectedVector) * length(StarReferenceVector))) - PI05;

It simply uses the two vectors towards the Earth [math]\vec{r_E}[/math] and towards the Sun [math]\vec{r_S}[/math] and finds the angle using the usual vector angle formula [math]\theta = \arccos {\frac{\vec{r_E} \cdot \vec{r_S}}{|\vec{r_E}| \cdot|\vec{r_S}|}}[/math], and then in the end subtract [math]\frac{\pi}{2}[/math] because I want the angle above the surface, not between Earth's centre and the Sun.

And then if you want to find out if the Sun (or any other object) is above the physical horizon (which will be below 0 degrees, as the Earth curves down under you), you use this extra set of code
PHP:
StarReferenceAngle = acos(oapiGetSize(ReferenceObject) / length(StarReferenceVector)); // Angle of horizon
if (StarAngle + StarReferenceAngle < 0)
	sprintf(StarIsOverHorizon, "Under");
else sprintf(StarIsOverHorizon, "Over");
 
Last edited:
Sorry for not being very clear with my question. I mean the elevation angle between the chaser and the target during orbit phasing for rendezvous operations
 
Sorry for not being very clear with my question. I mean the elevation angle between the chaser and the target during orbit phasing for rendezvous operations

manual method: Surface MFD, Read elevation on the pitch scale.
 
manual method: Surface MFD, Read elevation on the pitch scale.

Not sure I understand:I guess what you mean is you first need to point your nose (X axis) towards the target and then read your Pitch value which in a LVLH frame equals to the elev angle, is that correct?
If this is the way how can I do that with SSU in MM201 UNIVPTG? AFAIK TGT ID 1 (Orbit target) is not implemented yet...
 
Not sure I understand:I guess what you mean is you first need to point your nose (X axis) towards the target and then read your Pitch value which in a LVLH frame equals to the elev angle, is that correct?

Ah, you mean especially in SSU. Again, unless you need especially accurate calculations, you can do this by three methods right now:

- Rendezvouz radar
- HUD
- COAS.

The first one should be more accurate, but requires more math

If this is the way how can I do that with SSU in MM201 UNIVPTG? AFAIK TGT ID 1 (Orbit target) is not implemented yet...

I am working on it. :hailprobe:
 
Ah, you mean especially in SSU. Again, unless you need especially accurate calculations, you can do this by three methods right now:

- Rendezvouz radar
- HUD
- COAS.

The first one should be more accurate, but requires more math

I'd like to know the actual elevation angle in order to properly perform the -Z tracking of my target with the actual MM201 capability. If the value is for example +12° then I can use UNIVPTG with TGT ID=2 and Body Vector=5 and simply subracting the elevation angle to 360 (in this case P=348) will orient the Shuttle on a -Z track attitude
 
Last edited:
Yes - but unless you write a special Lua script for Orbiters LuaMFD interpreter, you would have to use wait for others to come up with a solution.
 
Back
Top