Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
gps_nmea_send.c File Reference

module used to send GPS data over a Tawaki UART for extern instrument using NMEA protocol Exemple of use : MAPIR camera stores GPS data in metadata on each frame More...

#include "modules/gps/gps_nmea_send.h"
#include "mcu_periph/uart.h"
#include "generated/airframe.h"
#include "state.h"
#include "modules/gps/gps.h"
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
#include <inttypes.h>
+ Include dependency graph for gps_nmea_send.c:

Go to the source code of this file.

Functions

static void recover_gps_data (void)
 Function to recover data available onboard from GPS.
 
static void build_nmea_sentence (void)
 Function to build sentence for NMEA Protocol.
 
static uint8_t nmea_checksum (const char *sentence, int length)
 Function to calculate checksum.
 
static void nmea_convert_deg_to_DDMM (double deg, char *buf, int is_lat)
 Function to convert lat long in DDLL.MMMM Format Lat and long don't have the same length.
 
static void gps_nmea_get_system_date_str (char *buf_date, size_t buf_date_size, char *buf_time, size_t buf_time_size)
 Get Date from system.
 
static void nmea_send (const char *payload, int payload_length)
 Function to send payload to UART.
 
void gps_nmea_send_init (void)
 Initialization function.
 
void gps_nmea_send_periodic (void)
 Periodic function to send data.
 

Variables

struct Gps_Nmea_Send gps_nmea_send
 

Detailed Description

module used to send GPS data over a Tawaki UART for extern instrument using NMEA protocol Exemple of use : MAPIR camera stores GPS data in metadata on each frame

Author
Jean-Baptiste FORESTIER

Definition in file gps_nmea_send.c.

Function Documentation

◆ build_nmea_sentence()

void build_nmea_sentence ( void  )
static

◆ gps_nmea_get_system_date_str()

void gps_nmea_get_system_date_str ( char buf_date,
size_t  buf_date_size,
char buf_time,
size_t  buf_time_size 
)
static

Get Date from system.

Definition at line 221 of file gps_nmea_send.c.

References foo, gps, GpsState::tow, and GpsState::week.

Referenced by build_nmea_sentence().

+ Here is the caller graph for this function:

◆ gps_nmea_send_init()

◆ gps_nmea_send_periodic()

void gps_nmea_send_periodic ( void  )

Periodic function to send data.

Definition at line 72 of file gps_nmea_send.c.

References build_nmea_sentence(), and recover_gps_data().

+ Here is the call graph for this function:

◆ nmea_checksum()

uint8_t nmea_checksum ( const char sentence,
int  length 
)
static

Function to calculate checksum.

Definition at line 190 of file gps_nmea_send.c.

References foo.

Referenced by build_nmea_sentence().

+ Here is the caller graph for this function:

◆ nmea_convert_deg_to_DDMM()

void nmea_convert_deg_to_DDMM ( double  deg,
char buf,
int  is_lat 
)
static

Function to convert lat long in DDLL.MMMM Format Lat and long don't have the same length.

Definition at line 203 of file gps_nmea_send.c.

References foo.

Referenced by build_nmea_sentence().

+ Here is the caller graph for this function:

◆ nmea_send()

void nmea_send ( const char payload,
int  payload_length 
)
static

Function to send payload to UART.

Definition at line 273 of file gps_nmea_send.c.

References foo, and uart_put_buffer().

Referenced by build_nmea_sentence().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recover_gps_data()

Variable Documentation

◆ gps_nmea_send

struct Gps_Nmea_Send gps_nmea_send

Definition at line 43 of file gps_nmea_send.c.

Referenced by build_nmea_sentence(), gps_nmea_send_init(), and recover_gps_data().