I have a position on Earth (πππ‘1,πππ1,π π) of which I want to project a straight line with a known azimuth and elevation to a certain altitude, π. Thus obtaining new coordinates on the projected sphere, (πππ‘2,πππ2,π π+π).
How do I calculate πππ‘2 and πππ2 with all other information available?
Altitude change does not influence on azimuth (as projection of path onto sphere), so you can use Destination point given distance and bearing from start point
section from here to get final coordinates from start coordinates and bearing:
Formula:
Ο2 = asin( sin Ο1 β
cos Ξ΄ + cos Ο1 β
sin Ξ΄ β
cos ΞΈ )
Ξ»2 = Ξ»1 + atan2( sin ΞΈ β
sin Ξ΄ β
cos Ο1, cos Ξ΄ β sin Ο1 β
sin Ο2 )
where Ο is latitude, Ξ» is longitude, ΞΈ is the bearing (clockwise from north),
Ξ΄ is the angular distance d/R; d being the distance travelled, R the earthβs radius
JavaScript: (all angles in radians)
var Ο2 = Math.asin( Math.sin(Ο1)*Math.cos(d/R) +
Math.cos(Ο1)*Math.sin(d/R)*Math.cos(brng) );
var Ξ»2 = Ξ»1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(Ο1),
Math.cos(d/R)-Math.sin(Ο1)*Math.sin(Ο2));
The longitude can be normalised to β180β¦+180 using (lon+540)%360-180