The recommended configuration of virtual stick:
mFlightController.setVerticalControlMode(VerticalControlMode.VELOCITY);
mFlightController.setRollPitchControlMode(RollPitchControlMode.VELOCITY);
mFlightController.setYawControlMode(YawControlMode.ANGULAR_VELOCITY);
mFlightController.setRollPitchCoordinateSystem(FlightCoordinateSystem.BODY);
Also, the name of method is inverted by some historical reason, you need to call like this.
flightControlData.setPitch(roll);
flightControlData.setRoll(pitch);
flightControlData.setYaw(yaw);
flightControlData.setVerticalThrottle(throttle);
Note: if you set setRollPitchControlMode as ANGLE, there is no inversion.
flightControlData.setPitch(pitch);
flightControlData.setRoll(roll);
flightControlData.setYaw(yaw);
flightControlData.setVerticalThrottle(throttle);
Comments
0 comments
Please sign in to leave a comment.