eatc-airspace - v0.0.1
    Preparing search index...

    Class Fix

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • latitude: number

        The latitude, in degrees, of this fix.

      • longitude: number

        The longitude, in degrees, of this fix.

      Returns Fix

    Properties

    latitude: number

    The latitude, in degrees, of this fix.

    longitude: number

    The longitude, in degrees, of this fix.

    FT: 0.3048

    Feet in a metre.

    NMI: 1852

    Metres in a nautical mile.

    R: 6371000 = 6371e3

    Mean radius of Earth, in metres.

    Methods

    • Find the intersection point given two start points and bearings from those points.

      Parameters

      • bearing: number

        The bearing from this fix, in degrees from true north.

      • other: Fix

        The other fix.

      • otherBearing: number

        The bearing from the other fix, in degrees from true north.

      Returns Fix

      A new Fix at the intersection point.

    • Find the destination point from the current position given a bearing and distance.

      Uses the haversine formula to compute the new latitude and longitude after travelling a specified distance along a given bearing on the Earth’s surface.

      Parameters

      • bearing: number

        The bearing from this fix, in degrees from true north.

      • distance: number

        The distance, in nautical miles.

      Returns Fix

      A new Fix at the destination point.

    • Find the great circle distance between two fixes.

      Parameters

      • other: Fix

        The other fix.

      Returns number

      The distance between the two fixes, in metres.

    • Find the initial bearing (forward azimuth) from this fix to another.

      Parameters

      • other: Fix

        The other fix.

      Returns number

      The initial bearing (forward azimuth), in degrees from true north.

    • Get the three-dimensional cartesian coordinates of this fix.

      Returns [x: number, y: number, z: number]

    • Get the coordinates of this fix in radians.

      Returns [φ: number, λ: number]

    • Convert degrees to radians.

      Parameters

      • deg: number

        Degrees.

      Returns number

      Radians.

    • Create a fix from 3-dimensional cartesian coordinates.

      Parameters

      • coordinates: readonly [number, number, number]

        3D cartesian coordinates.

      Returns Fix

    • Create fix from DMS coordinates string.

      This method accepts a wide range of formats and notations for DMS (degrees, minutes, seconds) coordinates. However, the following criteria must always be satisfied:

      • Degrees, minutes, and seconds must all be present (even if 0), and in that order.
      • Degrees ∈ [0, 180).
      • Minutes ∈ [0, 60).
      • Seconds ∈ [0, 60).
      • A cardinal direction must be indicated by the first occurrence of either a case-insensitive character N, E, S, or W, or a ‘+’, dash (‘-’), or minus (‘−’) sign, present anywhere in the coordinate string.

      Parameters

      • latitude: string

        Latitude in DMS.

      • longitude: string

        Longitude in DMS.

      Returns Fix

      fromDMS("512930N", "0011311W")
      
      fromDMS("512839.63N", "0002559.82W")
      
      fromDMS("51° 34' 45.0732\" N", "0° 36' 29.8230\" E")
      
    • Create a new fix from latitude and longitude in radians.

      Parameters

      • φ: number

        Latitude, in radians.

      • λ: number

        Longitude, in radians.

      Returns Fix

    • Convert radians to degrees.

      Parameters

      • rad: number

        Radians.

      Returns number

      Degrees.