Regarding Getting Physical Drones Current GPS Coordinates through olympe


I have gone through the documentation but still cannot write the code for recieving gps Coordinates from a Physical drone while the Skycontroller 3 is connected through Linux box via USB-C running olympe.

If you could share a code snippet for printing Physical drones gps Coordinates with the above mentioned configuration in the console , it will be very helpful.

Waiting for your reply ,


So I figured It out anyways… To print the drone co ordinates in the console use the following

print("Latitude:", drone.get_state(PositionChanged)["latitude"])
print("Longitude:", drone.get_state(PositionChanged)["longitude"])
print("Altitude:", drone.get_state(PositionChanged)["altitude"])

does it work to get anytime drone coordinates?