IPIA Senior Project V2.0
Spring-Fall 2020
Loading...
Searching...
No Matches
GPS.h File Reference

GPS NMEA custom API. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
Include dependency graph for GPS.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SysTime
 SysTime Time object. More...
 
struct  NMEA_GNRMC
 NMEA_GNRMC Time object. More...
 
struct  UTC_TIME
 UTC_TIME object. More...
 
struct  COORDINATE
 COORDINATE object. More...
 

Typedefs

typedef struct NMEA_GNRMC NMEA_GNRMC
 
typedef struct UTC_TIME UTC_TIME
 
typedef struct COORDINATE COORDINATE
 

Functions

char * token (char *str, char *delimiter)
 Tokenize a string by a delimiter. More...
 
void print_NMEA_GNRMC (const NMEA_GNRMC *data)
 Print GNRMC structure. More...
 
void print_UTC_TIME (const UTC_TIME *time)
 Print the UTC_TIME Object. More...
 
NMEA_GNRMC setGnrmc (char *str)
 Parse string into NMEA_GNRMC object. More...
 
UTC_TIME setTime (char *utcTime)
 Set UTC time in UTC_TIME object. More...
 
COORDINATE setCoordinates (const NMEA_GNRMC *data)
 Set Coordinate in COORDINATE object. More...
 
void print_COORDINATE (const COORDINATE *tempCoordinate)
 Print coordinates members. More...
 
double latitudeDegrees (char *latitude, char *direction)
 Convert latitude decimal value to degrees. More...
 
double longitudeDegrees (char *longitude, char *direction)
 Convert longitude decimal value to degrees. More...
 
double str_to_double (char *num)
 Convert string to floating point. More...
 

Detailed Description

GPS NMEA custom API.

Author
Jesus Minjares
See also
https://github.com/jminjares4
Version
0.1
Date
2022-05-20

Typedef Documentation

◆ COORDINATE

typedef struct COORDINATE COORDINATE

◆ NMEA_GNRMC

typedef struct NMEA_GNRMC NMEA_GNRMC

◆ UTC_TIME

typedef struct UTC_TIME UTC_TIME

Function Documentation

◆ latitudeDegrees()

double latitudeDegrees ( char *  latitude,
char *  direction 
)

Convert latitude decimal value to degrees.

Detailed description starts here

Parameters
latitudeNMEA_GNRMC latitude
See also
NMEA_GNRMC
Parameters
directionNMEA_GNRMC latitude direction
See also
NMEA_GNRMC
Returns
double latitude in degrees

◆ longitudeDegrees()

double longitudeDegrees ( char *  longitude,
char *  direction 
)

Convert longitude decimal value to degrees.

Detailed description starts here

Parameters
latitudeNMEA_GNRMC longitude
See also
NMEA_GNRMC
Parameters
directionNMEA_GNRMC longitude direction
See also
NMEA_GNRMC
Returns
double longitude in degrees

◆ print_COORDINATE()

void print_COORDINATE ( const COORDINATE tempCoordinate)

Print coordinates members.

See also
COORDINATE

Detailed description starts here

Parameters
dataCOORDINATE refrence
See also
COORDINATE
Returns
None

◆ print_NMEA_GNRMC()

void print_NMEA_GNRMC ( const NMEA_GNRMC data)

Print GNRMC structure.

See also
NMEA_GNRMC

Detailed description starts here

Parameters
dataconstant NMEA_GNRMC pointer
Returns
None

◆ print_UTC_TIME()

void print_UTC_TIME ( const UTC_TIME time)

Print the UTC_TIME Object.

See also
UTC_TIME

Detailed description starts here

Parameters
timeUTC_TIME reference
Returns
None

◆ setCoordinates()

COORDINATE setCoordinates ( const NMEA_GNRMC data)

Set Coordinate in COORDINATE object.

See also
COORDINATE

Detailed description starts here

Parameters
dataNMEA_GNRMC refrence
See also
NMEA_GNRMC
Returns
COORDINATE instance of the COORDINATE

◆ setGnrmc()

NMEA_GNRMC setGnrmc ( char *  str)

Parse string into NMEA_GNRMC object.

See also
NMEA_GNRMC

Detailed description starts here

Parameters
strGPS string
Returns
NMEA_GNRMC instance of the NMEA_GNRMC

◆ setTime()

UTC_TIME setTime ( char *  utcTime)

Set UTC time in UTC_TIME object.

See also
UTC_TIME

Detailed description starts here

Parameters
strNMEA_GNRMC utc time string
See also
NMEA_GNRMC
Returns
UTC_TIME instance of the UTC_TIME

◆ str_to_double()

double str_to_double ( char *  num)

Convert string to floating point.

Detailed description starts here

Parameters
numstring
Returns
double floating point value

◆ token()

char * token ( char *  str,
char *  delimiter 
)

Tokenize a string by a delimiter.

Detailed description starts here

Parameters
strstring
delimitercustom delimiter
Returns
char * tokenized string