Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
gps_skytraq.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Antoine Drouin <poinix@gmail.com>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef GPS_SKYTRAQ_H
23 #define GPS_SKYTRAQ_H
24 
25 #include "mcu_periph/uart.h"
26 
27 #define SKYTRAQ_ID_NAVIGATION_DATA 0XA8
28 
29 #ifndef PRIMARY_GPS
30 #define PRIMARY_GPS GPS_SKYTRAQ
31 #endif
32 
33 /* last error type */
41 };
42 
43 #define GPS_SKYTRAQ_MAX_PAYLOAD 255
44 struct GpsSkytraq {
48 
55 
56  struct LtpDef_i ref_ltp;
57 
58  struct GpsState state;
59 };
60 
61 extern struct GpsSkytraq gps_skytraq;
62 
63 extern void gps_skytraq_init(void);
64 extern void gps_skytraq_event(void);
65 
66 #define gps_skytraq_periodic_check() gps_periodic_check(&gps_skytraq.state)
67 
68 #endif /* GPS_SKYTRAQ_H */
data structure for GPS information
Definition: gps.h:86
uint8_t error_cnt
Definition: gps_skytraq.h:53
uint8_t msg_idx
Definition: gps_skytraq.h:51
struct GpsState state
Definition: gps_skytraq.h:58
#define GPS_SKYTRAQ_MAX_PAYLOAD
Definition: gps_skytraq.h:43
uint8_t status
Definition: gps_skytraq.h:49
enum GpsSkytraqError error_last
Definition: gps_skytraq.h:54
uint8_t msg_buf[GPS_SKYTRAQ_MAX_PAYLOAD]
Definition: gps_skytraq.h:45
struct LtpDef_i ref_ltp
Definition: gps_skytraq.h:56
void gps_skytraq_init(void)
Definition: gps_skytraq.c:93
bool msg_available
Definition: gps_skytraq.h:46
void gps_skytraq_event(void)
Definition: gps_skytraq.c:115
uint8_t checksum
Definition: gps_skytraq.h:52
uint16_t len
Definition: gps_skytraq.h:50
uint8_t msg_id
Definition: gps_skytraq.h:47
GpsSkytraqError
Definition: gps_skytraq.h:34
@ GPS_SKYTRAQ_ERR_UNEXPECTED
Definition: gps_skytraq.h:40
@ GPS_SKYTRAQ_ERR_NONE
Definition: gps_skytraq.h:35
@ GPS_SKYTRAQ_ERR_MSG_TOO_LONG
Definition: gps_skytraq.h:37
@ GPS_SKYTRAQ_ERR_CHECKSUM
Definition: gps_skytraq.h:38
@ GPS_SKYTRAQ_ERR_OVERRUN
Definition: gps_skytraq.h:36
@ GPS_SKYTRAQ_ERR_OUT_OF_SYNC
Definition: gps_skytraq.h:39
struct GpsSkytraq gps_skytraq
Definition: gps_skytraq.c:51
definition of the local (flat earth) coordinate system
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98