dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
972 stars 579 forks source link

怎么获得飞机的RTKState类 #808

Open SSZ1 opened 3 years ago

SSZ1 commented 3 years ago

想要使用飞机的RTKState获取其高度,怎么获取飞机当前的RTKState?有具体代码吗?

dji-dev commented 3 years ago

Agent comment from Luce Luo in Zendesk ticket #45161:

尊敬的用户,

您好!感谢您联系DJI 大疆创新。 可以参考如下代码获取高度getMobileStationAltitude:

((Aircraft) DJISampleApplication._getProductInstance_()).getFlightController().getRTK().setStateCallback(new RTKState.Callback() {
 @Override
 public void onUpdate(@NonNull RTKState rtkState) {
 //rtkState.getMobileStationAltitude()
 }
});

非常感谢您的理解与配合,祝您生活愉快!

Best Regards,

DJI 大疆创新SDK技术支持