diff options
| author | Finlay Davidson <finlay.davidson@coderclass.nl> | 2023-06-25 15:59:34 +0200 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2023-08-17 21:21:22 +0200 |
| commit | cfe21103ea197f98555d5002d389d0c24e7b5544 (patch) | |
| tree | 31c2a1eb02de94ef6e954d2d9dd03b9331341d00 /src/utility/Math.h | |
| parent | 3085bb39901cd71c4e2fe006ad0c0967a66f7a80 (diff) | |
motioncontroller: Add functions for analysis
These are functions for converting acceleration due to gravity to angles
in degrees, and some statistical analysis including the mean and
variance.
Diffstat (limited to 'src/utility/Math.h')
| -rw-r--r-- | src/utility/Math.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utility/Math.h b/src/utility/Math.h new file mode 100644 index 00000000..e8d190c7 --- /dev/null +++ b/src/utility/Math.h @@ -0,0 +1,10 @@ +#pragma once + +#include <cstdint> + +namespace Pinetime { + namespace Utility { + // returns the arcsin of `arg`. asin(-32767) = -90, asin(32767) = 90 + int16_t Asin(int16_t arg); + } +} |
