APM:Libraries
Classes | Macros | Functions | Variables
sitl_gps.cpp File Reference
#include <AP_HAL/AP_HAL.h>
#include "AP_HAL_SITL.h"
#include "AP_HAL_SITL_Namespace.h"
#include "HAL_SITL_Class.h"
#include <AP_Math/AP_Math.h>
#include <SITL/SITL.h>
#include "Scheduler.h"
#include "UARTDriver.h"
#include <AP_GPS/AP_GPS.h>
#include <AP_GPS/AP_GPS_UBLOX.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <time.h>
#include <stdio.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
Include dependency graph for sitl_gps.cpp:

Go to the source code of this file.

Classes

struct  gps_state
 

Macros

#define CRC32_POLYNOMIAL   0xEDB88320L
 

Functions

static void simulation_timeval (struct timeval *tv)
 
static void gps_time (uint16_t *time_week, uint32_t *time_week_ms)
 
static void swap_uint32 (uint32_t *v, uint8_t n)
 
static void mtk_checksum (const uint8_t *data, uint8_t n, uint8_t *ck_a, uint8_t *ck_b)
 

Variables

const AP_HAL::HALhal
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 
static uint8_t next_gps_index
 
static uint8_t gps_delay
 
static struct gps_state gps_state
 
static struct gps_state gps2_state
 

Macro Definition Documentation

◆ CRC32_POLYNOMIAL

#define CRC32_POLYNOMIAL   0xEDB88320L

Definition at line 1099 of file sitl_gps.cpp.

Referenced by HALSITL::SITL_State::CRC32Value().

Function Documentation

◆ gps_time()

static void gps_time ( uint16_t *  time_week,
uint32_t *  time_week_ms 
)
static

Definition at line 176 of file sitl_gps.cpp.

Referenced by HALSITL::SITL_State::_update_gps_nova(), HALSITL::SITL_State::_update_gps_sbp(), HALSITL::SITL_State::_update_gps_sbp2(), HALSITL::SITL_State::_update_gps_ubx(), AP_ADSB::genICAO(), DataFlash_Class::Log_Write_CameraInfo(), and AP_ADSB::send_dynamic_out().

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

◆ mtk_checksum()

static void mtk_checksum ( const uint8_t *  data,
uint8_t  n,
uint8_t *  ck_a,
uint8_t *  ck_b 
)
static

Definition at line 423 of file sitl_gps.cpp.

Referenced by HALSITL::SITL_State::_update_gps_mtk(), HALSITL::SITL_State::_update_gps_mtk16(), and HALSITL::SITL_State::_update_gps_mtk19().

Here is the caller graph for this function:

◆ simulation_timeval()

static void simulation_timeval ( struct timeval *  tv)
static

Definition at line 130 of file sitl_gps.cpp.

Referenced by HALSITL::SITL_State::_update_gps_mtk(), HALSITL::SITL_State::_update_gps_mtk16(), HALSITL::SITL_State::_update_gps_mtk19(), HALSITL::SITL_State::_update_gps_nmea(), and gps_time().

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

◆ swap_uint32()

static void swap_uint32 ( uint32_t *  v,
uint8_t  n 
)
static

Definition at line 412 of file sitl_gps.cpp.

Referenced by HALSITL::SITL_State::_update_gps_mtk().

Here is the caller graph for this function:

Variable Documentation

◆ gps2_state

struct gps_state gps2_state
static

◆ gps_delay

uint8_t gps_delay
static

Definition at line 37 of file sitl_gps.cpp.

Referenced by HALSITL::SITL_State::_update_gps().

◆ gps_state

struct gps_state gps_state
static

◆ hal

const AP_HAL::HAL& hal

-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

Definition at line 14 of file AC_PID_test.cpp.

◆ next_gps_index

uint8_t next_gps_index
static

Definition at line 36 of file sitl_gps.cpp.

Referenced by HALSITL::SITL_State::_update_gps().