iPhone and iPad Accelerometer Orientation Question

Any discussion on using LapTimer. Please use this forum in case you need guidance on how to use LapTimer or perform a certain operation
jmciver
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 54
Joined: Mon Jun 11, 2012 5:11 pm

iPhone and iPad Accelerometer Orientation Question

Post by jmciver »

I have two questions regarding two different hardware configurations running HLT GP, one for an iPhone 4 and the other for an iPad 3:

Option 1: iPhone 4 (w/iOS 7)
I am using a GoPro as the primary camera so I want to point the iPhone (running HLT GP) towards me while I am driving (or possibly some other direction other than facing front). My question is will the accelerometers in the iPhone still calibrate correctly even when the iPhone is not pointed directly forward?

2. iPad 3 (w/iOS 8)
Due to the hardware limitations of the iPhone 4, I am considering using my iPad 3 as the primary hardware to run HLT GP. However, since I still plan to use the GoPro as the primary camera, the iPad 3 would be mounted behind my seat (attached to the roll bar) with the primary camera facing to the rear (taking video out of the rear window since it is there). My concern is that since the iPad 3 will be facing towards the rear, HLT will think the car is operating "in reverse" while driving on the track. Will this be the case or will the iPad accelerometers still know I am driving forward even though the iPad will be facing rearward? I am asking about this now since it would be very difficult to test while driving and I would like to know if it would work before I buy the roll bar attachments for the iPad.

Thanks!!
User avatar
Harry
Site Admin
Site Admin
Posts: 10648
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: iPhone and iPad Accelerometer Orientation Question

Post by Harry »

On 1: yes any yaw and pitch is neutralized by LapTimer's calibration. For the iPhone4, please do not use video mode while recording - it will overload the system. Using an external GoPro is certainly fine.

On 2: check for the Reverse Lateral Acceleration option in LapTimer's Expert Settings. It will do the job when the iPad is pointed to the back.

Harry
Image Image Image Image
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: iPhone and iPad Accelerometer Orientation Question

Post by gplracerx »

Is it still true that you can't orient the device with the plane of the screen parallel to the Earth's surface?
User avatar
Harry
Site Admin
Site Admin
Posts: 10648
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: iPhone and iPad Accelerometer Orientation Question

Post by Harry »

gplracerx wrote:Is it still true that you can't orient the device with the plane of the screen parallel to the Earth's surface?
At least if you want LapTimer to record acceleration, this doesn't work.

- 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: iPhone and iPad Accelerometer Orientation Question

Post by jmciver »

Thanks for the response!

On a side note, thanks for the warning about the iPhone 4, although I have made successful overlaid videos (both with BT and WiFi OBD devices) without any significant crashing issues. Granted it was with Petrol Head, I have yet to do anything with GP yet, but I think I will use my iPad to run HLT GP now (it is the model with built-in GPS) and use the iPhone 4 as a MultiCam.
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: iPhone and iPad Accelerometer Orientation Question

Post by gplracerx »

At least if you want LapTimer to record acceleration, this doesn't work.

- Harry
This is probably abusing a deceased equine, but...

If you used a 3D coordinate transform for accelerometer calibration (yaw, pitch and roll Euler angles rather than just yaw and pitch, although a direction cosine matrix or quaternion is probably easier to implement, as those don't suffer from gimbal lock), device orientation would only matter for video using the internal camera. You would always have lateral and lineal acceleration in the vehicle frame of reference regardless of device orientation.
User avatar
Harry
Site Admin
Site Admin
Posts: 10648
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: iPhone and iPad Accelerometer Orientation Question

Post by Harry »

The transformation is actually a rotation plus a translation to eliminate gravity. Next version will come with a calibration lock by the way ;-)

Harry
Image Image Image Image
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: iPhone and iPad Accelerometer Orientation Question

Post by gplracerx »

Strictly speaking, you don't have to eliminate gravity, you just have to rotate the coordinate system so that one of the transformed axes is aligned with the gravity vector then calculate the rotation around that axis that aligns the other two axes with the lineal and lateral axes of the car. Then you can ignore the gravity axis unless, of course, you're going up or down hill or in a banked turn. In that case, the lateral and lineal acceleration of the vehicle will not be the same as that calculated from GPS position vs time, which is always in the Earth frame.

You also can't rotate the acceleration vector from an arbitrary device frame to the vehicle frame unless you have data from all three accelerometer axes.
gplracerx
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 836
Joined: Thu May 03, 2012 5:26 am
Location: Kingsport, TN USA

Re: iPhone and iPad Accelerometer Orientation Question

Post by gplracerx »

Thanks in advance for the calibration lock feature.
jmciver
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 54
Joined: Mon Jun 11, 2012 5:11 pm

Re: iPhone and iPad Accelerometer Orientation Question

Post by jmciver »

Bringing this one back to ask an additional question....

I just did a small test video driving in my neighborhood. My iPad will be facing rearward (looking out the rear window). I turned on 'Reverse Lateral Acceleration' but HLT still got the g-forces backwards. Before I started recording, I tapped on the g-meter in the video display, after the iPad was mounted, in order to re-calibrate HLT.

What am I doing wrong? In the settings, there is also an option for 'Reverse Longitudinal Acceleration', which I did not turn on. Should I turn this on as well if my iPad will be facing rearward?
Post Reply