Get Heading
已完成Hi good day,
May i know what the best way to get drone heading in degrees?
and please advise me on how to call the function. thank you.
-
After successful registration, you can get the connected aircraft by getProduct(note that you need to convert the product object to aircraft), then get the gimbal object by aircraft.getGimbal, and then set the listeners to the obtained gimbal object, the code is as follows: aircraft.getGimbal().setStateCallback(new GimbalState.Callback() { @Override public void onUpdate(@NonNull GimbalState gimbalState) { stringBuffer.delete(0, stringBuffer.length()); stringBuffer.append("PitchInDegrees: "). append(gimbalState.getAttitudeInDegrees().getPitch()).append("\n"); stringBuffer.append("RollInDegrees: "). append(gimbalState.getAttitudeInDegrees().getRoll()).append("\n"); stringBuffer.append("YawInDegrees: "). append(gimbalState.getAttitudeInDegrees().getYaw()).append("\n"); showStringBufferResult(); }}); The same logic is used for IOS , only the interface used is different.
请先登录再写评论。
评论
5 条评论