code: def enu2aer(e, n, u, deg: bool = True) -> tuple:
      """
      ENU to Azimuth, Elevation, Range
  
      Parameters
      ----------
  
      e : float
          ENU East coordinate (meters)
      n : float
          ENU North coordinate (meters)
      u : float
          ENU Up coordinate (meters)
      deg : bool, optional
          degrees input/output  (False: radians in/out)
  
      Results
      -------
  
      azimuth : float
          azimuth to rarget
      elevation : float
          elevation to target
      srange : float
          slant range [meters]
      """
  
      # 1 millimeter precision for singularity stability
  
      try:
          e[abs(e) < 1e-3] = 0.0
          n[abs(n) < 1e-3] = 0.0
          u[abs(u) < 1e-3] = 0.0
      except TypeError:
          if abs(e) < 1e-3:
              e = 0.0
          if abs(n) < 1e-3:
              n = 0.0
          if abs(u) < 1e-3:
              u = 0.0
  
      r = hypot(e, n)
      slantRange = hypot(r, u)
      elev = atan2(u, r)
      az = atan2(e, n) % tau
  
      if deg:
          az = degrees(az)
          elev = degrees(elev)
  
      return az, elev, slantRange
  
file_path: pymap3d/src/pymap3d/enu.py
imports: from __future__ import annotations
  from math import tau
  from .ecef import ecef2geodetic, enu2ecef, geodetic2ecef, uvw2enu
  from .ellipsoid import Ellipsoid
  from .mathfun import atan2, cos, degrees, hypot, radians, sin
label_desc: Use image node_id 1 for calling a global function with example usage: enu2aer(e, n, u, deg) and returns: az,  elev,  slantRange