Sensor Logger is a cross-platform app available on both iOS (iPhone, Apple Watch & AirPods) and Android. Whilst the user experience of the application is largely the same, some units and reference frame definitions are different.
💡: New in Version 1.29: Toggling Standardise Units & Frames under Settings > Sensor Configuration will mostly eliminate the differences listed below. This is turned off by default to maintain backwards compatibility. But if you are building a new analysis pipeline, it is suggested that you toggle this on, especially if you are using the Studies feature with participants across platforms. Toggling this setting makes iOS (iPhone, Apple Watch & AirPods) values conform to Android conventions. Adjusting this setting on Android has no effect. For the plots and demonstrations below, data was taken from the three pictured phones.
By default, iOS (iPhone, Apple Watch & AirPods) and Android differ by a negative sign in all three x
, y
and z
axes. See this for a diagram. The same applies to the uncalibrated acceleration. If Standardise Units & Frames is toggled on, Sensor Logger will conform to the Android definition, as it is a right-handed-coordinate system.
![acceleration](https://private-user-images.githubusercontent.com/30114997/307529917-9bbfc15b-d91a-463d-aa27-5f3a94607029.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5Njk0NzQsIm5iZiI6MTczOTk2OTE3NCwicGF0aCI6Ii8zMDExNDk5Ny8zMDc1Mjk5MTctOWJiZmMxNWItZDkxYS00NjNkLWFhMjctNWYzYTk0NjA3MDI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDEyNDYxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJmOGVlNmZjMGI4N2UyYzRjYjM3ZWEwOTZkN2ZhMjRhMzI1YWQ4NGI3Y2ViMmVjMmFlNjEzYmVhZWJkYjAxMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.iWMkSg9NPLZAnucrpXiPiYZid_8St5n5SvmTQa2xWT4)
By default, iOS (iPhone, Apple Watch & AirPods) and Android differ by a negative sign. When you place your phone flat on a table, the gravity vector points in -z
on iOS and +z
on Android. If Standardise Units & Frames is toggled on, Sensor Logger will conform to the Android definition. Note that the test data was taken with the phone's screen face downwards to prevent accidental input, so gravity points in the opposite direction. Regardless, the key takeaway is the alignment in axes definitions across platforms once standardisation is turned on.
![gravity](https://private-user-images.githubusercontent.com/30114997/307530399-8b532a91-b79d-4d5a-80ad-9ea96b9204c9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5Njk0NzQsIm5iZiI6MTczOTk2OTE3NCwicGF0aCI6Ii8zMDExNDk5Ny8zMDc1MzAzOTktOGI1MzJhOTEtYjc5ZC00ZDVhLTgwYWQtOWVhOTZiOTIwNGM5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDEyNDYxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ5ODIxNTBiMmE5MGFiZmZkNWIzYWRjMzFiN2JkYjhiYjI1NTU5OWRjZmVlOTZhMjQ2ZDM0MTljOGQ5YjM1ZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ki0-yyzlsZ7DWIRQhkX3WKxqwZIuMNLHa694STLhqAA)
On iOS , yaw
is zero when the x
points to true north, whereas on Android, it is the magnetic north. Understand the differences between the two, and consider whether this matters to your analysis.
On iOS, yaw
increases when you turn counterclockwise around the z
axis. On Android, yaw
increases when you turn clockwise around the z
axis. See this for a diagram.
On iOS, pitch decreases as you rotate around the x
axis clockwise. On Android, pitch decreases as you rotate around the x
axis counterclockwise.
If Standardise Units & Frames is toggled on, Sensor Logger will conform to the Android directions. However, the difference between true and magnetic north remains unaccounted for. You can observe this in the plot below, where the standardised iOS yaw
and Android yaw
are offset by an amount.
![orientation](https://private-user-images.githubusercontent.com/30114997/307530431-d19898b4-7959-4746-8793-04ac610134a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5Njk0NzQsIm5iZiI6MTczOTk2OTE3NCwicGF0aCI6Ii8zMDExNDk5Ny8zMDc1MzA0MzEtZDE5ODk4YjQtNzk1OS00NzQ2LTg3OTMtMDRhYzYxMDEzNGE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDEyNDYxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwMDcxMTNlNzI0MmQzMjVkNTQwNDFkMDgzY2Y2NzIzYTAzYjc5ZTgxMTAwYTBmZDBhMDEwNmIxNGRmMWZmZjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.PzT6hr_HECpLYhOVSv7S1rmHb04unrz3T1ipx3Ztw-4)
iOS and Android report with the same sign convention for the rotation rate from the Gyroscope sensor. Toggling Standardise Units & Frames has no effect here.
![rotation_rate](https://private-user-images.githubusercontent.com/30114997/307530475-8987be74-a4db-4efc-a43b-f2f599d8a8bf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5Njk0NzQsIm5iZiI6MTczOTk2OTE3NCwicGF0aCI6Ii8zMDExNDk5Ny8zMDc1MzA0NzUtODk4N2JlNzQtYTRkYi00ZWZjLWE0M2ItZjJmNTk5ZDhhOGJmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDEyNDYxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZmMDliN2NiYzJjYmFjYTA0NDM2NjE5ODM3ZmMwODEyYzVkNmExMDhhNzZhNDk5MTk3MjMyMjVjZjhhMmU4NjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-C9fH0IkBtrfrsvKXust_8yH4OjMaO5fx6aKJ41DX1w)
Only for uncalibrated acceleration:
- On iOS, this is in standard gravity (g).
- On Android, this is in meters per second squared (ms-2)
Note that the calibrated version (default) of acceleration is unaffected, and is (ms-2) on both platforms. Please also see the comprehensive Units Reference. If Standardise Units & Frames is toggled on, Sensor Logger will conform to the Android definition of ms-2, in addition to applying the aforementioned sign convention change (See the Acceleration section).
![uncalibrated_acceleration](https://private-user-images.githubusercontent.com/30114997/307530505-99988cd0-91aa-42d3-97f3-877e873a5777.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5Njk0NzQsIm5iZiI6MTczOTk2OTE3NCwicGF0aCI6Ii8zMDExNDk5Ny8zMDc1MzA1MDUtOTk5ODhjZDAtOTFhYS00MmQzLTk3ZjMtODc3ZTg3M2E1Nzc3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDEyNDYxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzODY1NWE4YmQ1NzNhOTRkZjYwN2ZjNjhiNjA0ZTg2ZTczMzlkNDJkYmRmNmYzMmVmYTZhNzFmY2JjYWYwZmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.dMoustaS9wz0zTkgbQyFubD8eq1k2nhn5RK_TGqlnmU)
The unit for acceleration from the Apple Watch and AirPods is in standard gravity (g). And the gravity vector from the Apple Watch is in standard gravity (g). However, when Standardise Units & Frames is toggled on, all units will be consistently in SI. Namely:
- Acceleration and gravity vector values from Apple Watch will be in meters per second squared (ms-2).
- Acceleration and gravity vector values from AirPods will be in meters per second squared (ms-2).
It is strongly recommended that you toggle Standardise Units & Frames on -- by default, it is off for backwards compatibility reasons.
There are other considerations between iOS and Android, depending on your application and analysis:
- Sampling frequency;
- Sensor accuracy and precision;
- Platform-level data processing and fusion pipelines for calibrated or derived values, such as orientation.
Toggling Standardise Units & Frames will not account for these potential differences.
If you notice any other differences between operating systems when using Sensor Logger, please reach out or raise an issue in this repository.