iPhone and iPad Accelerometer Orientation Question
iPhone and iPad Accelerometer Orientation Question
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!!
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!!
Re: iPhone and iPad Accelerometer Orientation Question
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
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
-
- 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
Is it still true that you can't orient the device with the plane of the screen parallel to the Earth's surface?
Re: iPhone and iPad Accelerometer Orientation Question
At least if you want LapTimer to record acceleration, this doesn't work.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?
- Harry
Re: iPhone and iPad Accelerometer Orientation Question
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.
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.
-
- 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
This is probably abusing a deceased equine, but...At least if you want LapTimer to record acceleration, this doesn't work.
- Harry
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.
Re: iPhone and iPad Accelerometer Orientation Question
The transformation is actually a rotation plus a translation to eliminate gravity. Next version will come with a calibration lock by the way 
Harry

Harry
-
- 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
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.
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.
-
- 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
Thanks in advance for the calibration lock feature.
Re: iPhone and iPad Accelerometer Orientation Question
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?
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?