[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4792: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4793: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
AutoQuad Forum • View topic - Accessing accurate GPS Time via MavLink

Accessing accurate GPS Time via MavLink

Info and discussion about the autonomous Micro FC, suitable for nanos, micros and mini multirotors

Accessing accurate GPS Time via MavLink

Postby nothsi » Mon May 18, 2015 11:32 pm

Hello,
to be able to add reliable timestamps to data gathered by different M4s I wanted to ask, if (and how) it is possible to access the M4s GPS time of week via a MavLink Message.
So far I requested the AQMAV_DATASET_GPS_XTRA via a COMMAND_LONG message but I am not sure whether the 8th parameter contains the wanted value.
In it seems as if qgroundcontrol is able to access the TOW?
Any input would be greatly appreciated.
nothsi
 
Posts: 2
Joined: Mon May 18, 2015 11:13 pm

Re: Accessing accurate GPS Time via MavLink

Postby rput » Wed May 20, 2015 12:20 pm

This would be very useful to have. It seems right now the TOW is only logged, but not transmitted through mavlink. Is this correct?
rput
 
Posts: 83
Joined: Sun Feb 10, 2013 5:45 pm

Re: Accessing accurate GPS Time via MavLink

Postby Max » Wed May 20, 2015 2:29 pm

That's correct. I'm actually not sure there is a MAVLink message type to transmit iTOW.

Nothsi, I think the parameter you're referring to is only an internal timestamp of when the last GPS reading was received. This would be micoseconds since boot, not actual time.

If you can compile the code yourself, it should be fairly trivial to add gpsData.iTOW as another parameter sent in the GPS_EXTRA dataset... I'll add it also, but not sure when those changes will make it out of "the lab."

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Accessing accurate GPS Time via MavLink

Postby rput » Thu May 21, 2015 12:43 am

Great, thanks Max!

I will see if I can compile it myself. On another note: I noticed that there is a flag in the ublox code for DO_RTK_GPS which enables raw data output from the LEA-6T receiver. Would you know if this data also gets logged if the flag is enabled, or is logging this not implemented?
rput
 
Posts: 83
Joined: Sun Feb 10, 2013 5:45 pm

Re: Accessing accurate GPS Time via MavLink

Postby Max » Thu May 21, 2015 2:40 am

Check at the top of gps.h file -- you can un-comment GPS_LOG_BUF and GPS_FNAME to enable logging the raw data to a file. You can also enable GPS_DO_RTK and GPS_DEBUG here to log more data. I'm not sure I've ever tried this myself, but I imagine it should work. :)

You can also enable direct passthrough of GPS data to an AQ serial port. Pick a serial port (AQ6 has 2 and M4 has 1) and set the corresponding COMM_STREAM_TYPx parameter to a value of 8 and COMM_BAUDx to some non-zero value (eg. try 230400). Perhaps it goes w/out saying, but you can't have Mavlink data and the GPS passthrough on the same serial port.

Lastly, if using the M4 USB port, setting the baud rate to 1200 (on the connected computer) will automatically enable GPS data passthrough as a serial data stream via USB.

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Accessing accurate GPS Time via MavLink

Postby nothsi » Thu May 21, 2015 7:50 am

nothsi
 
Posts: 2
Joined: Mon May 18, 2015 11:13 pm

Re: Accessing accurate GPS Time via MavLink

Postby aBUGSworstnightmare » Thu May 21, 2015 8:05 am

aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm


Return to AutoQuad M4 Micro Controller

Who is online

Users browsing this forum: No registered users and 12 guests

cron