#include "services/device/generic_sensor/absolute_orientation_euler_angles_fusion_algorithm_using_accelerometer_and_magnetometer.h"
#include <cmath>
#include "base/check.h"
#include "base/numerics/math_constants.h"
#include "services/device/generic_sensor/orientation_util.h"
#include "services/device/generic_sensor/platform_sensor_fusion.h"
namespace {
bool ComputeRotationMatrixFromGravityAndGeomagnetic(double gravity_x,
double gravity_y,
double gravity_z,
double geomagnetic_x,
double geomagnetic_y,
double geomagnetic_z,
std::vector<double>* r) { … }
bool ComputeAbsoluteOrientationEulerAnglesFromGravityAndGeomagnetic(
double gravity_x,
double gravity_y,
double gravity_z,
double geomagnetic_x,
double geomagnetic_y,
double geomagnetic_z,
double* alpha_in_degrees,
double* beta_in_degrees,
double* gamma_in_degrees) { … }
}
namespace device {
AbsoluteOrientationEulerAnglesFusionAlgorithmUsingAccelerometerAndMagnetometer::
AbsoluteOrientationEulerAnglesFusionAlgorithmUsingAccelerometerAndMagnetometer()
: … { … }
AbsoluteOrientationEulerAnglesFusionAlgorithmUsingAccelerometerAndMagnetometer::
~AbsoluteOrientationEulerAnglesFusionAlgorithmUsingAccelerometerAndMagnetometer() =
default;
bool AbsoluteOrientationEulerAnglesFusionAlgorithmUsingAccelerometerAndMagnetometer::
GetFusedDataInternal(mojom::SensorType which_sensor_changed,
SensorReading* fused_reading) { … }
}