Flight

public struct Flight : Codable

Tracked data is aggregated and anonymized.

To group tracked data it’s attached to a corresponding flight. The set flight object is stored locally until removed.

  • dep

    Departure airport’s ICAO code.

    Declaration

    Swift

    public var dep: String
  • Destination airport’s ICAO code.

    Declaration

    Swift

    public var dest: String
  • Flight number is a combination of the airline’s ICAO code and 1-4 digit number.

    When there is no such number, use ORIG-DEST-GUID, where ORIG is the ICAO code of the departure airport, DEST is the ICAO code of the destination airport, GUID is a globally unique identifier.

    Declaration

    Swift

    public var fnum: String
  • SDK will send a current position when in the air that can be visible on the map.

    The full flight number can be visible for other pilots in the same company but will not be visible to other companies. However, the aircraft’s position can still be visible on the map in real time.

    The flight number can be hidden like “ICAO–”. Set this flag to true if the fnum is a generated number or a custom manually entered (not a real flight plan number), otherwise set true.

    The default is true.

    Declaration

    Swift

    public var fnumManual: Bool?
  • When running in the air without a flight set, the SDK can use a temporary flight to keep tracking data until a real flight is set.

    If no flight will be set the SDK will keep tracking data with the temp flight until landed. It is recommended to set a flight when can and the temp flight is like a backup to keep tracking the data.

    Declaration

    Swift

    public internal(set) var isTempFlight: Bool? { get }
  • Create a Flight object to associate tracked data with.

    Declaration

    Swift

    public init(dep: String = "",
                dest: String = "",
                fnum: String,
                fnumManual: Bool? = true)

    Parameters

    dep

    Departure airport’s ICAO code. Optional, but recommended to set.

    dest

    Destination airport’s ICAO code. Optional, but recommended to set.

    fnum

    Flight number. See fnum docs. Required.

    fnumManual

    Whether fnum is manually entered or generated. See fnumManual docs. Optional. The default is true.