Quantcast

IGO Primo track format

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

IGO Primo track format

lfkpoa-69
Hi,

IGo Primo uses a different track format than IGO8.
Since GPSBabel is a great software it would be really nice it this new format was added to it.
I managed to extract the informations from the IGO Primo track file (*.TRK) using Java.
I even tried to compile gpsbabel but couldn't make it build.
So I'm just describing what I've found hoping that someone else will add this format to the code.
First of all, all  data is read using little endian.

read32_le: seems to be constant => 0x00000008
read32_le: colour index (used when showing the track)=> first colour is 0x00000002
read32_le: seems to be constant => 0x00000001
read32_le: seems to be constant => 0x00000000
read32_le: file size
read32_le: seems to be constant => 0x00000008
readUnicode_le: track title => 256 bytes with 2 bytes/char using little endian.
read32_le: average speed (meter/hour).  Divide by 1000 to get km/h.
read32_le: average riding speed (meter/hour)
read32_le: max speed (meter/hour)
read32_le: unknown=> comes with a value, but can be set to zero when creating the file
read32_le: longitude => divide by 0x800000 to get a double representing the value
read32_le: latitude => divide by 0x800000 to get a double representing the value
read32_le: total time in miliseconds.
read32_le: riding time in miliseconds
read32_le: stoped time in miliseconds
read32_le: total distance in meters
read32_le: unknown => comes with a value but can be set to zero when creating the file
read32_le: minimum altitude (meters) => need to subtract 1000 from the stored value
read32_le: maximum altitude (meters) => need to subtract 1000 from the stored value
read32_le: start time (seems to be stored in GMT) => in Java, I had to multiply by 1000 to get the Date's timemillis.
read32_le: endt time (seems to be stored in GMT) => in Java, I had to multiply by 1000 to get the Date's timemillis.
read32_le: total distance in meters (seems to be replicated)
read32_le: unknown => can be set to zero
read32_le: unknown => can be set to zero

==> now comes the points with the following structure until the end of the file, each point representing 1 second:
read32_le: time (in seconds) > in Java, I had to multiply by 1000 to get the Date's timemillis
read32_le: longitude => divide by 0x800000 to get a double representing the value
read32_le: latitude => divide by 0x800000 to get a double representing the value
read32_le: altitude (meters) => need to subtract 1000 from the stored value
read32_le: speed (meter/hour).  Divide by 1000 to get km/h.

I attached a sample small track file to help where I'm basically standing with a small walk. The idea was to make it small.

With regards,

Luis Fernando


 
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

track002.trk (906 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IGO Primo track format

Robert Lipe-4


On Tue, Jan 11, 2011 at 11:09 AM, <[hidden email]> wrote:
Hi,

IGo Primo uses a different track format than IGO8.
Since GPSBabel is a great software it would be really nice it this new format was added to it.
I managed to extract the informations from the IGO Primo track file (*.TRK) using Java.
I even tried to compile gpsbabel but couldn't make it build.
So I'm just describing what I've found hoping that someone else will add this format to the code.
First of all, all  data is read using little endian.

Thanx.  This should be a great start for someone wanting to add this format.   The reverse engineering aspect is the expensive part.  Implementing the description below and flushing out the corner cases like hemisphere signs, character encodings and allowed characters, multiple tracks and so on is just a matter of looking at multiple tracks and experimenting.

Oh, and programming. :-)

RJL

 

read32_le: seems to be constant => 0x00000008
read32_le: colour index (used when showing the track)=> first colour is 0x00000002
read32_le: seems to be constant => 0x00000001
read32_le: seems to be constant => 0x00000000
read32_le: file size
read32_le: seems to be constant => 0x00000008
readUnicode_le: track title => 256 bytes with 2 bytes/char using little endian.
read32_le: average speed (meter/hour).  Divide by 1000 to get km/h.
read32_le: average riding speed (meter/hour)
read32_le: max speed (meter/hour)
read32_le: unknown=> comes with a value, but can be set to zero when creating the file
read32_le: longitude => divide by 0x800000 to get a double representing the value
read32_le: latitude => divide by 0x800000 to get a double representing the value
read32_le: total time in miliseconds.
read32_le: riding time in miliseconds
read32_le: stoped time in miliseconds
read32_le: total distance in meters
read32_le: unknown => comes with a value but can be set to zero when creating the file
read32_le: minimum altitude (meters) => need to subtract 1000 from the stored value
read32_le: maximum altitude (meters) => need to subtract 1000 from the stored value
read32_le: start time (seems to be stored in GMT) => in Java, I had to multiply by 1000 to get the Date's timemillis.
read32_le: endt time (seems to be stored in GMT) => in Java, I had to multiply by 1000 to get the Date's timemillis.
read32_le: total distance in meters (seems to be replicated)
read32_le: unknown => can be set to zero
read32_le: unknown => can be set to zero

==> now comes the points with the following structure until the end of the file, each point representing 1 second:
read32_le: time (in seconds) > in Java, I had to multiply by 1000 to get the Date's timemillis
read32_le: longitude => divide by 0x800000 to get a double representing the value
read32_le: latitude => divide by 0x800000 to get a double representing the value
read32_le: altitude (meters) => need to subtract 1000 from the stored value
read32_le: speed (meter/hour).  Divide by 1000 to get km/h.

I attached a sample small track file to help where I'm basically standing with a small walk. The idea was to make it small.

