#include "services/device/generic_sensor/orientation_quaternion_fusion_algorithm_using_euler_angles.h"
#include <cmath>
#include "base/check.h"
#include "base/numerics/angle_conversions.h"
#include "services/device/generic_sensor/generic_sensor_consts.h"
#include "services/device/generic_sensor/platform_sensor_fusion.h"
namespace device {
namespace {
void ComputeQuaternionFromEulerAngles(double alpha_in_degrees,
double beta_in_degrees,
double gamma_in_degrees,
double* x,
double* y,
double* z,
double* w) { … }
constexpr mojom::SensorType GetQuaternionFusedType(bool absolute) { … }
constexpr mojom::SensorType GetEulerAngleSourceType(bool absolute) { … }
}
OrientationQuaternionFusionAlgorithmUsingEulerAngles::
OrientationQuaternionFusionAlgorithmUsingEulerAngles(bool absolute)
: … { … }
OrientationQuaternionFusionAlgorithmUsingEulerAngles::
~OrientationQuaternionFusionAlgorithmUsingEulerAngles() = default;
bool OrientationQuaternionFusionAlgorithmUsingEulerAngles::GetFusedDataInternal(
mojom::SensorType which_sensor_changed,
SensorReading* fused_reading) { … }
}