dronekit / dronekit-python

DroneKit-Python library for communicating with Drones via MAVLink.
https://readthedocs.org/projects/dronekit-python/
Apache License 2.0
1.57k stars 1.44k forks source link

GPS UTC timing #501

Open tnk3r opened 8 years ago

tnk3r commented 8 years ago

How can I call the UTC time with dronekit? I can't seem to find any documentation about it.

hamishwillee commented 8 years ago

@tnk3r What is it you are actually trying to do? There is no API to get current UTC time in dronekit itself, but plenty of APIs in Python.

tnk3r commented 8 years ago

Right, I am looking at pymavlink.

I am trying to sync multiple pixhawk together for timing and triggering actions. One obvious reason is syncing air and ground vehicle cameras with streaming cameras. They can easily be synced by providing initial timestamp when opening video stream. Then calculating offsets from one another.

hamishwillee commented 8 years ago

@tnk3r We don't directly expose any timestamp information like that in DroneKit. However if there is a MAVLink message that is sent by the autopilot with this information you can intercept it in your dronekit app as described here: http://python.dronekit.io/examples/create_attribute.html

tnk3r commented 8 years ago

Interesting, I'll give it a test. I'll report back soon.

hamishwillee commented 8 years ago

Thanks. If you work out a good message and approach for synchronization we can add this to the API.

mikerob commented 8 years ago

Having a simple function to set companion board date and time from GPS would also be useful - otherwise your times in logs are off.

On 21 Dec 2015, at 11:05 am, Hamish Willee notifications@github.com wrote:

Thanks. If you work out a good message and approach for synchronization we can add this to the API.

— Reply to this email directly or view it on GitHub.