Jump to content
AVIC411.com

How to convert drive logs into GPX format?


Recommended Posts

Hi specialists,

 

I'm a newbie with my AVIC F920BT: great device, great features! Especially the drive log (all your tracks logged on the micro-SD card) was one reason to go for a pioneer naviceiver.

 

Looking at the tracks recorded onto the SD card, these *.LTB files appear to be in an encrypted format only the "navgate feeds" software can decode. Tracks will show up perfectly fine within Navgate feeds, but there seems to be no export to a e.g. GPX format, so you could use these files for geotagging of photos, or do upload tracks into Garmins MapSource/RoadTrip/BaseCamp or embed them into your own website.

 

I guess the unit will not only record len/lat but also elevation data, which would be perfectly displayed within e.g. Garmin MapSource, but so far I wasn't able to get hold of the drive logs in a readable format!

 

Looks like when "navgate feeds" starts to show tracks with google maps, the software will first send the logs to its own server (avicfeeds.com), and afterwards call the google api for showing the map. Within this second call (to google maps) you will see two coordinates: your start- and your endpoint, but no points in between - therefor I guess that there is a communication between avicfeeds.com and google to build up the map with the drive log.

 

Any idea how we can convert drive logs into a readable format (preferred: gpx)?

 

Thanks,

 

Stefan

Link to post
Share on other sites
  • 3 months later...

The file isn't encrypted. It has an 8 byte header followed by an arbitrary number of 24 byte records.

 

The data in the file is encoded in little endian format, except for the date, which is big-weirdo format. It seems that the multi-byte values are little endian. There may be a bit field in there too (byte 21) but I'm not sure.

 

The header consists of the four byte value "2" (2,0,0,0) followed by the little-endian count of the number of records in the file (I guess that could be used as a somewhat lame checksum.)

 

The records consist of fields as follows (first thing is the byte count):

 

4: tick count from speedometer cable (valid only within the file - see below.)

4: X ordinate (probably WGS-84, but I haven't checked)

4: Y ordinate (likewise)

7: big-weirdo format date, in bytes, century:year:month:day:hour:minute:second; this seems to be UTC.

1: A single byte value in the range 0..120 (yes, the value 120 does occur!)

1: A byte, all values observed

1: A possible bitfield, observed values 0, 1, 9, 13, 17, 25, 29, 61, 252

1: 255

1: 255

 

The last two bytes on my log were always 255, which makes it difficult to guess what they are.

 

The 'tick count' field advances arbitrarily between files. I suspect someone thought (for some limited value of that verb) that it would be a good idea to advance the tick between stops. This is clearly bogus - it means that you can apparently travel some considerable distance while the car is stopped because when the engine is started again (rebooting the navi) it has lost GPS and while it struggles to get back up to speed it doesn't have the faintest idea where the car is. I guess it might be useful if you get towed.

 

The X/Y coordinates can be hilarious (gee, I seem to have been travelling at 2000 miles per hour through the unroaded forests of Oregon ;-) The tick count is therefore essential reading - the system happily records 1/2 mile jumps through space while it battles with the mismatch between its maps and the GPS signals. That means short trips are extremely unreliable - by "short" I mean as long as a few miles!

Link to post
Share on other sites
  • 3 months later...

hi,

 

thanks for the description, but i get a problem with X/Y ordinate. I convert the values to integer (32 bit). I tried little endian format and big endian format, but the values are no valid latitude/longitude.

 

Anyone knows, how to use the X/Y data?

Link to post
Share on other sites
  • 1 year later...

4: X ordinate (probably WGS-84, but I haven't checked)

4: Y ordinate (likewise)

 

I'm currently reverse-engineering the LTB file and can't understand the X/Y coordinates. In my C++ code, I cast these 4 bytes as signed integers and, when substracted from the first record, they provide the proper route line.

 

For example, I have the following X,Y records:

#1: -67718899, 41926521
#2: -67718899, 41926521
#3: -67718899, 41926521
#4: -67718922, 41926504
#5: -67719024, 41926430
#6: -67719161, 41926329
#7: -67719276, 41926246

 

X2-X1 = 0 (no movement)

X3-X1 = 0 (no movement)

X4-X1 = -23 (moved left 23 pixels/units from the initial position)

X5-X1 = -125 (moved left 125 pixels/units from the initial position)

X6-X1 = -262 (moved left 262 pixels/units from the initial position)

etc.

 

Same logic with Y

 

When I draw this, I get the exact same line displayed in Avic Feeds. My big question is: How does Avic Feeds get the initial latitude/longitude of the first point? How does it convert (-67718899,41926521) to (45.493196,-73.479723)?

Link to post
Share on other sites
  • 3 months later...

The single byte after the date appears to be the current speed in Kilometres Per Hour. The correct Longitude, referred to as X and Latitude, referred to as W can be found by dividing by 921600. I didn't realise it was a constant factor till I saw your right and wrong answer which are 500km from me. The last 4 bytes may be something to do with the Eco reading or altitude.

Link to post
Share on other sites
  • 3 months later...

The single byte after the date appears to be the current speed in Kilometres Per Hour. The correct Longitude, referred to as X and Latitude, referred to as W can be found by dividing by 921600. I didn't realise it was a constant factor till I saw your right and wrong answer which are 500km from me. The last 4 bytes may be something to do with the Eco reading or altitude.

 

Oooo!  Very interesting.  I remember trying to substract/add a constant but it didn't work.  I never tried dividing it.

I might pull out that project once more after all as I was stuck with this coordinate conversion issue.

Link to post
Share on other sites
  • 5 years later...

whit what program can you look at the files ?. also were can i get it.

my little broder has a pioneer radia that makes that files and i was wondering how its works and how to update the map bat sofare noting .

so i begin by loking at the files from my drive today.

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...