With regards,

Luis Fernando


 

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code



------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Res: IGO Primo track format

lfkpoa-69
Hi,

I realized I had droped a few fields when copying it from my code to the message.
The correct layout is:

read32_le: seems to be constant => 0x00000008
read32_le: colour index (used when showing the track)=> first colour is 0x00000002
read32_le: seems to be constant => 0x00000001
read32_le: seems to be constant => 0x00000000
read32_le: seems to be constant => 0x00000100
read32_le: file size
read32_le: seems to be constant => 0x00000008
readUnicode_le: track title => 256 bytes with 2 bytes/char using little endian.
read_byte: constant => 0x00
read32_le: average speed (meter/hour).  Divide by 1000 to get km/h.
read32_le: average riding speed (meter/hour)
read32_le: max speed (meter/hour)
read32_le: unknown=> comes with a value, but can be set to zero when creating the file
read32_le: longitude => divide by 0x800000 to get a double representing the value
read32_le: latitude => divide by 0x800000 to get a double representing the value
read32_le: total time in miliseconds.
read32_le: riding time in miliseconds
read32_le: stoped time in miliseconds
read32_le: total distance in meters
read32_le: unknown => comes with a value but can be set to zero when creating the file
read32_le: minimum altitude (meters) => need to subtract 1000 from the stored value
read32_le: maximum altitude (meters) => need to subtract 1000 from the stored value
read32_le: start time (seems to be stored in GMT) => in Java, I had to multiply by 1000 to get the Date's timemillis.
read32_le: end time (seems to be stored in GMT) => in Java, I had to multiply by 1000 to get the Date's timemillis.
read32_le: total distance in meters (seems to be replicated)
read32_le: unknown => can be set to zero
read32_le: unknown => can be set to zero

==> now comes the points with the following structure until the end of the file, each point representing 1 second:
read32_le: time (in seconds), uses local time (not GMT)> in Java, I had to multiply by 1000 to get the Date's timemillis
read32_le: longitude => divide by 0x800000 to get a double representing the value
read32_le: latitude => divide by 0x800000 to get a double representing the value
read32_le: altitude (meters) => need to subtract 1000 from the stored value
read32_le: speed (meter/hour).  Divide by 1000 to get km/h.

With regards,

Luis Fernando


De: Robert Lipe <[hidden email]>
Para: [hidden email]
Cc: [hidden email]
Enviadas: Quarta-feira, 12 de Janeiro de 2011 0:15:24
Assunto: Re: [Gpsbabel-code] IGO Primo track format



On Tue, Jan 11, 2011 at 11:09 AM, <[hidden email]> wrote:
Hi,

IGo Primo uses a different track format than IGO8.
Since GPSBabel is a great software it would be really nice it this new format was added to it.
I managed to extract the informations from the IGO Primo track file (*.TRK) using Java.
I even tried to compile gpsbabel but couldn't make it build.
So I'm just describing what I've found hoping that someone else will add this format to the code.
First of all, all  data is read using little endian.

Thanx.  This should be a great start for someone wanting to add this format.   The reverse engineering aspect is the expensive part.  Implementing the description below and flushing out the corner cases like hemisphere signs, character encodings and allowed characters, multiple tracks and so on is just a matter of looking at multiple tracks and experimenting.

Oh, and programming. :-)

RJL

 

read32_le: seems to be constant => 0x00000008
read32_le: colour index (used when showing the track)=> first colour is 0x00000002
read32_le: seems to be constant => 0x00000001
read32_le: seems to be constant => 0x00000000
read32_le: file size
read32_le: seems to be constant => 0x00000008
readUnicode_le: track title => 256 bytes with 2 bytes/char using little endian.
read32_le: average speed (meter/hour).  Divide by 1000 to get km/h.
read32_le: average riding speed (meter/hour)
read32_le: max speed (meter/hour)
read32_le: unknown=> comes with a value, but can be set to zero when creating the file
read32_le: longitude => divide by 0x800000 to get a double representing the value
read32_le: latitude => divide by 0x800000 to get a double representing the value
read32_le: total time in miliseconds.
read32_le: riding time in miliseconds
read32_le: stoped time in miliseconds
read32_le: total distance in meters
read32_le: unknown => comes with a value but can be set to zero when creating the file
read32_le: minimum altitude (meters) => need to subtract 1000 from the stored value
read32_le: maximum altitude (meters) => need to subtract 1000 from the stored value
read32_le: start time (seems to be stored in GMT) => in Java, I had to multiply by 1000 to get the Date's timemillis.
read32_le: endt time (seems to be stored in GMT) => in Java, I had to multiply by 1000 to get the Date's timemillis.
read32_le: total distance in meters (seems to be replicated)
read32_le: unknown => can be set to zero
read32_le: unknown => can be set to zero

==> now comes the points with the following structure until the end of the file, each point representing 1 second:
read32_le: time (in seconds) > in Java, I had to multiply by 1000 to get the Date's timemillis
read32_le: longitude => divide by 0x800000 to get a double representing the value
read32_le: latitude => divide by 0x800000 to get a double representing the value
read32_le: altitude (meters) => need to subtract 1000 from the stored value
read32_le: speed (meter/hour).  Divide by 1000 to get km/h.

I attached a sample small track file to help where I'm basically standing with a small walk. The idea was to make it small.

With regards,

Luis Fernando


 

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code



 
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code
Loading...