#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include "lib.h"
#include "gps.h"
#include "menu.h"
#include "main.h"
#include "utils.h"
|
| int | checksum (const char *string) |
| | Calculates the NMEA183 checksum.
|
| |
| int | get_gps_pos_date_time (const char *string, char *pszLatitude, char *longitude, char *time, char *date) |
| | Get the latitude, longitude and GPS date/time from the NMEA183 RMC (Recommended Minimum Specific GPS data) sentence.
|
| |
| unsigned long | _time (void) |
| | Converts current date and time to system time value.
|
| |
| unsigned long | _mktime (struct time *t, struct date *d) |
| | converts current system time to timae and date structures.
|
| |
| void | GPSStart (void) |
| | Inititalizes the GPS system.
|
| |
| void | GPSService (void) |
| | GPS radio polling service.
|
| |
| void | CalculateAlternateGPSFormat (void) |
| |
| void | ConvertNMEAToAlternateFormats (char *pszNMEA, char *pszDD, char *pszDMS, int fLong) |
| | Calculates and converts the coordinates from NMEA reading.
|
| |
| void | getDateTime (unsigned long ulTime, struct time *t, struct date *d) |
| | Converts a system time value to a time and date structure.
|
| |
| void | GPSUpdateTestDisplay (void) |
| | Displays the GPS coordinates in their current format for the GPS test.
|
| |
| void | ResetBreadCrumbTimer (void) |
| | Resets or disables the GPS breadcrumb timer.
|
| |
| void | ServiceBreadCrumbTimer (void) |
| |
| void | GPSSaveBreadCrumb (void) |
| | Saves breadcrumb.
|
| |
◆ AUTOPOWERDOWN_TIME
| #define AUTOPOWERDOWN_TIME (3 * 60) |
◆ BREAD_CRUMB_TRAIL_TIME
| #define BREAD_CRUMB_TRAIL_TIME 15 |
◆ DATE
◆ DAYS_PER_YEAR
| #define DAYS_PER_YEAR (31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31) |
◆ GPS_END_OF_RECORD_STATE
| #define GPS_END_OF_RECORD_STATE 3 |
◆ GPS_IDLE_STATE
◆ GPS_READING_CHECKSUM_STATE
| #define GPS_READING_CHECKSUM_STATE 2 |
◆ GPS_READING_RECORD_STATE
| #define GPS_READING_RECORD_STATE 1 |
◆ MAX_BUF
◆ MAX_FIX_TIMEOUT
| #define MAX_FIX_TIMEOUT 30UL |
◆ MAX_TIME_OFFSET
| #define MAX_TIME_OFFSET 60UL |
◆ MAX_UPDATE_TIMEOUT
| #define MAX_UPDATE_TIMEOUT 30UL |
◆ SECS_PER_DAY
| #define SECS_PER_DAY (60UL * 60UL * 24UL) |
◆ SECS_PER_HOUR
| #define SECS_PER_HOUR (60UL * 60UL) |
◆ TIME
◆ _mktime()
| unsigned long _mktime |
( |
struct time * | t, |
|
|
struct date * | d ) |
converts current system time to timae and date structures.
◆ _time()
| unsigned long _time |
( |
void | | ) |
|
Converts current date and time to system time value.
◆ CalculateAlternateGPSFormat()
| void CalculateAlternateGPSFormat |
( |
void | | ) |
|
◆ checksum()
| int checksum |
( |
const char * | string | ) |
|
Calculates the NMEA183 checksum.
◆ ConvertNMEAToAlternateFormats()
| void ConvertNMEAToAlternateFormats |
( |
char * | pszNMEA, |
|
|
char * | pszDD, |
|
|
char * | pszDMS, |
|
|
int | fLong ) |
Calculates and converts the coordinates from NMEA reading.
◆ get_gps_pos_date_time()
| int get_gps_pos_date_time |
( |
const char * | string, |
|
|
char * | pszLatitude, |
|
|
char * | longitude, |
|
|
char * | time, |
|
|
char * | date ) |
Get the latitude, longitude and GPS date/time from the NMEA183 RMC (Recommended Minimum Specific GPS data) sentence.
◆ getDateTime()
| void getDateTime |
( |
unsigned long | ulTime, |
|
|
struct time * | t, |
|
|
struct date * | d ) |
Converts a system time value to a time and date structure.
◆ GPSSaveBreadCrumb()
| void GPSSaveBreadCrumb |
( |
void | | ) |
|
◆ GPSService()
GPS radio polling service.
◆ GPSStart()
Inititalizes the GPS system.
◆ GPSUpdateTestDisplay()
| void GPSUpdateTestDisplay |
( |
void | | ) |
|
Displays the GPS coordinates in their current format for the GPS test.
◆ ResetBreadCrumbTimer()
| void ResetBreadCrumbTimer |
( |
void | | ) |
|
Resets or disables the GPS breadcrumb timer.
◆ ServiceBreadCrumbTimer()
| void ServiceBreadCrumbTimer |
( |
void | | ) |
|
◆ currentFix
◆ g_BreadCrumbFlag
◆ g_BreadCrumbTime
◆ g_EmptyLatitude
| const char g_EmptyLatitude[] = "0000.0000X" |
◆ g_EmptyLongitude
| const char g_EmptyLongitude[] = "00000.0000X" |
◆ g_fSuspendConversion
| unsigned char g_fSuspendConversion |
◆ g_GPS_breadcrumbTimer
| int g_GPS_breadcrumbTimer |
◆ g_GPS_Test_Mode
◆ g_gpsDate
◆ g_gpsfix
◆ g_gpsOptions
◆ g_gpsTime
◆ g_Latitude
| char g_Latitude[LATITUDE_DMS+1] |
◆ g_LatitudeDD
| char g_LatitudeDD[LATITUDE_DMS+1] |
◆ g_LatitudeDMS
| char g_LatitudeDMS[LATITUDE_DMS+1] |
◆ g_LatitudeRaw
| char g_LatitudeRaw[LATITUDE_DMS+1] |
◆ g_Longitude
| char g_Longitude[LONGITUDE_DMS+1] |
◆ g_LongitudeDD
| char g_LongitudeDD[LONGITUDE_DMS+1] |
◆ g_LongitudeDMS
| char g_LongitudeDMS[LONGITUDE_DMS+2] |
◆ g_LongitudeRaw
| char g_LongitudeRaw[LONGITUDE_DMS+1] |
◆ g_nBreadCrumbIndex
◆ g_NextBreadCrumb
| unsigned long g_NextBreadCrumb |
◆ g_nGPSStandbyTimeout
| unsigned long g_nGPSStandbyTimeout |
◆ g_pszGPSBreadCrumb
| const char g_pszGPSBreadCrumb[] = "GPS Bread Crumb" |
◆ g_util_timeout
◆ gps_data_format
◆ GPSBuffer
◆ gpsCharCount
◆ gpsLastString
◆ gpsReadState
◆ gpsString
◆ last_fix
◆ month_len
| const unsigned short int month_len[] |
Initial value:= {31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31}
◆ time_zone_change
◆ time_zone_offset
◆ timer