[FAQ] Adjusting Calibration 'after the fact'

All threads that are outdated (e. g. problem with an older version that was replaced by a new one) are moved here.
Nizzle
10 or more Posts ★
10 or more Posts ★
Posts: 11
Joined: Fri Apr 12, 2013 5:57 pm

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by Nizzle »

Harry wrote:Yes, the Dual will give you much better values here. On recalibration: usually LapTimer keeps a calibration achieved. There are certain situations however, things are reset. LapTimer runs a sanity check calibration is fine from time to time. If e.g. LapTimer detects zero speed, but a high acceleration (actually it should be zero), it will start over automatically.

- Harry
Harry, thanks. That's what I wanted to hear. looking at the first good image from my pictures above, I can imagine a 5x improvement would make that picture a LOT more informative. W/a 1Hz data rate on both GPS and the Accelerometer, I don't really think you can gather any useful data about your driving from that. I want to see where my measured brake zone are, where I'm accelerating vs where my friend is braking and accelerating. Looking at my videos w/the Overlay, There is a noticible delay between the video and the acceleration circle. Through the slalom, the acceleration circle lags behind by about 1 cone. It's still neat to see. Will have to upgrade to the Dual XGPS 150.

Part of the course was rediculously rough for the car. I am wondering if that might have had something to do with the calibration getting out of wack.
jmciver
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 54
Joined: Mon Jun 11, 2012 5:11 pm

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by jmciver »

Harry wrote:Acceleration recalculates longitudinal and lateral acceleration based on GPS. There is no way to revert to measured data - except by exporting the lap data to .hlptrl to have a backup. Accuracy is for external GPSes only (actually an Expert function that should not be ran except when advised).

- Harry
Could you elaborate a bit more on this? I also mount my iPhone on my roll bar using a Ram Mount system. SInce I use the forward facing camera, I can't see the screen after I put it in place. In my last track event, I had data for a session where the left-to-right was ok, but the front-to-back was backwards. See video below...

http://www.youtube.com/watch?v=iUjuqoxB ... e=youtu.be

I would think that mathematically correcting the data should be pretty easy (just changing some data from '+' to '-' or vice versa). But is it possible to export the data, fix it, and then import it back into HLT so that it can be overlaid properly with the video?
User avatar
Harry
Site Admin
Site Admin
Posts: 10124
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by Harry »

You need to switch the sign of lineal acceleration, the lateral part looks fine. I'd assume yaw compensation would not work correctly with the iPhone turned around the upward axis, but as you will point the phone exactly in driving direction it is zero anyway.

To turn lineal acceleration, export the lap to .hlptrl. Once it arrives (as .hlptrz), first uncompress and then open it using a plain text editor (TextWrangler on MacOSX, Notepad+ on Windows). There are several ways to uncompress, but the most general is renaming the file from .hlptrz to .hlptrl.gz, click it and hope you have a gzip application installed doing the job.

In the text file you will see plenty of entries like this:

Code: Select all

				<acceleration>
					<source>0</source>
					<lateral>-0.12</lateral>
					<lineal>-0.61</lineal>
					<coordinate>50.338367,6.953428</coordinate>
				</acceleration>
What you need to do is replacing any "<lineal>-" to "<lineal>" and any "<lineal>" to "<lineal->". That is actually not as simple as it looks, because replacing e.g. "<lineal>-" by "<lineal>" first, will leave you with positive values only and you are not able to filter those that need to be converted to negatives. So what you want to do is a three step replace all:
  1. replace all using text find/replace "<lineal>-" by "<lineal>+"
  2. replace all using regular expression find/replace "<lineal>([^+])" by "<lineal>-\1"
  3. replace all using text find/replace "<lineal>+" by "<lineal>"
The second replacement requires a so called regular expression replace as you want to replace any occurance of "<lineal>" not followed by a "+" to be replaced by "<lineal>-" plus what ever digit found as the first character behind the "<lineal>".

