Good day!
Prerequisite:
There are lot of the information regarding time when GPS in use, but I couldn’t find anything when
BRD_RTC_TYPES = MAVLINK_SYSTEM_TIME. That’s why I’ve created this topic.
Request:
I want to make my ardupilot takes the date and time from GCS or from MAVLink message and use this data in log files.
Pain:
When I use SYSTEM_TIME from QGC or sent via mavlink,the date and time in log file is 1970-01-01 03:01:27 … and so on…
What has been done:
First of all, I set the BRD_RTC_TYPES to MAVLINK_SYSTEM_TIME only.
In first case i run flight controller and then QGC. In this way QGC sends its date and time which I can observe in MAVLink inspector under SYSTEM_TIME message.
In second case, I run QGC and then flight controller. In this way flight controller doesn’t have any chance to receive date and time from QGC and SYSTEM_TIME is 0. Then I run my python code, where from I send SYSTEM_TIME. After this, SYSTEM_TIME in MAVLink inspector shows corresponding date and time.
But. In both cases, log file contains wrong date and time as it was mentioned above.
Also, I tried to do it in SITL.
But, in SITL, in log file the date and time correct even if I disable GPS and SYSTEM_TIME is 0…
I am really struggling with it already several days…
What I have missed ?