Adafruit_Wippersnapper_Arduino icon indicating copy to clipboard operation
Adafruit_Wippersnapper_Arduino copied to clipboard

Add support for GPS location in log files

Open brentru opened this issue 10 months ago • 1 comments

For Offline Mode, we can implement this without touching IO (yet)!

  • Add GPS module's timestamp (#698 ) and location fix to the JSONL log line

Requires: https://github.com/adafruit/Wippersnapper_Protobuf/issues/118

brentru avatar Feb 21 '25 19:02 brentru

Should implement UART first and then AQ sensors and then GPS, as GPS modules would require that as a prerequisite.

#639

brentru avatar Feb 28 '25 19:02 brentru

@ladyada Do we want to implement this feature or mark it long-term? All the pieces I need to do this are implemented.

brentru avatar Jul 29 '25 19:07 brentru

kinda up to you! how much do you want to stay in GPS land?

ladyada avatar Jul 31 '25 00:07 ladyada

A MVP for this should look like parsing the GPSEvent (Model interface from gps.proto) data into a DateTime object, saving that state (I am not sure where yet - I'll have to look), and adding a hook into the ws_sdcard class' GetTimestamp() function for retrieving it.

Now that I have the scope set, it's not that big of a lift. I am going to timebox it to 1.5hr today.

brentru avatar Jul 31 '25 13:07 brentru

✅ Tested with Sparkfun GPS Breakout, U-Blox MAX-M10S

[APP] Hardware configured!
[APP] Begin loop()
...
[snipped, establishing a fix]
...
{"timestamp":1754072951,"fix_status":"A","latitude":"4151.494141","lat_dir":"NWM","longitude":"7123.619629","lon_dir":"WM","speed":"0.1","angle":"0.0"}
{"i2c_address":"0x0B","timestamp":1754058435,"value":3.972,"si_unit":"V"}
{"i2c_address":"0x0B","timestamp":1754058435,"value":96.5,"si_unit":"%"}

Unix Timestamp correctly translates to 08/01/2025 @ 6:26pm UTC. Making the adjustment from UTC to EST translates to 08/01/2025 @ 2:26pm EST

brentru avatar Aug 01 '25 18:08 brentru

Added to https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/issues/699! This issue close when the pull request is merged.

brentru avatar Aug 01 '25 18:08 brentru

Closed via https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/pull/787#event-19114529302

brentru avatar Aug 12 '25 14:08 brentru