|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/gps/gps.h"#include "modules/gps/gps_skytraq.h"#include "modules/core/abi.h"#include "led.h"#include "pprzlink/pprzlink_device.h"Go to the source code of this file.
Functions | |
| void | gps_skytraq_read_message (void) |
| void | gps_skytraq_parse (uint8_t c) |
| void | gps_skytraq_msg (void) |
| static uint16_t | bswap16 (uint16_t a) |
| static int | distance_too_great (struct EcefCoor_i *ecef_ref, struct EcefCoor_i *ecef_pos) |
| void | gps_skytraq_init (void) |
| void | gps_skytraq_event (void) |
Variables | |
| struct GpsSkytraq | gps_skytraq = {0} |
| #define GOT_CHECKSUM 7 |
Definition at line 36 of file gps_skytraq.c.
| #define GOT_ID 5 |
Definition at line 34 of file gps_skytraq.c.
| #define GOT_LEN1 3 |
Definition at line 32 of file gps_skytraq.c.
Referenced by gps_skytraq_parse(), gps_ubx_parse(), and ubx_process().
| #define GOT_LEN2 4 |
Definition at line 33 of file gps_skytraq.c.
Referenced by gps_skytraq_parse(), gps_ubx_parse(), and ubx_process().
| #define GOT_PAYLOAD 6 |
Definition at line 35 of file gps_skytraq.c.
| #define GOT_SYNC1 1 |
Definition at line 30 of file gps_skytraq.c.
Referenced by gps_skytraq_parse(), gps_ubx_parse(), and ubx_process().
| #define GOT_SYNC2 2 |
Definition at line 31 of file gps_skytraq.c.
Referenced by gps_skytraq_parse(), gps_ubx_parse(), and ubx_process().
| #define GOT_SYNC3 8 |
Definition at line 37 of file gps_skytraq.c.
Referenced by gps_skytraq_parse().
| #define MAX_DISTANCE 1000000 |
Definition at line 89 of file gps_skytraq.c.
Referenced by distance_too_great().
| #define SKYTRAQ_FIX_2D 0x01 |
Definition at line 40 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_FIX_3D 0x02 |
Definition at line 41 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_FIX_3D_DGPS 0x03 |
Definition at line 42 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_FIX_NONE 0x00 |
Definition at line 39 of file gps_skytraq.c.
| #define SKYTRAQ_NAVIGATION_DATA_AEL | ( | _payload | ) |
Definition at line 71 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_ASL | ( | _payload | ) |
Definition at line 72 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_ECEFVX | ( | _payload | ) |
| #define SKYTRAQ_NAVIGATION_DATA_ECEFVY | ( | _payload | ) |
Definition at line 84 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_ECEFVZ | ( | _payload | ) |
Definition at line 85 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_ECEFX | ( | _payload | ) |
Definition at line 80 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_ECEFY | ( | _payload | ) |
Definition at line 81 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_ECEFZ | ( | _payload | ) |
Definition at line 82 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_FixMode | ( | _payload | ) |
| #define SKYTRAQ_NAVIGATION_DATA_GDOP | ( | _payload | ) |
Definition at line 74 of file gps_skytraq.c.
| #define SKYTRAQ_NAVIGATION_DATA_HDOP | ( | _payload | ) |
Definition at line 76 of file gps_skytraq.c.
| #define SKYTRAQ_NAVIGATION_DATA_LAT | ( | _payload | ) |
Definition at line 68 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_LON | ( | _payload | ) |
Definition at line 69 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_NumSV | ( | _payload | ) |
Definition at line 63 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_PDOP | ( | _payload | ) |
Definition at line 75 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_TDOP | ( | _payload | ) |
Definition at line 78 of file gps_skytraq.c.
| #define SKYTRAQ_NAVIGATION_DATA_TOW | ( | _payload | ) |
Definition at line 66 of file gps_skytraq.c.
Referenced by gps_skytraq_read_message().
| #define SKYTRAQ_NAVIGATION_DATA_VDOP | ( | _payload | ) |
Definition at line 77 of file gps_skytraq.c.
| #define SKYTRAQ_NAVIGATION_DATA_WEEK | ( | _payload | ) |
Definition at line 65 of file gps_skytraq.c.
| #define SKYTRAQ_SYNC1 0xA0 |
Definition at line 45 of file gps_skytraq.c.
Referenced by gps_skytraq_parse().
| #define SKYTRAQ_SYNC2 0xA1 |
Definition at line 46 of file gps_skytraq.c.
Referenced by gps_skytraq_parse().
| #define SKYTRAQ_SYNC3 0x0D |
Definition at line 48 of file gps_skytraq.c.
Referenced by gps_skytraq_parse().
| #define SKYTRAQ_SYNC4 0x0A |
Definition at line 49 of file gps_skytraq.c.
| #define UNINIT 0 |
Definition at line 29 of file gps_skytraq.c.
Definition at line 57 of file gps_skytraq.c.
|
static |
Definition at line 273 of file gps_skytraq.c.
References MAX_DISTANCE, EcefCoor_i::x, EcefCoor_i::y, and EcefCoor_i::z.
Referenced by gps_skytraq_read_message().
| void gps_skytraq_event | ( | void | ) |
Definition at line 115 of file gps_skytraq.c.
References dev, gps_skytraq, gps_skytraq_msg(), and gps_skytraq_parse().
| void gps_skytraq_init | ( | void | ) |
Definition at line 93 of file gps_skytraq.c.
References gps_skytraq, and UNINIT.
| void gps_skytraq_msg | ( | void | ) |
Definition at line 98 of file gps_skytraq.c.
References get_sys_time_usec(), GPS_FIX_3D, gps_skytraq, GPS_SKYTRAQ_ID, gps_skytraq_read_message(), sys_time::nb_sec, sys_time::nb_sec_rem, and SKYTRAQ_ID_NAVIGATION_DATA.
Referenced by gps_skytraq_event().
| void gps_skytraq_parse | ( | uint8_t | c | ) |
Definition at line 201 of file gps_skytraq.c.
References GOT_CHECKSUM, GOT_ID, GOT_LEN1, GOT_LEN2, GOT_PAYLOAD, GOT_SYNC1, GOT_SYNC2, GOT_SYNC3, gps_skytraq, GPS_SKYTRAQ_ERR_CHECKSUM, GPS_SKYTRAQ_ERR_MSG_TOO_LONG, GPS_SKYTRAQ_ERR_OUT_OF_SYNC, GPS_SKYTRAQ_ERR_UNEXPECTED, GPS_SKYTRAQ_MAX_PAYLOAD, SKYTRAQ_SYNC1, SKYTRAQ_SYNC2, SKYTRAQ_SYNC3, and UNINIT.
Referenced by gps_skytraq_event().
| void gps_skytraq_read_message | ( | void | ) |
Definition at line 127 of file gps_skytraq.c.
References distance_too_great(), GPS_FIX_2D, GPS_FIX_3D, GPS_FIX_NONE, gps_skytraq, GPS_VALID_COURSE_BIT, GPS_VALID_HMSL_BIT, GPS_VALID_POS_ECEF_BIT, GPS_VALID_POS_LLA_BIT, GPS_VALID_VEL_ECEF_BIT, GPS_VALID_VEL_NED_BIT, LED_ON, LED_TOGGLE, ltp_def_from_ecef_i(), ned_of_ecef_vect_i(), SKYTRAQ_FIX_2D, SKYTRAQ_FIX_3D, SKYTRAQ_FIX_3D_DGPS, SKYTRAQ_ID_NAVIGATION_DATA, SKYTRAQ_NAVIGATION_DATA_AEL, SKYTRAQ_NAVIGATION_DATA_ASL, SKYTRAQ_NAVIGATION_DATA_ECEFVX, SKYTRAQ_NAVIGATION_DATA_ECEFVY, SKYTRAQ_NAVIGATION_DATA_ECEFVZ, SKYTRAQ_NAVIGATION_DATA_ECEFX, SKYTRAQ_NAVIGATION_DATA_ECEFY, SKYTRAQ_NAVIGATION_DATA_ECEFZ, SKYTRAQ_NAVIGATION_DATA_FixMode, SKYTRAQ_NAVIGATION_DATA_LAT, SKYTRAQ_NAVIGATION_DATA_LON, SKYTRAQ_NAVIGATION_DATA_NumSV, SKYTRAQ_NAVIGATION_DATA_PDOP, and SKYTRAQ_NAVIGATION_DATA_TOW.
Referenced by gps_skytraq_msg().
| struct GpsSkytraq gps_skytraq = {0} |
Definition at line 51 of file gps_skytraq.c.
Referenced by gps_skytraq_event(), gps_skytraq_init(), gps_skytraq_msg(), gps_skytraq_parse(), and gps_skytraq_read_message().