Implement 'Delay until UTC time reached' in PX4

Hi!

QGroundControl v4.1.1 allows a user to create a mission command ‘Delay until a specified time is reached’. The user may enter a hold time in seconds or Hour/Min/Sec in UTC time. The documentation specifies putting -1 in the Hold parameter if a delay until UTC time is desired.

MAV_CMD_NAV_DELAY (93) is added to the flight plan with the proper UTC parameters which is uploaded to the vehicle. Currently, only the hold time is implemented by PX4 (v1.11.3) - the ‘Delay until UTC time’ parameters are ignored.

It seems that PX4 is aware of UTC time from GPS, as log files are date/time stamped in UTC. The gps device driver (src/drivers/gps/devices/src/ubx.cpp) reads the gps time and (I think) converts it to UTC ignoring leap seconds. Adding this functionality would require subtracting UTC now from UTC passed in to arrive at the number of seconds to delay at the next waypoint.

Implementation of this functionality (along with DO_SET_SERVO or DO_SET_ACTUATOR) would allow users to coordinate the activities of multiple drones during autonomous flight.

I am not familiar enough with C++ or the PX4 Architecture to add this functionality myself. However I have set up the tool chain and can build and flash the firmware. I would appreciate the opportunity to test new features for v1.12.

Thanks,

Stan Humphries

Screen Shot 2021-02-26 at 7.42.45 AM