Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
pprz_geodetic_wmm2020.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 Sergey Krukowski <softsr@yahoo.de>
3 * Copyright (C) 2020 OpenUAS <info@openuas.org>
4 *
5 * This file is part of paparazzi.
6 *
7 * paparazzi is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * paparazzi is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with paparazzi; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
20 */
21
34#ifndef WMM2020_H
35#define WMM2020_H
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#define WMM2020_FRAC 2
42#define N_MAX_OF_GH 12
43
44// Geo mag current observation epoch begin
45#define GEO_EPOCH 2020.
46#define YR_MIN 2020.
47#define YR_MAX 2025.
48#define NMAX_1 12
49#define NMAX_2 12
50
51#define IEXT 0
52#define EXT_COEFF1 (double)0
53#define EXT_COEFF2 (double)0
54#define EXT_COEFF3 (double)0
55
57#define GPS_EPOCH_BEGIN (double)1980.016393442623
58#define GPS_EPOCH_YEAR 1980
59#define GPS_EPOCH_MONTH 1
60#define GPS_EPOCH_DAY 6
61
62
63#define WEEKS_IN_YEAR 52.14285
64#define SECS_IN_YEAR 31536000
65
66#define MAXDEG 13
67#define MAXCOEFF (MAXDEG*(MAXDEG+2)+1)
68
69extern const double gh1[];
70extern const double gh2[];
71
72int16_t extrapsh(double date, double dte1, int16_t nmax1, int16_t nmax2, double *gh);
73int16_t mag_calc(int16_t igdgc, double flat, double flon, double elev, int16_t nmax,
74 double *gh, double *geo_mag_x, double *geo_mag_y, double *geo_mag_z,
75 int16_t iext, double ext1, double ext2, double ext3);
76
77#ifdef __cplusplus
78} /* extern "C" */
79#endif
80
81#endif /* WMM2020_H */
int16_t mag_calc(int16_t igdgc, double flat, double flon, double elev, int16_t nmax, double *gh, double *geo_mag_x, double *geo_mag_y, double *geo_mag_z, int16_t iext, double ext1, double ext2, double ext3)
const double gh2[]
int16_t extrapsh(double date, double dte1, int16_t nmax1, int16_t nmax2, double *gh)
const double gh1[]
uint16_t foo
Definition main_demo5.c:58
short int16_t
Typedef defining 16 bit short type.