In TextWrangler this looks actually like this (regular expressions are turned on using the "grep" switch. That works similar in Notepad+ - but I haven't tested.
  1. Image
  2. Image
  3. Image
Once you have processed all three steps (should be a huge number of replacements each, check some samples), save the .hlptrl file, compress it to .hlptrl.gz, rename it to .hlptrz and send it back to any email account on your iPhone, select the attachment, and open in LapTimer. This will actually double the respective lap, one with original acceleration, and one with adjusted.

Last remark: the map and kml views will still look wrong as the green / yellow / red polygons are not recalculated (see "<coordinate>50.338367,6.953428</coordinate>" in the sample above).

I think thats pretty elaborated :-D

- Harry
Image Image Image Image
jmciver
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 54
Joined: Mon Jun 11, 2012 5:11 pm

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by jmciver »

Wow! A lot more difficult than using the simple "find and replace" functionality found in MS Word, but I understand the basic concept of what needs to be done. I will give it a shot.

On a related note, is there anyway I can prevent this from happening in the future? As I mentioned before, my phone is mounted behind me on my roll bar facing forward, so I can't see the screen if I turn around in the drivers seat. I have been mounting the phone horizontally, should I try vertically next time or could the same issue happen again? Of note, I have made videos before, mounting the phone in the same location and horizontally and the acceleration data was calculated properly (it was with a previous version of HLT if it matters, back in Apr 2013)
User avatar
Harry
Site Admin
Site Admin
Posts: 10124
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by Harry »

That would be the same for Word...

You cannot prevent this wrong direction for the future as using LapTimer turned by 180 degrees is simply not supported...

- Harry
Image Image Image Image
User avatar
i-Zapp
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 25
Joined: Mon Apr 22, 2013 5:42 pm

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by i-Zapp »

Just ran HLT v18 on a motorbike and it would appear that the lat and long accel axis are swapped. The lap times are ok but the lap map shows up as a straight line instead of the correct track circuit profile. My lineal accel values are much higher than my lateral ( not normal). Interestingly a friend also ran same track and had no issue. Is this a accel calibration issue? Can it be corrected?
User avatar
Harry
Site Admin
Site Admin
Posts: 10124
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by Harry »

For motorbikes, measured lateral acceleration does not exist / is noise only. Please use the Recalculate button in Lap Details to calculate it from GPS.

Harry
Image Image Image Image
User avatar
i-Zapp
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 25
Joined: Mon Apr 22, 2013 5:42 pm

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by i-Zapp »

Harry wrote:For motorbikes, measured lateral acceleration does not exist / is noise only. Please use the Recalculate button in Lap Details to calculate it from GPS.

Harry
sorry for not being clearer. yes, i am familiar with this and have been using pre-v18 HLT successfully since last spring. i have attempted the recalculation function on this session without success. However i was under the impression that v18 now uses the motorbike's lean angle to properly calculate lateral acceleration without the need to 'recalculate'. As a biker / HLT user i am aware that this is (was) required, this nuance is likely not obvious to the uninitiated and for this reason i thought it was being addressed in v18.

now that i've had a chance to look at the data in detail by examining the CSV raw files i believe the issue is unrelated to calibration, but seems to be some errant data from another track that seems to be appended to the beginning of each of new sessions. i will post this as a seperate item.
User avatar
Harry
Site Admin
Site Admin
Posts: 10124
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by Harry »

Lean angle is derived from calculated lateral acceleration, it is not measured.

- Harry
Image Image Image Image
Qomomoko
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 21
Joined: Fri May 16, 2014 2:29 pm

Re: [FAQ] Adjusting Calibration 'after the fact'

Post by Qomomoko »

So besides pressing the recalculate button, positioning the phone vertically ( in a non horizontal as in when laying on a table) position is needed to get proper lean angle?

My youtube channel can be searched under my name Qomomoko to see what my lean angle looks on overlay video.

Here is one link
http://youtu.be/VaHVF3GYiGA
Post Reply