Page 1 of 1

Lineal Acceleration data seems incorrect

Posted: Fri Aug 14, 2015 4:26 pm
by MatthewS
In reviewing my laps, I often see negative lineal acceleration values while my speed is increasing. Any thoughts on what could be the cause of this and what I could do to correct?

Here's some sample data I exported from a lap:

Code: Select all

INDEX   TIME_LAP    SPEED_MPH   HEADING_DEG DISTANCE_MILE   LATERALG    LINEALG
58600   80.28       40.7        304.6        1.161964       1.01        -0.01
58601   80.38       41.26       307.6        1.163145       1.04        -0.02
58602   80.48       41.51       309.6        1.164263       1.13        -0.04
58603   80.58       42.32       311.7        1.165506       1.14        -0.08
58604   80.68       42.87       311.9        1.166687       1.09        -0.09
58605   80.78       43.62       311.5        1.167805       1.07        -0.09
58606   80.88       44.3        309.9        1.168986       1.07        -0.04
58607   80.98       44.43       309.2        1.170166       1.04        0
Thanks!
Matt

Re: Lineal Acceleration data seems incorrect

Posted: Fri Aug 14, 2015 4:34 pm
by Harry
Check your mounting position (Illustration 4 in LapTimer's Quick Reference). Or read the new Acceleration Handling document available on www.gps-laptimer.de/documentation

Harry

Re: Lineal Acceleration data seems incorrect

Posted: Mon Aug 17, 2015 4:17 pm
by gplracerx
The device orientation is clearly incorrect. You're showing 1g lateral, but the heading isn't changing. Was the phone in portrait or landscape orientation? Video wants to start in portrait and be switched to landscape. At which point, the accelerometer axes change. If you touch the video button in landscape and don't change the orientation, the lateral acceleration axis will be vertical, so you'll see a constant 1g. Been there, done that.

Re: Lineal Acceleration data seems incorrect

Posted: Mon Aug 17, 2015 5:17 pm
by Harry
Missed that. The usual reason for a 1 G lateral acceleration is the device has been rotated while driving already. LapTimer does not accept device rotations while driving to not flip the screen while going through a corner fast. This in turn means R[O] mentioned in the document is not adjusted to the new device orientation and measurements are wrong.

Harry

Re: Lineal Acceleration data seems incorrect

Posted: Mon Aug 17, 2015 9:23 pm
by gplracerx
At 42mph, to get a more or less constant 1g lateral, the yaw rate would be ~30 degrees/second, or 21 degrees change over the 0.7 seconds of the record. Given the actual heading change, the lateral g should have been negative and then positive, or the other way around, as the heading increased and then decreased.

Re: Lineal Acceleration data seems incorrect

Posted: Tue Aug 18, 2015 5:06 pm
by MatthewS
Mounting position would've been landscape, facing forward, using RAM mount with suction cup directly beside rear view mirror.

I'm wondering if it's just "noise" from driving across a crack in the asphalt, for instance. It's not completely rigid so maybe it swings forward and back?

Attached is a different lap for analysis.

Re: Lineal Acceleration data seems incorrect

Posted: Tue Aug 18, 2015 7:21 pm
by gplracerx
For a complete analysis, I need the GPS latitude and longitude.

Re: Lineal Acceleration data seems incorrect

Posted: Tue Aug 18, 2015 8:56 pm
by gplracerx
The orientation is reasonably correct for that lap, but there are discrepancies between the lineal acceleration calculated from the rate of change of velocity, the lateral acceleration calculated from speed and yaw rate and the measured lateral and lineal acceleration. It looks like there's too much filtering on the measured acceleration data. What is the accelerometer Update Rate under Accelerator Tweaks in Expert Settings? I always use the maximum rate, but then I'm autocrossing where direction changes are faster and more frequent than on a race track. I certainly wouldn't use less than 30Hz even on a track.

Unfortunately, that won't help with data already acquired.

Re: Lineal Acceleration data seems incorrect

Posted: Tue Aug 18, 2015 9:49 pm
by MatthewS
Indeed it is being filtered! I think some time ago I (foolishly now, I see) decided that since my GPS update rate was only 10Hz, I would set my accelerometer to 10Hz as well.

It seems my phone (iPhone 5) is only capable of 50Hz max accel update rate. I tried 100Hz and it went to 1Hz in HLT. Same with a couple other values I tried that were >70. Currently I have it at 65Hz and when viewing in HLT it starts around 63Hz and stabilizes at 50Hz.

Thanks for the help! I'll try that and see if it fixes the issue. Unfortunately no more autox for about 5 more weeks.

Re: Lineal Acceleration data seems incorrect

Posted: Tue Aug 18, 2015 9:59 pm
by gplracerx
FYI, here's a plot of lateral g from your accelerometer data and calculated from speed and yaw rate: (speed(m/s)*yaw rate(radians/sec)/9.81

Pin turns are evil, IMO. For some reason, I get 91Hz on my iPhone 4s.

Image

For those who want to try this at home, divide KPH by 3.6 to get m/s and convert yaw rate in degrees/sec, which you obtain by dividing the difference in heading by the difference in time to radians/sec by multiplying by pi and dividing by 180. Watch for the spikes generated when going from 359 to 1 or 1 to 359. Some exponential smoothing of the yaw rate data and or the calculated lateral acceleration makes things look nicer. You can also calculate linear acceleration by calculating the time derivative of velocity in m/s just like calculating yaw rate by differentiating the heading data and dividing by g (9.81m/s).

For completeness, here's the calculated and measured lineal acceleration.

Image