CodePudding user response:
Excuse me, would you please tell me how to solve it, I also met this problemPublic void acquire_gps () {
FlightControllerState djiFlightControllerCurrentState=new FlightControllerState ();
Double alatitude=djiFlightControllerCurrentState. GetAircraftLocation (.) getLatitude ();
Double alongitude=djiFlightControllerCurrentState. GetAircraftLocation (.) getLongitude ();
Double high=djiFlightControllerCurrentState. GetAircraftLocation (.) getAltitude ();
String locate="longitude:" + alatitude + "\ n" + "latitude:" + alongitude + "\ n" + "height:" + high + "\ n";
Toast. MakeText (getApplicationContext (), locate, Toast. LENGTH_LONG), show ();
}
By calling this function for the GPS information, but the returned result is always NAN