Better way of calculating elevation angle

68 views
Skip to first unread message

fiddys...@gmail.com

unread,
Aug 5, 2018, 8:25:01 AM8/5/18
to cesium-dev
I've written some code to calculate the range, azimuth and elevation between two points.
Sandcastle is here: https://goo.gl/WhCP5B
The values are printed to the console.

All the calculations work very accurately. I.e. when they are used to calculate the orientation of a cylinder, the start and end of the cylinder fall exactly on the source and target.

You'll notice though that toElevationRadiansNumerical() is not very elegant. It tries different elevation angles until it finds one that produces the expected target.

Is there a better (more concise) way to calculate the elevation angle yet still produce good results?

Gabby Getz

unread,
Aug 7, 2018, 4:57:30 PM8/7/18
to cesium-dev
Hi there,

While I'm no rocket scientist, after a search I found this previous thread thread. There, they suggest using the EllipsoidGeodesic class and in particular the startHeading property. 

Thanks, hopefully that helps!
Gabby

fiddys...@gmail.com

unread,
Aug 8, 2018, 1:52:19 AM8/8/18
to cesium-dev
Thanks Gabby,

The bearing is calculated using EllipsoidGeodesic and startHeading. I'm looking to improve the elevation calculation.

Cheers,
Fidel

Gabby Getz

unread,
Aug 9, 2018, 1:52:10 PM8/9/18
to cesium-dev
Sorry, I missed that! Like I said, I'm not familiar with the algorithms used here. I would try reaching out to the community members in that thread as they are likely more versed in this.
Reply all
Reply to author
Forward
0 new messages