Paparazzi UAS  v5.18.0_stable
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 */
GPS_SKYTRAQ_ERR_UNEXPECTED
@ GPS_SKYTRAQ_ERR_UNEXPECTED
Definition: gps_skytraq.h:40
uint16_t
unsigned short uint16_t
Definition: types.h:16
GpsSkytraq::error_cnt
uint8_t error_cnt
Definition: gps_skytraq.h:53
GpsSkytraq::msg_buf
uint8_t msg_buf[GPS_SKYTRAQ_MAX_PAYLOAD]
Definition: gps_skytraq.h:45
LtpDef_i
definition of the local (flat earth) coordinate system
Definition: pprz_geodetic_int.h:98
GpsSkytraq::checksum
uint8_t checksum
Definition: gps_skytraq.h:52
GpsState
data structure for GPS information
Definition: gps.h:87
GPS_SKYTRAQ_ERR_CHECKSUM
@ GPS_SKYTRAQ_ERR_CHECKSUM
Definition: gps_skytraq.h:38
GPS_SKYTRAQ_ERR_OUT_OF_SYNC
@ GPS_SKYTRAQ_ERR_OUT_OF_SYNC
Definition: gps_skytraq.h:39
uart.h
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
gps_skytraq_init
void gps_skytraq_init(void)
Definition: gps_skytraq.c:93
GpsSkytraq::msg_available
bool msg_available
Definition: gps_skytraq.h:46
GpsSkytraq::error_last
enum GpsSkytraqError error_last
Definition: gps_skytraq.h:54
GpsSkytraq::len
uint16_t len
Definition: gps_skytraq.h:50
uint8_t
unsigned char uint8_t
Definition: types.h:14
GPS_SKYTRAQ_ERR_OVERRUN
@ GPS_SKYTRAQ_ERR_OVERRUN
Definition: gps_skytraq.h:36
GpsSkytraq
Definition: gps_skytraq.h:44
GpsSkytraq::ref_ltp
struct LtpDef_i ref_ltp
Definition: gps_skytraq.h:56
GPS_SKYTRAQ_ERR_MSG_TOO_LONG
@ GPS_SKYTRAQ_ERR_MSG_TOO_LONG
Definition: gps_skytraq.h:37
GpsSkytraq::state
struct GpsState state
Definition: gps_skytraq.h:58
GpsSkytraq::status
uint8_t status
Definition: gps_skytraq.h:49
gps_skytraq_event
void gps_skytraq_event(void)
Definition: gps_skytraq.c:115
GPS_SKYTRAQ_ERR_NONE
@ GPS_SKYTRAQ_ERR_NONE
Definition: gps_skytraq.h:35
GPS_SKYTRAQ_MAX_PAYLOAD
#define GPS_SKYTRAQ_MAX_PAYLOAD
Definition: gps_skytraq.h:43
gps_skytraq
struct GpsSkytraq gps_skytraq
Definition: gps_skytraq.c:51
GpsSkytraq::msg_id
uint8_t msg_id
Definition: gps_skytraq.h:47
GpsSkytraq::msg_idx
uint8_t msg_idx
Definition: gps_skytraq.h:51
GpsSkytraqError
GpsSkytraqError
Definition: gps_skytraq.h:34