Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6e0ca14

Browse files
committed
Added Magnetometer.expectedMagneticFieldStrength() method
1 parent 0a9804f commit 6e0ca14

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎api/MotionSense.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class Magnetometer {
5656
// Results are in uT (micro Tesla).
5757
virtual bool readMagneticField(float &x, float &y, float &z) = 0;
5858

59+
// Returns the expected field strength. Filter algorithms can use this value
60+
// to detect and ignore when a strong magnetic field or nearby ferrous metal
61+
// objects interfere with the magnetometer readings.
62+
// Defaults to 50.0 uT for sensors that lacks this calibration info.
63+
virtual float expectedMagneticFieldStrength() { return 50.0f; }
64+
5965
// Number of samples in the FIFO.
6066
virtual unsigned int availableMagneticField() { return 1; }
6167

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /