Interface GuidedPilotingItf

    • Method Detail

      • getUnavailabilityReasons

        @NonNull
        Set<GuidedPilotingItf.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
      • getCurrentDirective

        @Nullable
        GuidedPilotingItf.Directive getCurrentDirective()
        Retrieves the current guided flight directive.

        This method returns the current guided flight directive, if any. It can be either LocationDirective or RelativeMoveDirective. The flight parameters have the values returned by the drone.

        Returns:
        the current guided flight directive, or null if there's no guided flight in progress
      • getLatestFinishedFlightInfo

        @Nullable
        GuidedPilotingItf.FinishedFlightInfo getLatestFinishedFlightInfo()
        Retrieves the latest terminated guided flight information.

        This method returns information about the latest finished guided flight, if any. It can be either FinishedLocationFlightInfo or FinishedRelativeMoveFlightInfo.
        It contains the initial directive, the final state of the flight and, for a relative move, the move that the drone actually did.

        Returns:
        the latest terminated guided flight information, or null if no such flight has been requested
      • moveToLocation

        @Deprecated
        default void moveToLocation​(double latitude,
                                    double longitude,
                                    double altitude,
                                    @NonNull
                                    GuidedPilotingItf.LocationDirective.Orientation orientation)
        Deprecated.
        DEPRECATED. Use move(Directive) instead.

        Starts a location guided flight.

        Move the drone to a specified location, and rotate heading to the specified value.

        The interface will immediately change to Activable.State.ACTIVE, and then to Activable.State.IDLE when the drone reaches its destination or is stopped. It also becomes Activable.State.IDLE in case of error.

        If this method is called while the previous guided flight is still in progress, it will be stopped immediately and the new guided flight is started.

        In case of drone disconnection, the guided flight is interrupted.

        Parameters:
        latitude - latitude of the location (in degrees) to reach
        longitude - longitude of the location (in degrees) to reach
        altitude - altitude above take off point (in meters) to reach
        orientation - orientation of the location guided flight
      • moveToRelativePosition

        @Deprecated
        default void moveToRelativePosition​(double forwardComponent,
                                            double rightComponent,
                                            double downwardComponent,
                                            double headingRotation)
        Deprecated.
        DEPRECATED. Use move(Directive) instead.

        Starts a relative move guided flight.

        Rotate heading by a given angle, and then move the drone to a relative position.
        Moves are relative to the current drone orientation (drone's reference).
        Also note that the given rotation will not modify the move (i.e. moves are always rectilinear).

        The interface will immediately change to Activable.State.ACTIVE, and then to Activable.State.IDLE when the drone reaches its destination or is stopped. It also becomes Activable.State.IDLE in case of error.

        If this method is called while the previous guided flight is still in progress, it will be stopped immediately and the new guided flight is started.

        In case of drone disconnection, the guided flight is interrupted.

        Parameters:
        forwardComponent - desired displacement along the front axis, in meters. Use a negative value for a backward move
        rightComponent - desired displacement along the right axis, in meters. Use a negative value for a left move
        downwardComponent - desired displacement along the down axis, in meters. Use a negative value for an upward move
        headingRotation - desired relative rotation of heading, in degrees (clockwise)