Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: device/generic_sensor/generic_sensor_consts.h

Issue 2476363003: [sensors][win] Implementation of motion sensors for Win platform (Closed)
Patch Set: Rebased to master Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_
6 #define DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ 6 #define DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_
7 7
8 #define _USE_MATH_DEFINES
8 #include <math.h> 9 #include <math.h>
9 10
10 namespace device { 11 namespace device {
11 12
12 // Required for conversion from G/s^2 to m/s^2 13 // Required for conversion from G/s^2 to m/s^2
13 constexpr double kMeanGravity = 9.80665; 14 constexpr double kMeanGravity = 9.80665;
14 15
15 // Required for conversion from deg/s^2 to rad/s^2 16 // Required for conversion from deg/s^2 to rad/s^2
16 constexpr double kRadiansInDegreesPerSecond = M_PI / 180.0; 17 constexpr double kRadiansInDegreesPerSecond = M_PI / 180.0;
17 18
18 // Required for conversion from Gauss to uT. 19 // Required for conversion from Gauss to uT.
19 constexpr double kMicroteslaInGauss = 100.0; 20 constexpr double kMicroteslaInGauss = 100.0;
20 21
22 // Required for conversion from Milligauss to Microtesla.
23 constexpr double kMicroteslaInMilligauss = 0.1;
24
21 // Default rate for returning value of the ambient light sensor. 25 // Default rate for returning value of the ambient light sensor.
22 constexpr int kDefaultAmbientLightFrequencyHz = 5; 26 constexpr int kDefaultAmbientLightFrequencyHz = 5;
23 27
24 // Default rate for returning value of the accelerometer sensor. 28 // Default rate for returning value of the accelerometer sensor.
25 constexpr int kDefaultAccelerometerFrequencyHz = 10; 29 constexpr int kDefaultAccelerometerFrequencyHz = 10;
26 30
27 // Default rate for returning value of the gyroscope sensor. 31 // Default rate for returning value of the gyroscope sensor.
28 constexpr int kDefaultGyroscopeFrequencyHz = 10; 32 constexpr int kDefaultGyroscopeFrequencyHz = 10;
29 33
30 // Default rate for returning value of the magnetometer sensor. 34 // Default rate for returning value of the magnetometer sensor.
31 constexpr int kDefaultMagnetometerFrequencyHz = 10; 35 constexpr int kDefaultMagnetometerFrequencyHz = 10;
32 36
33 } // namespace device 37 } // namespace device
34 38
35 #endif // DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_ 39 #endif // DEVICE_GENERIC_SENSOR_GENERIC_SENSOR_CONSTS_H_
OLDNEW
« no previous file with comments | « device/generic_sensor/BUILD.gn ('k') | device/generic_sensor/platform_sensor_and_provider_unittest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698