MAVSDK
MAVSDK copied to clipboard
Determine exact time fly
Hi all, I have mission with take photo action each waypoints. How I can determine exact time when drone fly from waypoint to waypoint and time drone do action at waypoint?
@dangviethieu-hntv this would depend on the mission speed that you set. Given the distance you could then calculate the approximate time required to fly it.
@julianoes How about determine time drone do action at waypoint, sir? (take photo, control gimbal)
How about determine time drone do action at waypoint, sir? (take photo, control gimbal)
That would depend on the gimbal and camera you are using.
Does it matter? You're never going to be able to get a perfect estimate - and omitting these is likely to be a relatively small fraction of your error.
Thanks you. But I thinks why don't we use 1 boolean parameter, and set true when drone start action at waypoints, and set false when it finish, so we can calculate time drone fly and time drone doing action. That is my ideal, thank you very much !!!
I think the best you can do is monitor MISSION_ITEM_REACHED, which the autopilot must send whenever it gets to a new item. This is not timestamped, but it would give you a good approximation.
It isn't as far as I know possible to get more detailed information about start and end "generically" of mission information from MAVLink. Depending on what you are doing you might be able to get a bit more of a guess for some operations. For example if you already know that the mission takes 4 photos at a particular place, then you could look at the messages which are broadcast and get their timestamps. However this is not something reliable, or that you would do in this kind of SDK.