CoordinatePath

public struct CoordinatePath : Codable

Represents one leg of a flight path.

Representing one leg of a flight path using either:

  • A station String
  • The starting point and the ending point

When using the station string, the four digit airport is the starting point. The ending point is the is the next leg station string.

  • leg

    The leg of the journey. Organized ascending and this number should be a positive interger.

    Declaration

    Swift

    public var leg: Int
  • The starting coordinate for the leg

    Declaration

    Swift

    public var endPoint: Coordinates?
  • The ending coordinate for the leg

    Declaration

    Swift

    public var startPoint: Coordinates?
  • The station string for the airport

    Declaration

    Swift

    public var stationString: String?
  • The default initilaizer.

    Declaration

    Swift

    public init()

    Return Value

    An initialized CoordinatePath object.

  • Initializer with all variables.

    Declaration

    Swift

    public init(_ leg: Int = 1, _ startPoint: Coordinates?, _ endPoint: Coordinates?, _ stationString: String?)

    Parameters

    leg

    Int representing the leg of the journey

    startPoint

    The Coordinates object representing the latitude and longitude of the starting point.

    endPoint

    The Coordinates object representing the latitude and longitude of the ending point.

    stationString

    The four character station string for the airport.

    Return Value

    An initialized CoordinatePath object.