Interface FlightPlanPilotingItf

    • Method Detail

      • uploadFlightPlan

        void uploadFlightPlan​(@NonNull
                              File flightPlanFile)
        Uploads a Flight Plan file to the drone.

        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.

        Parameters:
        flightPlanFile - file to upload
        See Also:
        Parrot FlightPlan Mavlink documentation
      • activate

        boolean activate​(boolean restart)
        Activates this piloting interface and starts executing the uploaded flight plan.

        The interface should be idle for this method to have effect.
        If successful, the currently active piloting interface (if any) is deactivated and this one is activated.

        The flight plan is resumed if it's currently paused and the restart parameter is false; otherwise the flight plan is started from the beginning.

        Parameters:
        restart - true to force restarting the flight plan
        Returns:
        true on success, false in case the piloting interface cannot be activated at this point
      • getUnavailabilityReasons

        @NonNull
        Set<FlightPlanPilotingItf.UnavailabilityReason> getUnavailabilityReasons()
        Tells why this piloting interface may currently be unavailable.

        The returned set may contain values only if the interface is unavailable; it cannot be modified.

        Returns:
        the set of reasons that restrain this piloting interface from being available at present
      • getLatestActivationError

        @NonNull
        FlightPlanPilotingItf.ActivationError getLatestActivationError()
        Gets the error raised during the latest activation.
        Returns:
        the latest activation error
      • getLatestUploadState

        @NonNull
        FlightPlanPilotingItf.UploadState getLatestUploadState()
        Gets the latest Flight Plan file upload state.
        Returns:
        the latest file upload state
      • isFlightPlanFileKnown

        boolean isFlightPlanFileKnown()
        Tells whether the current flight plan on the drone is the latest one that has been uploaded from the application.
        Returns:
        true if the drone flight plan is the latest known one, otherwise false
      • isPaused

        boolean isPaused()
        Tells whether the uploaded flight plan is currently paused.

        A flight plan can be resumed if its execution has previously been paused, and not stopped for any reason (like another automatic flying mode).

        Returns:
        true if flight plan is paused, otherwise false
      • getLatestMissionItemExecuted

        int getLatestMissionItemExecuted()
        Gets the index of the latest mission item completed.
        Returns:
        the latest mission item executed index, or -1 if no item has been executed yet
      • getReturnHomeOnDisconnect

        @NonNull
        FlightPlanPilotingItf.ReturnHomeOnDisconnectSetting getReturnHomeOnDisconnect()
        Gets current setting for the drone behavior upon disconnection during execution of a Flight Plan.

        When enabled, the drone returns to home upon disconnection during execution of a Flight Plan. Otherwise, the drone will continue executing the Flight Plan even after controller disconnection.

        Depending on the drone configuration, this setting may be read-only and cannot be changed by the application. This can be checked using FlightPlanPilotingItf.ReturnHomeOnDisconnectSetting.isMutable() method.

        Returns:
        the return home on disconnect setting