How to get drone current GPS position

I’m trying to read the drone current position (as lat, lon, alt) from Olympe by following this example

The HomeChanged message works fine, but the PositionChanged message is never received even after takeoff. I’ve seen from the documentation that this message is deprecated, so what should I do to get the current position?

Hi, have you tried to access it with the GpsLocationChanged.
You can access it the same way you accessed the PositionChanged.

import olympe
from olympe.messages.ardrone3.PilotingState import GpsLocationChanged
from olympe.messages.ardrone3.GPSSettingsState import GPSFixStateChanged

drone = olympe.Drone("")

# Wait for GPS fix before receiving GPS data
drone(GPSFixStateChanged(_policy = 'wait'))

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.