Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
|
Reilly Grant (use Gerrit)
2016/11/11 16:26:53
I noticed that the Windows patch also adds some co
maksims (do not use this acc)
2016/11/14 13:32:09
shalamov@ will add other needed consts for windows
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ | |
| 6 #define DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ | |
| 7 | |
| 8 #include <math.h> | |
| 9 | |
| 10 namespace device { | |
| 11 | |
| 12 // Required for conversion from G/s^2 to m/s^2 | |
| 13 constexpr double kMeanGravity = 9.80665; | |
| 14 | |
| 15 // Required for conversion from deg/s^2 to rad/s^2 | |
| 16 constexpr double kRadiansInDegreesPerSecond = M_PI / 180.0; | |
| 17 | |
| 18 // Required for conversion from Gauss to uT. | |
| 19 constexpr double kMicroteslaInGauss = 100.0; | |
| 20 | |
| 21 // Default rate for returning value of the ambient light sensor. | |
| 22 constexpr int kDefaultAmbientLightFrequencyHz = 5; | |
| 23 | |
| 24 // Default rate for returning value of the accelerometer sensor. | |
| 25 constexpr int kDefaultAccelerometerFrequencyHz = 10; | |
| 26 | |
| 27 // Default rate for returning value of the gyroscope sensor. | |
| 28 constexpr int kDefaultGyroscopeFrequencyHz = 10; | |
| 29 | |
| 30 // Default rate for returning value of the magnetometer sensor. | |
| 31 constexpr int kDefaultMagnetometerFrequencyHz = 10; | |
| 32 | |
| 33 } // namespace device | |
| 34 | |
| 35 #endif // DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ | |
| OLD | NEW |