i-Magic VR File Format
As with the Fortius files, whenever fields have units associated with them, such as weight, distance etc.,
the Tacx software stores the SI unit any only converts to the Imperial system for display purposes.
Single byte characters (ASCII) are used throughout.
An .im file contains the following data blocks.
- Course information.
- Wind information (not always present).
- Course data.
- Ride information.
- Lap times.
- Scale factor data.
- Ride data (including cooling down data if present)
The i-Magic .im file format is not as straighforward as the Fortius layouts. In particular the position of the wind, lap and scale factor parts of the file is confusing. Although some of the information I've gained (for example the 'Course data offset' field in the Course Information Block) can help to locate certain sections, in any software I've written to read the .im files I have used the following approach.
- Read the Course Information Block (572 bytes).
- Seek to a position in the file of 572 + course record count * 34.
- Search for an occurance of the course name.
- The start of the Ride Information Block is the location of this string minus 4.
- The start of the Ride Data Block is size of file - (ride record count + 1) * 34. (Don't forget to allow for the cool-down data if there is any.)
- If the location of the Course Data Block is not 572 then the Wind Information Block is present.
This is more straightforward than it sounds! If anyone has a better solution please let me know.
Course Information Block
Wind Information Block
This block is only present if the course data offset field in the course information block is 24 (the size of this block).
Sometimes the wind information block is present but contains spurious values - this does not necessarily mean the file is corrupt.
It may be that in addition to this block being present there is another indicator of wind elsewhere in the file. In any event, it's best to check whether the direction and strength fields above are sensible before deciding whether the course does indeed have any wind.
Course Data Block
Ride Information Block
Lap Data Block
This is an array of 4 byte integers, the number of which is given in both the course information block and the ride information block.
Scale Data Block
In some run files the skip field has a value of 2; usually it is 0. When this happens there is an extra 8 bytes between this block and the next (the ride data block). This does not occur often - I've seen it only 4 files out of several hundred. I have a suspicion it may be related to crashes but I am not certain.
Like the wind information, the scale factor field can sometimes contain spurious values. In these cases, the Tacx Blue Analyser program just omits the display of the scale factor.
Ride Data Block
The number of ride records is given in the ride information block.
Note that any cool down data immediately follows, using the same record layout. The number of cooling down data records is given in the ride information block.
|