2 * Copyright © 2014 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
18 #ifndef _AO_TRACKER_H_
19 #define _AO_TRACKER_H_
21 #define AO_CONFIG_DEFAULT_TRACKER_START_HORIZ 1000
22 #define AO_CONFIG_DEFAULT_TRACKER_START_VERT 100
24 /* Speeds for the various modes, 2m/s seems reasonable for 'not moving' */
25 #define AO_TRACKER_NOT_MOVING 200
27 extern int32_t ao_tracker_start_latitude;
28 extern int32_t ao_tracker_start_longitude;
29 extern int16_t ao_tracker_start_altitude;
31 #define AO_TRACKER_RING 8
33 struct ao_tracker_data {
37 struct ao_telemetry_location gps_data;
38 struct ao_telemetry_satellite gps_tracking_data;
41 extern struct ao_tracker_data ao_tracker_data[AO_TRACKER_RING];
42 extern uint8_t ao_tracker_head;
44 #define ao_tracker_ring_next(n) (((n) + 1) & (AO_TRACKER_RING-1))
45 #define ao_tracker_ring_prev(n) (((n) - 1) & (AO_TRACKER_RING-1))
48 ao_tracker_init(void);
50 #endif /* _AO_TRACKER_H_ */