How to create a track and reference lap for a road rally
Downloading the track file
Now we want to export the track data. Again, this is an xml file that HLT uses to store the points of interest (POI). The POI define the start/finish, turns, descriptions, etc., of the track.
Like the lap data, the track data can be "downloaded" by emailing it to oneself. Unfortunately, this emailing option is only available for uncertified tracks. So if you only have certified tracks on HLT, you won't be able to download the track data unless you create an uncertified track. It is, however, pretty easy to create a new track -- just press the "New Track" button when you start HLT. All you have to do is define a start/finish line.
Again, the following steps that describe how to download track data from HLT may be skipped as they are not necessary for creating a road rally track, but you probably want to go through them just to become more familiar with how HLT works.
I'll assume you have an uncertified track HLT.
1. Open HLT v18.2 or above and go to the "Lap list" page
2. Click on an uncertified track and scroll to the bottom of the page
3. Click on Certify
4. Click the Certify button
5. PLEASE BE CAREFULL AND DO NOT MAIL THIS TO HARRY! Change the recipient to yourself!!!
6. Click on Send
When you receive the email, place the attachment into a folder. The folder can have any name, but I will use HLT\gzip. I typically rename the file XxxxxTrack.hpoiz, where Xxxxx is the course name.
The next step is to uncompress the file. Since I am a Windows user, the following will be Windows based. I know little about Apple PCs, so maybe someone else can pipe in.
In my HLT directory I created a subdirectory named xml. We'll uncompress the file in the gzip directory to the xml directory. I use a program called 7za (7-zip.org). Be sure to install this in the Windows search PATH (Didn't I warn that this was going to be geeky?). The easiest way to do this is to be sure 7za.exe is in the c:\Windows directory.
1. Open the Windows command prompt (hint: Start button, search "Cmd")
2. Change your directory to \HLT\xml (you'll probably have to specify the drive letter)
3. Enter the command "7za e -tgzip ..\gzip\XxxxxTrack.hpoiz"
4. You should now have a file in the xml directory XxxxxTrack. Rename it to XxxxxTrack.xml.
You may now open the file in a text editor to view it. I use Notepad++ (notepad-plus-plus.org). Next we'll take a look at the contents of the track and lap files.
Deven
Like the lap data, the track data can be "downloaded" by emailing it to oneself. Unfortunately, this emailing option is only available for uncertified tracks. So if you only have certified tracks on HLT, you won't be able to download the track data unless you create an uncertified track. It is, however, pretty easy to create a new track -- just press the "New Track" button when you start HLT. All you have to do is define a start/finish line.
Again, the following steps that describe how to download track data from HLT may be skipped as they are not necessary for creating a road rally track, but you probably want to go through them just to become more familiar with how HLT works.
I'll assume you have an uncertified track HLT.
1. Open HLT v18.2 or above and go to the "Lap list" page
2. Click on an uncertified track and scroll to the bottom of the page
3. Click on Certify
4. Click the Certify button
5. PLEASE BE CAREFULL AND DO NOT MAIL THIS TO HARRY! Change the recipient to yourself!!!
6. Click on Send
When you receive the email, place the attachment into a folder. The folder can have any name, but I will use HLT\gzip. I typically rename the file XxxxxTrack.hpoiz, where Xxxxx is the course name.
The next step is to uncompress the file. Since I am a Windows user, the following will be Windows based. I know little about Apple PCs, so maybe someone else can pipe in.
In my HLT directory I created a subdirectory named xml. We'll uncompress the file in the gzip directory to the xml directory. I use a program called 7za (7-zip.org). Be sure to install this in the Windows search PATH (Didn't I warn that this was going to be geeky?). The easiest way to do this is to be sure 7za.exe is in the c:\Windows directory.
1. Open the Windows command prompt (hint: Start button, search "Cmd")
2. Change your directory to \HLT\xml (you'll probably have to specify the drive letter)
3. Enter the command "7za e -tgzip ..\gzip\XxxxxTrack.hpoiz"
4. You should now have a file in the xml directory XxxxxTrack. Rename it to XxxxxTrack.xml.
You may now open the file in a text editor to view it. I use Notepad++ (notepad-plus-plus.org). Next we'll take a look at the contents of the track and lap files.
Deven
This is still the easy part!
Before going on, it may be worth mentioning again what the end result will be. Right now we're still covering the easy parts of the process. Later on, it will get more difficult and time consuming. Not trying to discourage anyone, just realistic.
Out of this process we'll get a track file and reference lap that can be used to complete the rally within 1/2 second of your target time assuming reasonable driving skill and an accurate track and reference lap. This sounds pretty good, but the competitive drivers are typically within .1 second. The biggest limitation of HLT v18.2 is that the start is defined by a standinggo trigger which is GPS based, not by the time of day of an atomic clock which most rallies use. This difference introduces a certain amount of error, probably a couple of tenths of a second, which I haven't found a way to compensate for. Hopefully HLT v19 will have a clock based starting trigger!
All things considered, I feel HLT is a very valuable road rally tool and would urge anyone seriously participating to put the time in and master the process. If there is enough interest, perhaps many of the complicated steps can be streamlined or automated further.
Deven
Out of this process we'll get a track file and reference lap that can be used to complete the rally within 1/2 second of your target time assuming reasonable driving skill and an accurate track and reference lap. This sounds pretty good, but the competitive drivers are typically within .1 second. The biggest limitation of HLT v18.2 is that the start is defined by a standinggo trigger which is GPS based, not by the time of day of an atomic clock which most rallies use. This difference introduces a certain amount of error, probably a couple of tenths of a second, which I haven't found a way to compensate for. Hopefully HLT v19 will have a clock based starting trigger!
All things considered, I feel HLT is a very valuable road rally tool and would urge anyone seriously participating to put the time in and master the process. If there is enough interest, perhaps many of the complicated steps can be streamlined or automated further.
Deven
The Track xml file
Let's take a look at the simplest file we'll see in this tutorial, a track with a start / finish line:
While this is pretty self explanatory, it is probably worth walking through the elements of the file.
Like HTML files, XML files consists of tag pairs like <category> and </category>. Each <tag> must have a corresponding </tag>.
1. poiset defines all the elements in the track
2. category is the name of the track
3. poi is the point of interest. A track usually has many POI's, but this track has just one.
4. type is the kind of POI. The most common types are Trigger and Alert.
5. coordinates are the GPS location
6. poiLevel and Direction can be ignored
7. triggerType is the kind of trigger. Here you see a stop/go, but for a rally we'll be using standinggo and stop.
8. description is the text to display
Okay, that was pretty easy, so let's take a look at the track file I created for the Silver State Challenge Classic (SSCC):
The actual file (which I will provide in a later post) contains about 23 POI, but I've edited it down to four for simplicity. The first and last POI define the start and finish lines and are triggerType's standinggo and stop.
The remaining POI are Alerts that show the target speed for the upcoming section of the course. The Alerts are basically telling the driver what speed he/she should maintain until the next alert. In essence, this allows HLT to function like your navigator giving you instructions. Alerts can also be used to describe upcoming turns and other course information.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<poiset>
<category>Test Track</category>
<poi>
<type>Trigger</type>
<coordinate>-122.341129,37.304062</coordinate>
<poiPosition>tc</poiPosition>
<poiLevel>1</poiLevel>
<triggerType>stop/go</triggerType>
<direction>0</direction>
<description>Start / Finish</description>
</poi>
</poiset>
Like HTML files, XML files consists of tag pairs like <category> and </category>. Each <tag> must have a corresponding </tag>.
1. poiset defines all the elements in the track
2. category is the name of the track
3. poi is the point of interest. A track usually has many POI's, but this track has just one.
4. type is the kind of POI. The most common types are Trigger and Alert.
5. coordinates are the GPS location
6. poiLevel and Direction can be ignored
7. triggerType is the kind of trigger. Here you see a stop/go, but for a rally we'll be using standinggo and stop.
8. description is the text to display
Okay, that was pretty easy, so let's take a look at the track file I created for the Silver State Challenge Classic (SSCC):
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<poiset>
<category>SSCC</category>
<poi>
<type>Trigger</type>
<coordinate>-115.01066,38.83703</coordinate>
<poiPosition>tc</poiPosition>
<poiLevel>1</poiLevel>
<triggerType>standinggo</triggerType>
<direction>0</direction>
<description>Starting Line 95</description>
</poi>
<poi>
<type>Alert</type>
<coordinate>-115.01396,38.82278</coordinate>
<poiPosition>tc</poiPosition>
<poiLevel>1</poiLevel>
<triggerType>alert</triggerType>
<direction>0</direction>
<description>100MPH</description>
</poi>
...
<poi>
<type>Alert</type>
<coordinate>-115.19238,37.68238</coordinate>
<poiPosition>tc</poiPosition>
<poiLevel>1</poiLevel>
<triggerType>alert</triggerType>
<direction>0</direction>
<description>105MPH</description>
</poi>
<poi>
<type>Trigger</type>
<coordinate>-115.22119,37.62734</coordinate>
<poiPosition>tc</poiPosition>
<poiLevel>1</poiLevel>
<triggerType>stop</triggerType>
<direction>0</direction>
<description>Finish Line</description>
</poi>
</poiset>
The remaining POI are Alerts that show the target speed for the upcoming section of the course. The Alerts are basically telling the driver what speed he/she should maintain until the next alert. In essence, this allows HLT to function like your navigator giving you instructions. Alerts can also be used to describe upcoming turns and other course information.
Re: How to create a track and reference lap for a road rally
Next up is the Lap file. Here is the reference lap file I used in the SSCC:
This type of file should begin to look familiar as it is another XML file. This file was generated using the spreadsheet we'll discuss in a later post. There are some differences between between a native HLT lap file and a the spreadsheet version:
1. The spreadsheet lap file only contains the necessary tags. The native file has car information, ODB, acceleration, and other tags that are not necessary for our purposes.
2. The native lap file has fixes or reading at regular intervals, anywhere from 1 to 10 per second. The spreadsheet version has fixes that just define the course. This means that a 10 mile straight could have only to fixes. Turns out this is not a problem.
The net effect of the above is that the resulting spreadsheet generated file is a lot smaller than an equivalent native file. This makes things simpler for us.
Let's go through the tags:
1. LapTimerDB is a Lap Timer database
2. name is the name of the DB
3. lap is the index of the lap
4. date is the starting date/time
5. lapTime is the lap time
6. track is the name of the track
7. addedAlignment is ??? (not important)
8. overallDistance is the length of the course in kilometres
9. recording denotes the beginning of the GPS points or fixes
10. fix is the recorded values
11. date, coordinate, and speed are self explanatory (speed is KPH)
12. direction is the angle of movement
13. relativeToStart is the cumulative distance and time from the start
14. positioning, satellites, hdop, and accuracy can be ignored
This ends the easy sections of this tutorial. Next we'll discuss batch files and uploading spreadsheet generated tracks and laps to HLT. But it is probably a good idea to pause for a day or two and see if there are any questions before proceeding.
Deven
Code: Select all
<?xml version="1.0" encoding="windows-1252"?>
<LapTimerDB>
<name>LapTimer Database</name>
<lap index="149">
<date>14-SEP-13,08:00:00.00</date>
<lapTime>53:59.59</lapTime>
<track>SSCC</track>
<addedAligned>true</addedAligned>
<overallDistance>145024.3</overallDistance>
<recording>
<fix index="8001">
<date>14-SEP-13,08:00:00.00</date>
<coordinate>38.83703,-115.01066,1724.6</coordinate>
<speed>0.0</speed>
<positioning>0,2</positioning>
<satellites>0</satellites>
<direction>198.4</direction>
<hdop>0.00</hdop>
<accuracy>5.0</accuracy>
<relativeToStart>0.0,00:00.00</relativeToStart>
</fix>
<fix index="8002">
<date>14-SEP-13,08:00:39.39</date>
<coordinate>38.82933,-115.01314,1717.7</coordinate>
<speed>80.5</speed>
<positioning>0,2</positioning>
<satellites>0</satellites>
<direction>193.7</direction>
<hdop>0.00</hdop>
<accuracy>5.0</accuracy>
<relativeToStart>882.7,00:39.39</relativeToStart>
</fix>
<fix index="8003">
<date>14-SEP-13,08:00:46.46</date>
<coordinate>38.82751,-115.01357,1715.1</coordinate>
<speed>112.7</speed>
<positioning>0,2</positioning>
<satellites>0</satellites>
<direction>187.8</direction>
<hdop>0.00</hdop>
<accuracy>5.0</accuracy>
<relativeToStart>1088.5,00:46.46</relativeToStart>
</fix>
<fix index="8004">
<date>14-SEP-13,08:00:53.53</date>
<coordinate>38.82531,-115.01386,1713.1</coordinate>
<speed>120.7</speed>
<positioning>0,2</positioning>
<satellites>0</satellites>
<direction>182.3</direction>
<hdop>0.00</hdop>
<accuracy>5.0</accuracy>
<relativeToStart>1334.4,00:53.53</relativeToStart>
</fix>
<fix index="8005">
<date>14-SEP-13,08:01:00.00</date>
<coordinate>38.82278,-115.01396,1712.7</coordinate>
<speed>152.9</speed>
<positioning>0,2</positioning>
<satellites>0</satellites>
<direction>181.7</direction>
<hdop>0.00</hdop>
<accuracy>5.0</accuracy>
<relativeToStart>1615.9,01:00.00</relativeToStart>
</fix>
<fix index="8006">
<date>14-SEP-13,08:02:49.49</date>
<coordinate>38.77881,-115.01519,1686</coordinate>
<speed>160.9</speed>
<positioning>0,2</positioning>
<satellites>0</satellites>
<direction>185.5</direction>
<hdop>0.00</hdop>
<accuracy>5.0</accuracy>
<relativeToStart>6506.3,02:49.49</relativeToStart>
</fix>
...
<fix index="8214">
<date>14-SEP-13,08:53:43.43</date>
<coordinate>37.63338,-115.21806,1224.5</coordinate>
<speed>160.9</speed>
<positioning>0,2</positioning>
<satellites>0</satellites>
<direction>206.8</direction>
<hdop>0.00</hdop>
<accuracy>5.0</accuracy>
<relativeToStart>144298.3,53:43.43</relativeToStart>
</fix>
<fix index="8215">
<date>14-SEP-13,08:53:59.59</date>
<coordinate>37.62734,-115.22119,1228.5</coordinate>
<speed>160.9</speed>
<positioning>0,2</positioning>
<satellites>0</satellites>
<direction>0.0</direction>
<hdop>0.00</hdop>
<accuracy>5.0</accuracy>
<relativeToStart>145024.3,53:59.59</relativeToStart>
</fix>
</recording>
</lap>
</LapTimerDB>
1. The spreadsheet lap file only contains the necessary tags. The native file has car information, ODB, acceleration, and other tags that are not necessary for our purposes.
2. The native lap file has fixes or reading at regular intervals, anywhere from 1 to 10 per second. The spreadsheet version has fixes that just define the course. This means that a 10 mile straight could have only to fixes. Turns out this is not a problem.
The net effect of the above is that the resulting spreadsheet generated file is a lot smaller than an equivalent native file. This makes things simpler for us.
Let's go through the tags:
1. LapTimerDB is a Lap Timer database
2. name is the name of the DB
3. lap is the index of the lap
4. date is the starting date/time
5. lapTime is the lap time
6. track is the name of the track
7. addedAlignment is ??? (not important)
8. overallDistance is the length of the course in kilometres
9. recording denotes the beginning of the GPS points or fixes
10. fix is the recorded values
11. date, coordinate, and speed are self explanatory (speed is KPH)
12. direction is the angle of movement
13. relativeToStart is the cumulative distance and time from the start
14. positioning, satellites, hdop, and accuracy can be ignored
This ends the easy sections of this tutorial. Next we'll discuss batch files and uploading spreadsheet generated tracks and laps to HLT. But it is probably a good idea to pause for a day or two and see if there are any questions before proceeding.
Deven
Re: How to create a track and reference lap for a road rally
addedAligned is the flag for automatic / triggered vs. manual recordings.
- Harry
- Harry
Re: How to create a track and reference lap for a road rally
Now that we've seen how to download track and lap data from HLT, let's do the reverse and send files to HLT. This will be a moderately difficult tutorial.
Attached are the files we'll upload: sscctrack.xml and sscclap.xml. The process is basically the same for both: compress the xml files, attach them to an email, and finally mail them to an account you can access on your device.
As we'll see later on, there is a LOT of trial and error (especially at first) when creating the lap and track files, so the above process gets repeated frequently. To make this tolerable, I wrote two Windows batch files, track.bat and lap.bat, that automate this process.
track.bat
lap.bat
You should save these batch files in your HLT directory. The batch files assume that the xml and gzip files are in directories named xml and gzip. The batch files also rely on a program called mailsend.exe which can be download from:
https://github.com/muquit/mailsend/
Like the 7za app, mailsend has to be installed in a location that can be "seen" from your HTL directory, so the easy choice is in c:\Windows.
You'll need to open the batch files in a text editor and configure the mail setting.
Next, you should download the attached xml files into HTL\xml.
Now it is time to run the batch files. Open the command prompt, navigate to your HTM directory, and type the following commands:
lap sscclap
track sscctrack
Finally, go to your device, open your email, and you should see two emails. Tap on the attachments and you should see an option to open them in HLT, which you want to select. Open HLT and you should see an SSCC track and one lap. Go ahead and inspect there as we will discuss them in more detail in a future post.
If you have run into difficulty with the batch files or you are an Apple PC user, you don't have to use the batch files. You will have to use other means to compress the xml files and giving the track and lap gzip files the extensions .hpoiz and .hlptrz, respectively. Then you'll have to email these to an email account you can access on your device.
Deven
Attached are the files we'll upload: sscctrack.xml and sscclap.xml. The process is basically the same for both: compress the xml files, attach them to an email, and finally mail them to an account you can access on your device.
As we'll see later on, there is a LOT of trial and error (especially at first) when creating the lap and track files, so the above process gets repeated frequently. To make this tolerable, I wrote two Windows batch files, track.bat and lap.bat, that automate this process.
track.bat
Code: Select all
del gzip\%1.hpoiz
7za u -tgzip gzip\%1.hpoiz xml\%1.xml
mailsend -f from@email.com -smtp mail.yourserver.com -auth-login -user username -pass password -t to@email.com -sub %1 -attach gzip\%1.hpoiz
Code: Select all
del gzip\%1.hlptrz
7za a -tgzip gzip\%1.hlptrz xml\%1.xml
mailsend -f from@email.com -smtp mail.yourserver.com -auth-login -user username -pass password -t to@email.com -sub %1 -attach gzip\%1.hlptrz
https://github.com/muquit/mailsend/
Like the 7za app, mailsend has to be installed in a location that can be "seen" from your HTL directory, so the easy choice is in c:\Windows.
You'll need to open the batch files in a text editor and configure the mail setting.
Next, you should download the attached xml files into HTL\xml.
Now it is time to run the batch files. Open the command prompt, navigate to your HTM directory, and type the following commands:
lap sscclap
track sscctrack
Finally, go to your device, open your email, and you should see two emails. Tap on the attachments and you should see an option to open them in HLT, which you want to select. Open HLT and you should see an SSCC track and one lap. Go ahead and inspect there as we will discuss them in more detail in a future post.
If you have run into difficulty with the batch files or you are an Apple PC user, you don't have to use the batch files. You will have to use other means to compress the xml files and giving the track and lap gzip files the extensions .hpoiz and .hlptrz, respectively. Then you'll have to email these to an email account you can access on your device.
Deven
- Attachments
-
- sscctrack.xml
- (4.9 KiB) Downloaded 231 times
-
- sscclap.xml
- (64.5 KiB) Downloaded 239 times
-
- 10 or more Posts ★
- Posts: 17
- Joined: Fri Apr 11, 2014 3:16 am
Re: How to create a track and reference lap for a road rally
Deven:
Great step-by-step instructions. I am still where we left off before July, so, I have some catching up to do. Hopefully I can get time within the next week.
I'd like to explain the panic that sets in for me when getting ready to start and curious how do you go at it and not get so stressed. I just so badly want to turn the car on and hit one button and everything does it thing. But that's not the case.
First, I have to start the car because many of my devices (OBDII, external GPS, iPad, iPhone, and GoPros) won't make it on battery power alone anymore. These devices reset every time I turn the ignition. So once I start the car, I don't want to turn it off or I'll lose connection with one or more devices.
Once running, I follow my step by step instructions on setting them all up and connecting them wirelessly or through BT. Once I have everything on, set up, and connected, then I have to put window nets up, harness, helmet, headset, and gloves on. At this point, if I lose connection, I've got to take all of that off to get it all sorted out.
Not wanting to be rushed, I start this process too early and then I end up sitting there with the car running and getting hot. A few weeks ago at Miller Motorsports, I got everything set up, even double checked, and feeling real good, but ended up shutting the car down and I lost connection and not everything paired back up. It was a real bummer.
Great step-by-step instructions. I am still where we left off before July, so, I have some catching up to do. Hopefully I can get time within the next week.
I'd like to explain the panic that sets in for me when getting ready to start and curious how do you go at it and not get so stressed. I just so badly want to turn the car on and hit one button and everything does it thing. But that's not the case.
First, I have to start the car because many of my devices (OBDII, external GPS, iPad, iPhone, and GoPros) won't make it on battery power alone anymore. These devices reset every time I turn the ignition. So once I start the car, I don't want to turn it off or I'll lose connection with one or more devices.
Once running, I follow my step by step instructions on setting them all up and connecting them wirelessly or through BT. Once I have everything on, set up, and connected, then I have to put window nets up, harness, helmet, headset, and gloves on. At this point, if I lose connection, I've got to take all of that off to get it all sorted out.
Not wanting to be rushed, I start this process too early and then I end up sitting there with the car running and getting hot. A few weeks ago at Miller Motorsports, I got everything set up, even double checked, and feeling real good, but ended up shutting the car down and I lost connection and not everything paired back up. It was a real bummer.
Re: How to create a track and reference lap for a road rally
But actually only the OBD device restarts when car ignition is changed?
-
- 10 or more Posts ★
- Posts: 17
- Joined: Fri Apr 11, 2014 3:16 am
Re: How to create a track and reference lap for a road rally
You could be right. I'll have to set everything up again and test, but seems that I would lose connection with the GoPro app and maybe the external GPS. I can't remember mostly because I was panicked at the time and didn't know where to start the troubleshooting. Plus HLT didm't prompt me to stage, which caused more panic. I think that has to do with poor GPS coordinates for the starting position. I don't use the devices often enough to be proficient. I have to read my step by step instructions. If things lose connection and even if I haven't completely garbed up, I still have a hard time accessing and confirming connection. The external GPS is all the way forward on the dash and zip tied to the defrost louvers, so I can't even see the lights. If the external GPS can work somewhere on the driver's side of the dash, that will make it a lot easier to set up and see the the lights indicating a connection. The GoPros are in their cases and the indicator light is facing away from me and its tough to get access to all 3 buttons (power, Shutter, and BT) where they are mounted. I am sure its all in practice.
Regardless, I am really hoping I can make HLT work this time. That would be exciting.
Regardless, I am really hoping I can make HLT work this time. That would be exciting.
-
- 10 or more Posts ★
- Posts: 17
- Joined: Fri Apr 11, 2014 3:16 am
Re: How to create a track and reference lap for a road rally
Devin:
I am almost there, but I don't know how to convert my spreadsheet to XML. And I think you already said that the data going to HTL needs to be in metrics, correct? Also, looking at your script, the times are all rounded. My times are down to the hundredth of a second. I just think I am missing a step. Can you share your spreadsheet and show the final steps? Thanks so much. This has been a great help and I really want to see it all work this time.
I am almost there, but I don't know how to convert my spreadsheet to XML. And I think you already said that the data going to HTL needs to be in metrics, correct? Also, looking at your script, the times are all rounded. My times are down to the hundredth of a second. I just think I am missing a step. Can you share your spreadsheet and show the final steps? Thanks so much. This has been a great help and I really want to see it all work this time.