Chromium Code Reviews| Index: device/generic_sensor/generic_sensor_consts.h |
| diff --git a/device/generic_sensor/generic_sensor_consts.h b/device/generic_sensor/generic_sensor_consts.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..91b0c18853a784ce6687b73ef080e0d30399a1d4 |
| --- /dev/null |
| +++ b/device/generic_sensor/generic_sensor_consts.h |
| @@ -0,0 +1,35 @@ |
| +// 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
|
| +// 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_ |
| + |
| +#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; |
| + |
| +// 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_ |