Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 6.15 KB

CROSSPLATFORM.md

File metadata and controls

69 lines (49 loc) · 6.15 KB

Cross-Platform Differences & Standardisation

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.

IMG_0012

Coordinate Differences

Acceleration

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

Gravity

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

Orientation

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

Rotation Rate

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

Unit Differences

For Phones

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

For Watches & Headphones

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.

Other Differences

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.

Notice Anything Else

If you notice any other differences between operating systems when using Sensor Logger, please reach out or raise an issue in this repository.