2.9 Gyro Sensor

2.9.1 Gyro Sensor: Zero-Point Drift

Discrepancies in the gyro sensor’s zero-point—called zero-point drift—occur as a result of the environment and the passage of time. Zero-point drift can shift the zero-point offset by up to 50 degrees per second (dps). This not only reduces the accuracy of the angular velocity input values reported by the sensor, it reduces the accuracy of the attitude calculated from the angular velocity input values. Design your application so that it can be played without problems even when the zero-point drifts by 50 dps (the maximum amount).

For example, you should be able to take any of the following steps to handle this:

  • Design your game play so that it is not affected by drift of approximately 50 dps.
  • Enable an automatic zero-point drift correction feature while the gyro sensor is being used, and tell the user that the zero point will be corrected when the system is at rest (details below).
  • Enable an automatic correction feature somewhere (as an option, for example) and provide a sequence for correcting the gyro sensor (details below).

For more information about the system’s zero-point drift correction feature and how to use it, see the "Gyro Sensor" section in the Nintendo 3DS Programming Manual: System. We describe examples of how to handle this below, but applications are not required to be implemented in exactly this way as long as they are designed to play without a problem.

If You Enable Automatic Correction

Keep the system's zero-point drift correction feature enabled as much as possible, although it is acceptable to disable it to (for example) capture extremely slow or small movements.

The zero-point drift correction feature is most effective when the Nintendo 3DS system is as close to at-rest as possible; by using it, you can expect improved accuracy. Therefore, if you enable the automatic correction feature while the gyro sensor is in use, we recommend informing the user that zero-point drift correction is more effective when the Nintendo 3DS system is at rest. For example, before using the gyro sensor you can display a message that prompts the user to place the Nintendo 3DS on a flat and level surface and wait a short time if the system does not seem to be responding correctly to user input.

If You Provide a Sequence for Correcting Zero-Point Drift

Even if you can't enable the automatic zero-point drift correction feature when the gyro sensor is in use, you still have other options available: for example, you could implement a separate sequence for correcting zero-point drift. Using the Wii Remote Plus as an example, a correction sequence generally asks the player to place the controller in an at-rest position and then confirms that the correction is complete before allowing the application to continue. With a handheld device such as the Nintendo 3DS, however, it may not be possible for the user to place the system in an at-rest position (because they may be in a moving vehicle, for example). Be sure to design your application to account for this fact. For example, if a certain period of time passes without the Nintendo 3DS system being placed at-rest, you could allow the application to proceed but notify users that the system may not seem to respond correctly to user input.

To confirm that the zero-point drift correction has completed, you must prompt the player to place the system in an at-rest position and then confirm that the angular velocity is zero. However, to prevent this from being affected by individual differences between Nintendo 3DS systems, you should allow a little leeway in the determination of whether the system is at rest. For example, you could adopt as your criteria that the values obtained by the nn::hid::CTR::GyroscopeReader::ReadLatest function for speed along the different axes do not exceed ±0.01 during a 2-second sampling period.

2.9.1.1 Gyro Sensor: Handling Zero-Point Drift

Guideline Item
A zero-point offset of up to 50 dps must not produce bugs that affect application progress. 
Software to Be Tested
Applications that use the gyro sensor.
Test Method
  1. Using the Config tool, select the Gyro/Accel Cal for Check feature and set RPM 0 to minus and RPM Sensitivity to zero for Gyro X, Y, and Z.
  2. Play through, from beginning to end, all application modes that use the gyro sensor.
  3. Using the Config tool, select the Gyro/Accel Cal for Check feature and set RPM 0 to plus and RPM Sensitivity to zero for Gyro X, Y, and Z.
  4. Play through, from beginning to end, all application modes that use the gyro sensor.
Pass/Fail Determination

Passes if at least one of the following conditions is met in steps 2 and 4.

  • The application's gameplay is not affected.
  • Automatic zero-point drift correction is implemented and active.
  • The application implements an option allowing the user to perform correction.

2.9.2 Gyro Sensor: At-Rest Noise

The gyro sensor’s angular velocity output values can drift by up to ±1.8 dps due to noise in the sensor itself, called at-rest noise. You can ignore this drift by enabling the zero-point play tolerance correction feature in the HID library. (The play tolerance is a preset threshold for input values, allowing the system to ignore or otherwise correctly handle small variations in input.) However, it is acceptable to disable the correction feature when you want to detect small movements or otherwise have a reason for obtaining more sensitive values. In situations where you disable the correction feature, you must ensure that there is no impact on the ability to progress in the application if gyro sensor output drift of ±1.8 dps occurs during a scene where the gyro sensor is used.

In particular, when the application is determining whether the system is at rest, you must call the nn::hid::GyroscopeReader::SetZeroPlayParam and IsEnableZeroPlay functions and set an appropriate value for the zero-point play tolerance.

2.9.2.1 Gyro Sensor: Handling At-Rest Noise

Guideline Item
An error of ±1.8 dps in the gyro sensor due to at-rest noise must not impede progress in the application. 
Software to Be Tested
Applications that use the gyro sensor.
Test Method
Check the source code.
Pass/Fail Determination
Passes if the application takes steps to handle at-rest noise in the gyro sensor and thereby ensures that when at-rest noise occurs, the application progresses without problems through scenes that use the gyro sensor.

2.9.3 Gyro Sensor: Sensitivity Drift

The sensitivity of the gyro sensor can drift by up to ±8%, but there is no means of correcting this. After factoring in the potential offset from zero-point drift, design your application to use values 10% lower than the theoretical maximum measurable input value—even though the gyro sensor can detect up to approximately 1800 dps, do not design your application to anticipate angular velocity values above approximately 1620 dps. For example, it is prohibited to design an application where events occur when the angular velocity is 1700 dps or higher.

Similarly, the angle of rotation value is also subject to drift of ±8%. Consequently, the value from the gyro sensor might only be 331.2° (360° × 0.92) even after the user has fully rotated the Nintendo 3DS system. Or conversely, the angle of rotation value obtained might be 360° even though the user has not fully rotated the system. This angle of rotation drift is cumulative for continued use of the gyro sensor. As a result, when rotating the Nintendo 3DS system exactly once a second with a drift of ±8%, a drift of approximately 30° accumulates every second for an angle of rotation drift of roughly 300° after 10 seconds. Applications that use angle of rotation values must therefore allow for this ±8% drift. One possible approach would be to use the nn::hid::CTR::GyroscopeReader::SetAngle function to reset the angle of rotation as needed.

2.9.3.1 Gyro Sensor: Handling Sensitivity Drift

Guideline Item
The maximum input angular velocity value must be 10% less than the measurable limit.
Software to Be Tested
Applications that use the gyro sensor.
Test Method
  1. Using the Config tool, select the Gyro/Accel Cal for Check feature and set RPM 0 to zero and RPM Sensitivity to minus for Gyro X, Y, and Z.
  2. Play through, from beginning to end, all application modes that use the gyro sensor.
  3. Using the Config tool, select the Gyro/Accel Cal for Check feature and set RPM 0 to zero and RPM Sensitivity to plus for Gyro X, Y, and Z.
  4. Play through, from beginning to end, all application modes that use the gyro sensor.
Pass/Fail Determination
Passes if the application can be played without problems in steps 2 and 4.

 


CONFIDENTIAL