nvector._core.E_rotation

E_rotation(axes='e')[source][source]

Return rotation matrix R_Ee defining the axes of the coordinate frame E.

Parameters:
axes : ‘e’ or ‘E’

defines orientation of the axes of the coordinate frame E. Options are: ‘e’: z-axis points to the North Pole along the Earth’s rotation axis,

x-axis points towards the point where latitude = longitude = 0. This choice is very common in many fields.

‘E’: x-axis points to the North Pole along the Earth’s rotation axis,

y-axis points towards longitude +90deg (east) and latitude = 0. (the yz-plane coincides with the equatorial plane). This choice of axis ensures that at zero latitude and longitude, frame N (North-East-Down) has the same orientation as frame E. If roll/pitch/yaw are zero, also frame B (forward-starboard-down) has this orientation. In this manner, the axes of frame E is chosen to correspond with the axes of frame N and B. The functions in this library originally used this option.

Returns:
R_Ee : 3 x 3 array

rotation matrix defining the axes of the coordinate frame E as described in Table 2 in Gade (2010)

R_Ee controls the axes of the coordinate frame E (Earth-Centred,
Earth-Fixed, ECEF) used by the other functions in this library

Examples

>>> import numpy as np
>>> import nvector as nv
>>> np.allclose(nv.E_rotation(axes='e'), [[ 0,  0,  1],
...                                       [ 0,  1,  0],
...                                       [-1,  0,  0]])
True
>>> np.allclose(nv.E_rotation(axes='E'), [[ 1.,  0.,  0.],
...                                       [ 0.,  1.,  0.],
...                                       [ 0.,  0.,  1.]])
True