forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneric_sensor_consts.h
39 lines (26 loc) · 1.26 KB
/
generic_sensor_consts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_
#define DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_
#define _USE_MATH_DEFINES
#include <math.h>
namespace device {
// Required for conversion from G/s^2 to m/s^2
constexpr double kMeanGravity = 9.80665;
// Required for conversion from deg/s^2 to rad/s^2
constexpr double kRadiansInDegreesPerSecond = M_PI / 180.0;
// Required for conversion from Gauss to uT.
constexpr double kMicroteslaInGauss = 100.0;
// Required for conversion from Milligauss to Microtesla.
constexpr double kMicroteslaInMilligauss = 0.1;
// Default rate for returning value of the ambient light sensor.
constexpr int kDefaultAmbientLightFrequencyHz = 5;
// Default rate for returning value of the accelerometer sensor.
constexpr int kDefaultAccelerometerFrequencyHz = 10;
// Default rate for returning value of the gyroscope sensor.
constexpr int kDefaultGyroscopeFrequencyHz = 10;
// Default rate for returning value of the magnetometer sensor.
constexpr int kDefaultMagnetometerFrequencyHz = 10;
} // namespace device
#endif // DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_