MAVSDK icon indicating copy to clipboard operation
MAVSDK copied to clipboard

Determine exact time fly

Open dangviethieu-hntv opened this issue 7 years ago • 5 comments

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 avatar Jul 18 '18 10:07 dangviethieu-hntv

@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 avatar Jul 18 '18 10:07 julianoes

@julianoes How about determine time drone do action at waypoint, sir? (take photo, control gimbal)

dangviethieu-hntv avatar Jul 19 '18 01:07 dangviethieu-hntv

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.

hamishwillee avatar Jul 19 '18 01:07 hamishwillee

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 !!!

dangviethieu-hntv avatar Aug 03 '18 06:08 dangviethieu-hntv

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.

hamishwillee avatar Aug 05 '18 23:08 hamishwillee