ASF Sensor API physics utilities.
This module defines types and operations that support basic physical modelling and equations for sensor data.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
bool | field_direction (vector3_t *field, scalar_t *theta, scalar_t *delta, scalar_t *strength) |
Calculate direction, inclination, and field strength. More... | |
Calculate direction, inclination, and field strength.
This routine calculates horizontal direction, vertical inclination and net field magnitude for a "raw" (unscaled) magnetic field
sample from a 3-axis magnetometer.
field | Magnetometer raw vector field sample input |
theta | Calculated direction angle (degrees) output |
delta | Calculated inclination angle (degrees) output |
strength | Calculated raw vector field magnitude output |
References degrees, vector3_magnitude(), vector3_scale(), vector3_t::x, vector3_t::y, and vector3_t::z.
Referenced by ak8975_get_heading(), and hmc5883l_get_heading().