GPS sample recording.log file #help #automotive


Vele Tosevski
 

Hey guys,

I was wondering if anyone can point me to a sample recording.log file for the agl-service-gps binding.  I want to simulate a GPS signal as my board is not equipped with GPS.

Also, is there documentation on the format of the recording.log file?  Would it me nmea format?  In that case, I can just generate a sample .nmea file using https://nmeagen.org/.

UPDATE: I have tried a nmea formatted file and it is not working.

Thanks,
Vele


Vele Tosevski
 

UPDATE: Got it to work, currently simulating GPS data.

To help other people, the format of the recording.log file is a standard JSON format.  Each event is separated by a new line character in the file.  For example, my file, using just a constant GPS location event, is as follows:

recording.log: 

{"altitude": 240, "latitude": 41.9973, "longitude": 21.428, "speed": 100, "track": 270, "timestamp": "2015-11-13T12:57:24.000Z"}
{"altitude": 240, "latitude": 41.9973, "longitude": 21.428, "speed": 100, "track": 270, "timestamp": "2015-11-13T12:57:24.000Z"}
{"altitude": 240, "latitude": 41.9973, "longitude": 21.428, "speed": 100, "track": 270, "timestamp": "2015-11-13T12:57:24.000Z"}
{"altitude": 240, "latitude": 41.9973, "longitude": 21.428, "speed": 100, "track": 270, "timestamp": "2015-11-13T12:57:24.000Z"}
{"altitude": 240, "latitude": 41.9973, "longitude": 21.428, "speed": 100, "track": 270, "timestamp": "2015-11-13T12:57:24.000Z"}
... etc

latitude + longitude + altitude + track are parsed as doubles in agl-service-gps, timestamp as a string.

To get the replay option in agl-service-gps to work, you must create this file as /var/scope-platform/agl-service-gps/recording.log and give it the following permissions:
chsmack -a _ /var/scope-platform/agl-service-gps/recording.log

Cheers,
Vele