DJI Mobile SDK Documentation

      class FlightControlData

      @EXClassNullAway
      class FlightControlData
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Contains all the virtual stick control data needed to move the aircraft in all directions.

      Class Members:
      method
      method getPitch
      float getPitch()
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Gets aircraft's velocity (m/s) along the y-axis or angle value (in degrees) for pitch. Use RollPitchControlMode to set the velocity or angle mode. Note that the argument has different meanings in different coordinate systems. See the Flight Controller User Guide for more information.

      Return:
      floatThe Velocity (m/s) or Angle (degrees) value for pitch.
      method
      method setPitch
      void setPitch(float pitch)
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Sets the aircraft's velocity (m/s) along the y-axis or angle value (in degrees) for pitch. Use RollPitchControlMode to set the velocity or angle mode. Note that the argument has different meanings in different coordinate systems. See the Flight Controller User Guide for more information.

      Input Parameters:
      float pitchThe velocity (m/s) or angle (degrees) value for pitch
      method
      method getRoll
      float getRoll()
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Gets aircraft's velocity (m/s) along the x-axis or angle value (in degrees) for roll. Use RollPitchControlMode to set the velocity or angle mode. Note that the argument has different meanings in different coordinate systems. See the Flight Controller User Guide for more information.

      Return:
      floatThe velocity (m/s) or angle (degrees) value for roll.
      method
      method setRoll
      void setRoll(float roll)
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Sets the aircraft's velocity (m/s) along the x-axis or angle value (in degrees) for roll. Use RollPitchControlMode to set the velocity or angle mode. Note that the argument has different meanings in different coordinate systems. See the Flight Controller User Guide for more information.

      Input Parameters:
      float rollThe velocity (m/s) or angle (degrees) value for roll.
      method
      method getYaw
      float getYaw()
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Angular velocity (degrees/s) or angle (degrees) value for yaw. Use YawControlMode to set angular velocity or angle mode.

      Return:
      floatThe angular velocity (degrees/s) or angle (degrees) value for yaw.
      method
      method setYaw
      void setYaw(float yaw)
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Sets the angular velocity (degrees/s) or angle (degrees) value for yaw. Use YawControlMode to set angular velocity or angle mode.

      Input Parameters:
      float yawThe angular velocity (degrees/s) or angle (degrees) value for yaw.
      method getVerticalThrottle
      float getVerticalThrottle()
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Gets aircraft's velocity (m/s) or altitude (m) value for verticalControl. Use VerticalControlMode to set velocity or altitude mode.

      Return:
      floatThe velocity (m/s) or altitude (m) value for verticalControl.
      method setVerticalThrottle
      void setVerticalThrottle(float verticalThrottle)
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Sets the aircraft's velocity (m/s) or altitude (m) value for verticalControl. Use VerticalControlMode to set velocity or altitude mode.

      Input Parameters:
      float verticalThrottleThe velocity (m/s) or altitude (m) value for verticalControl.
      method FlightControlData
      FlightControlData(float pitch, float roll, float yaw, float verticalThrottle)
      Package:dji.common.flightcontroller.virtualstick
      Description:

      Constructor for the flight control data to send through virtual sticks.

      Input Parameters:
      float pitchThe velocity (m/s) or angle (degrees) value for pitch
      float rollThe velocity (m/s) or angle (degrees) value for roll.
      float yawThe angular velocity (degrees/s) or angle (degrees) value for yaw.
      float verticalThrottleThe velocity (m/s) or altitude (m) value for verticalControl.