大疆社区
标题:
无人机经纬度获取为NaN,救救孩子
[打印本页]
作者:
赵三岁
时间:
2021-1-20
标题:
无人机经纬度获取为NaN,救救孩子
private void upFlightControl() {
if (ModuleVerificationUtil.isFlightControllerAvailable()) {
FlightController flightController =
((Aircraft) OwspaceApplication.getProductInstance()).getFlightController();
flightController.setStateCallback(new FlightControllerState.Callback() {
@Override
public void onUpdate(@NonNull FlightControllerState djiFlightControllerCurrentState) {
if (null != compass) {
droneLocationLat = djiFlightControllerCurrentState.getAircraftLocation().getLongitude();
DJIMainActivity.this.runOnUiThread(new Runnable() {
public void run() {
test.setText(" "+droneLocationLat);
}
});
}
}
});
if (ModuleVerificationUtil.isCompassAvailable()) {
compass = flightController.getCompass();
}
}
}
droneLocationLat获取为NAN
作者:
DJI-William
时间:
2021-1-20
NaN说明没GPS信号,因为你飞机在室内,连到Assistant2里连接下模拟器,模拟个GPS地点就好了。
作者:
赵三岁
时间:
2021-1-20
<div class="quote"><blockquote><a class="nopicture" rel="noopener" href="https://bbs.dji.com/forum.php?mod=redirect&goto=findpost&pid=3870575&ptid=260812" target="_blank"><span class="customName">DJI-William</span><span class="customShow"></span><span class="customTime">1-20 15:50</span></a>
<span class="customSpan">NaN说明没GPS信号,因为你飞机在室内,连到Assistant2里连接下模拟器,模拟个GPS地点就好了。</span></blockquote></div>
谢谢,我去试试
欢迎光临 大疆社区 (https://bbs.dji.com/)
Powered by Discuz! X3.2