【Introduction】
- This article will conclude a user manual for GimbalKey.
【Basic function】
- You can setup a listener for KeyGimbalAttitude to get the gimbal attitude. The 0 degree of pitch and roll angle means aircraft heading direction. The yaw degree is using N-E-D coordinate system. If you want to get the yaw angle of the gimbal related with the aircraft heading, you can use KeyYawRelativeToAircraftHeading.
- You can use a to configure the gimbal mode. Not all aircraft supports the 3 type of gimbal mode in GimbalMode enum, you need to double check with the DJI Pilot 2.
【Calibration】
- Normally we will calibrate the gimbal if the app is alert or there is a small gimbal offset after reseting it.
- You can use KeyGimbalCalibrate to start the gimbal self calibration, you can use KeyGimbalCalibrationStatus to view the calibration status.
- If the above calibration is effectless, you need to manually calibrate the gimbal through KeyFineTunePitchInDegrees, KeyFineTuneYawInDegrees and KeyFineTuneRollInDegrees. Every time you call these keys will make the gimbal offsets for 2 degrees. You can use KeyFineTunePitchTotalDegree, KeyFineTuneYawTotalDegree and KeyFineTuneRollTotalDegree to get the total offsets.
【Gimbal operation】
- The gimbal can rotate according to a specific angle by calling KeyRotateByAngle and rotate according to the angular speed.
- Call KeyGimbalReset will make the gimbal reset. Its input parameter GimbalResetType supports RECENTER,, PITCH_YAW, ONLY_PITCH, ONLY_ROLL, ONLY_YAW etc.
Comments
1 comment
I have a button which is used to rotate gimbal with angle rotate is 180 degrees. What should I do to code it? Thank you
Please sign in to leave a comment.