nenupy.astro.astro_tools.etrs_to_enu

nenupy.astro.astro_tools.etrs_to_enu(positions, location=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]

Local east, north, up (ENU) coordinates centered on the position location.

The conversion from cartesian coordinates \((x, y, z)\) to ENU \((e, n, u)\) is done as follows:

\[\begin{split}\pmatrix{ e \\ n \\ u } = \pmatrix{ -\sin(b) & \cos(l) & 0\\ -\sin(l) \cos(b) & -\sin(l) \sin(b) & \cos(l)\\ \cos(l)\cos(b) & \cos(l) \sin(b) & \sin(l) } \pmatrix{ \delta x\\ \delta y\\ \delta z }\end{split}\]

where \(b\) is the longitude, \(l\) is the latitude and \((\delta x, \delta y, \delta z)\) are the cartesian coordinates with respect to the center location.

Parameters:
  • positions (ndarray) – ETRS positions

  • location (EarthLocation) – Center of ENU frame. Default is NenuFAR’s location.

Returns:

Wavelength in meters, same shape as frequency.

Return type:

ndarray

Example:
from nenupy import nenufar_position
from nenupy.astro import etrs_to_enu

etrs_positions = np.array([
    [4323934.57369062,  165585.71569665, 4670345.01314493],
    [4323949.24009871,  165567.70236494, 4670332.18016874]
])
enu = etrs_to_enu(
    positions=etrs_positions,
    location=nenufar_position
)