GSFlightPlanPilotingItf

@objc
public protocol GSFlightPlanPilotingItf : ActivablePilotingItf, PilotingItf
- Note: This protocol is for Objective-C only. Swift must use the protocol `FlightPlanPilotingItf`.
  • Latest flight plan file upload state.

    Declaration

    Swift

    var latestUploadState: FlightPlanFileUploadState { get }
  • Index of the latest mission item completed.

    Negative value when not available.

    Declaration

    Swift

    @objc(latestMissionItemExecuted)
    var gsLatestMissionItemExecuted: Int { get }
  • Error raised during the latest activation.

    It is put back to .none as soon as activate(restart:) is called.

    Declaration

    Swift

    var latestActivationError: FlightPlanActivationError { get }
  • Whether the current flight plan on the drone is the latest one that has been uploaded from the application.

    Declaration

    Swift

    var flightPlanFileIsKnown: Bool { get }
  • Whether the flight plan is currently paused.

    If true, the restart parameter of activate(restart:) can be set to false to resume the flight plan instead of playing it from the beginning. If isPaused is false, this parameter will be ignored and the flight plan will be played from its beginning.

    When this piloting interface is deactivated, any currently playing flight plan will be paused.

    Declaration

    Swift

    var isPaused: Bool { get }
  • Uploads a Flight Plan file to the drone. When the upload ends, if all other necessary conditions hold (GPS location acquired, drone properly calibrated), then the interface becomes idle and the Flight Plan is ready to be executed.

    Declaration

    Swift

    func uploadFlightPlan(filepath: String)

    Parameters

    filepath

    local path of the file to upload

  • Activates this piloting interface and starts executing the uploaded flight plan.

    The interface should be .idle for this method to have effect. The flight plan is resumed if the restart parameter is false and isPaused is true. Otherwise, the flight plan is restarted from its beginning.

    If successful, it deactivates the current piloting interface and activate this one.

    Declaration

    Swift

    func activate(restart: Bool) -> Bool

    Parameters

    restart

    true to force restarting the flight plan. If isPaused is false, this parameter will be ignored.

    Return Value

    true on success, false if the piloting interface can’t be activated

  • Tells whether a given reason is partly responsible of the unavailable state of this piloting interface.

    Declaration

    Swift

    func hasUnavailabilityReason(_ reason: FlightPlanUnavailabilityReason) -> Bool

    Parameters

    reason

    the reason to query

    Return Value

    true if the piloting interface is partly unavailable because of the given reason.