How to get drone speed

How to get drone speed with Olympe?

Hello Kain,

You can get the drone speed by getting the last SpeedChanged eventmessage:


I wrote a short function that calculates the velocity in the direction that the drone is facing:

 def get_speed(drone):
    drone_speed = drone.get_state(SpeedChanged)
    speed = math.sqrt((drone_speed['speedX'] * drone_speed['speedX']) + (drone_speed['speedY'] * drone_speed['speedY']))
    return speed

Hope this helps you,

1 Like

Hello Domi.

Thank you for your reply.
I get the speed of the drone.


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