5.2.17. nvector.core.n_EA_E_distance_and_azimuth2n_EB_E

n_EA_E_distance_and_azimuth2n_EB_E(n_EA_E, distance_rad, azimuth, R_Ee=None)[source]

Returns position B from azimuth and distance from position A

Parameters
n_EA_E: 3 x n array

n-vector(s) [no unit] of position A decomposed in E.

distance_rad: n, array

great circle distance [rad] from position A to B

azimuth: n array

Angle [rad] the line makes with a meridian, taken clockwise from north.

Returns
n_EB_E: 3 x n array

n-vector(s) [no unit] of position B decomposed in E.

Notes

The result for spherical Earth is returned.

Examples

Example 8: “A and azimuth/distance to B”

https://raw.githubusercontent.com/pbrod/Nvector/master/docs/tutorials/images/ex8img.png

We have an initial position A, direction of travel given as an azimuth (bearing) relative to north (clockwise), and finally the distance to travel along a great circle given as sAB. Use Earth radius 6371e3 m to find the destination point B.

In geodesy this is known as “The first geodetic problem” or “The direct geodetic problem” for a sphere, and we see that this is similar to Example 2, but now the delta is given as an azimuth and a great circle distance. (“The second/inverse geodetic problem” for a sphere is already solved in Examples 1 and 5.)

Solution:
>>> import nvector as nv
>>> from nvector import rad, deg
>>> lat, lon = rad(80), rad(-90)
>>> n_EA_E = nv.lat_lon2n_E(lat, lon)
>>> azimuth = rad(200)
>>> s_AB = 1000.0  # [m]
>>> r_earth = 6371e3  # [m], mean earth radius
>>> distance_rad = s_AB / r_earth
>>> n_EB_E = nv.n_EA_E_distance_and_azimuth2n_EB_E(n_EA_E, distance_rad, azimuth)
>>> lat_EB, lon_EB = nv.n_E2lat_lon(n_EB_E)
>>> lat, lon = deg(lat_EB), deg(lon_EB)
>>> msg = 'Ex8, Destination: lat, lon = {:4.4f} deg, {:4.4f} deg'
>>> msg.format(lat[0], lon[0])
'Ex8, Destination: lat, lon = 79.9915 deg, -90.0177 deg'