- The virtual stick in MSDK V5 is simplified and encapsulated into a real "virtual RC". It is encapsulated by the KeySendVirtualStickFlightControlData.
- The connection between the app and RC is normal.
- The RC is under normal mode.
- The aircraft is not flying with an automated task such as waypointMission or RTH function.
- enableVirtualStick, enable the virtual stick.
- disableVirtualStick, disable the virtual stick.
- getLeftStick will give an instance of the left stick, the default operating mode is American style.
- getRightStick will give an instance of the right stick, the default operating mode is American style.
- setVirtualStickStateListener, set a listener of the state of the virtual stick.
- isVirtualStickEnable, to know whether the virtual stick is enabled.
- FlightControlAuthority, to know who has the flight control authority.
- FlightControlAuthorityChangeReason, to know the reason for flight control authority change.
【Logic of changing flight control authority】
- M30 series: The MSDK will gain the flight control authority by calling enableVirtualStick whoever has the flight control authority now. After calling disableVirtualStick, the MSDK will return its flight control authority to RC.
- M300: The MSDK can gain the flight control authority from RC only. The flight control authority chaos will occur if the MSDK has gained the flight control authority from OSDK. This is a bug and the product team has decided not to fix it.
【API flow diagram】
【How to use the virtual stick advanced mode】
- Some users still want to use the virtual stick similar to MSDK V4 which means they want to set verticalControlMode, rollPitchControlMode, yawControlMode, rollPitchCoordinateSystem, and sendVirtualStickAdvancedParamto control the aircraft.
- After setVirtualStickAdvancedModeEnabled, we suggest you call sendVirtualStickAdvancedParam in 5Hz.
- For detailed usage of advanced control parameters, please refer to Virtual stick.
- For advanced control parameter ranges, please refer to VirtualStickRange.
【Speed calculation formula】
- As mentioned earlier, VirtualStick of V5 is encapsulated by sendVirtualStickAdvancedParam , so the aircraft eventually receives the speed, there is a speed calculation formula between the offset and the speed, you can check the details in this article：Speed calculation formula.
Please sign in to leave a comment.