Zephyr Scientific Library (zscilib)
compass.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 Kevin Townsend
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
54 #ifndef ZEPHYR_INCLUDE_ZSL_COMPASS_H_
55 #define ZEPHYR_INCLUDE_ZSL_COMPASS_H_
56 
57 #include <zsl/zsl.h>
58 #include <zsl/vectors.h>
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
84  zsl_real_t *dd);
85 
108 int zsl_comp_magn_north(struct zsl_vec *m, zsl_real_t *d);
109 
142 int zsl_comp_geo_north(struct zsl_vec *m, zsl_real_t dec, zsl_real_t *b);
143 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 #endif /* ZEPHYR_INCLUDE_ZSL_COMPASS_H_ */
149  /* End of compass group */
zsl_comp_magn_north
int zsl_comp_magn_north(struct zsl_vec *m, zsl_real_t *d)
Calculates the magnetic north of the earth (not the geographical north) based on magnetometer data.
vectors.h
API header file for vectors in zscilib.
zsl_comp_geo_north
int zsl_comp_geo_north(struct zsl_vec *m, zsl_real_t dec, zsl_real_t *b)
Calculates geographic north (AKA true bearing) based on the supplied magnetometer data,...
zsl.h
API header file for zscilib.
zsl_vec
Represents a vector.
Definition: vectors.h:40
zsl_comp_dms_to_dd
int zsl_comp_dms_to_dd(zsl_real_t d, zsl_real_t m, zsl_real_t s, zsl_real_t *dd)
Converts dms (degrees, minutes, seconds) to decimal degrees.
zsl_real_t
double zsl_real_t
Definition: zsl.h:51