Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps.c File Reference

Device independent GPS code. More...

#include "subsystems/gps.h"
#include "led.h"
+ Include dependency graph for gps.c:

Go to the source code of this file.

Macros

#define MSEC_PER_WEEK   (1000*60*60*24*7)
 

Functions

void gps_init (void)
 initialize the global GPS state More...
 
uint32_t gps_tow_from_sys_ticks (uint32_t sys_ticks)
 Convert time in sys_time ticks to GPS time of week. More...
 

Variables

struct GpsState gps
 global GPS state More...
 
struct GpsTimeSync gps_time_sync
 

Detailed Description

Device independent GPS code.

Definition in file gps.c.

Macro Definition Documentation

#define MSEC_PER_WEEK   (1000*60*60*24*7)

Definition at line 31 of file gps.c.

Referenced by gps_tow_from_sys_ticks().

Function Documentation

void gps_init ( void  )

initialize the global GPS state

Definition at line 37 of file gps.c.

References GpsState::cacc, GpsState::fix, gps, GPS_FIX_NONE, gps_impl_init(), and LED_OFF.

Referenced by init_ap(), and main_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t gps_tow_from_sys_ticks ( uint32_t  sys_ticks)

Convert time in sys_time ticks to GPS time of week.

The resolution is sys_time.resolution

Returns
GPS tow in ms

Definition at line 48 of file gps.c.

References gps_time_sync, msec_of_sys_time_ticks(), MSEC_PER_WEEK, GpsTimeSync::t0_ticks, and GpsTimeSync::t0_tow.

Referenced by trigger_ext_periodic(), and windturbine_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct GpsTimeSync gps_time_sync

Definition at line 35 of file gps.c.

Referenced by gps_mtk_read_message(), gps_tow_from_sys_ticks(), and gps_ubx_read_message().