You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cesiu...@googlegroups.com
Hello, I am currently working on how to find the azimuth with only having information about two points on the globe. The information available due to previous code are longitude, latitude, altitude, and the distance in kilometers between the two points.
I have constructed equations and logical statements to help derive the angle, yet these are not working. Does anybody have an idea as to what is wrong with the code or if there is an easier way to go about solving this problem?
var geodesic = new Cesium.EllipsoidGeodesic(positions[0], positions[1]); var Dist = (((geodesic.surfaceDistance.toFixed(2))/1000)); var lat1= positions[1].latitude; var lat0= positions[0].latitude; var lon1= positions[1].longitude; var lon0= positions[0].longitude; var yDist= Math.abs(lat1 - lat0)*(111.2); var b = Math.acos(Math.cos(90- lat1)*Math.cos(90- lat0) + Math.sin(90-lat1)*Math.sin(90-lat1)*Math.cos(lon1- lon0)); var azi = Math.asin(Math.sin(90-lat1)*Math.sin(lon1-lon0)/Math.sin(b));
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cesiu...@googlegroups.com
Yes, thank you I was not aware of that function. Now the problem is that I cannot manipulate the numbers outputted by startHeading. Any idea why that could be?
Thanks,
Andrew
Willem van der Gugten
unread,
Jul 9, 2015, 2:13:29 PM7/9/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cesiu...@googlegroups.com
The startHeading is probably read-only, it gets the heading at the initial point. EllipsoidGeodesic() defines a geodesic between the two points.
Not sure what you want to achieve, the coordinates of the end-point given the start-point, heading and distance?