xradar is in an early stage of development, please report any issues here!

xradar.georeference.transforms.antenna_to_cartesian#

xradar.georeference.transforms.antenna_to_cartesian(ranges, azimuths, elevations, earth_radius=6371000, effective_radius_fraction=None, site_altitude=0)[source]#

Return Cartesian coordinates from antenna coordinates.

Parameters:
  • ranges (array-like) – Distances to the center of the radar gates (bins) in meters.

  • azimuths (array-like) – Azimuth angle of the radar in degrees.

  • elevations (array-like) – Elevation angle of the radar in degrees.

  • earth_radius (float) – Radius of the earth (default is 6371000 m).

  • effective_radius_fraction (float) – Fraction of earth to use for the effective radius (default is 4/3).

  • site_altitude (float) – Altitude amsl of radar site

Returns:

x, y, z (array) – Cartesian coordinates in meters from the radar.

Notes

The calculation for Cartesian coordinate is adapted from equations 2.28(b) and 2.28(c) of Doviak and Zrnić [1] assuming a standard atmosphere (4/3 Earth’s radius model).

\begin{gather*} z = \sqrt{r^2+R^2+2*r*R*sin(\theta_e)} - R \\ s = R * arcsin(\frac{r*cos(\theta_e)}{R+z}) \\ x = s * sin(\theta_a) \\ y = s * cos(\theta_a) \end{gather*}

Where r is the distance from the radar to the center of the gate, \(\theta_a\) is the azimuth angle, \(\theta_e\) is the elevation angle, s is the arc length, and R is the effective radius of the earth, taken to be 4/3 the mean radius of earth (6371 km).

References