Calculate elevation angle as observed from the ground

274 views
Skip to first unread message

Fidel Perez-Smith

unread,
Jun 1, 2017, 9:47:28 AM6/1/17
to cesium-dev
Hi,

I have two points consisting of long/lat/height. I'd like to calculate the elevation angle (as though we were standing on the ground at the 1st point looking up at the 2nd point)


Ultimately I'm trying to adjust the pitch of the cone to match that of the blue line.

Any help would be greatly appreciated.

Thank you,
Fidel

Fidel Perez-Smith

unread,
Jun 5, 2017, 8:38:40 AM6/5/17
to cesium-dev
Kevin Ring suggested the following. Could someone please walk me through how this would be done in code?

If you're interested in the elevation angle as observed by a point on the ground, your plane of interest is probably the local horizontal plane. In other words, a plane with a normal parallel to the WGS84 ellipsoid surface normal. This plane isn't exactly the same as what a level would show you at that point on the Earth, but it's very close. To transform your target point in the Earth-fixed frame to this local horizontal plane, you can use Transforms.eastNorthUpToFixedFrame. That returns a Matrix4, which you then multiply your target point vector by, yielding a new vector. Normalize that vector, and then the elevation angle is simply asin(z) of the normalized vector.

Rachel Hwang

unread,
Jun 5, 2017, 11:17:04 AM6/5/17
to cesium-dev
Hi Fidel,


Best,
- Rachel

Fidel Perez-Smith

unread,
Jun 5, 2017, 8:04:08 PM6/5/17
to cesium-dev
Wow, that is perfect. Thanks Rachel
Reply all
Reply to author
Forward
0 new messages