Open Storm
Functions
gps.h File Reference

Implements Telit's GPS geolocation functions. More...

#include <project.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.

Functions

uint8 modem_gps_power_toggle (uint8 gps_power_on)
 Toggle power to the GPS module. More...
 
uint8 modem_get_gps_position (float *lat, float *lon, float *hdop, float *altitude, uint8 *gps_fix, float *cog, float *spkm, float *spkn, uint8 *nsat, uint8 min_satellites, uint8 max_tries)
 Retrieves the current GPS position by attempting to connect to the GPS network. More...
 
uint8 run_gps_routine (int *gps_trigger, float *lat, float *lon, float *hdop, float *altitude, uint8 *gps_fix, float *cog, float *spkm, float *spkn, uint8 *nsat, uint8 min_satellites, uint8 max_tries)
 Runs GPS routine to retrieve GPS position. More...
 
uint8 zip_gps (char *labels[], float readings[], uint8 *array_ix, int *gps_trigger, uint8 min_satellites, uint8 max_tries, uint8 max_size)
 Takes a string array of labels and float array of values and pairs the corresponding values. More...
 

Detailed Description

Implements Telit's GPS geolocation functions.

Author
Matt Bartos and Ivan Mondragon
Version
TODO
Date
2017-06-01

Function Documentation

uint8 modem_get_gps_position ( float *  lat,
float *  lon,
float *  hdop,
float *  altitude,
uint8 *  gps_fix,
float *  cog,
float *  spkm,
float *  spkn,
uint8 *  nsat,
uint8  min_satellites,
uint8  max_tries 
)

Retrieves the current GPS position by attempting to connect to the GPS network.

Parameters
latBuffer to store the Latitude.
lonBuffer to store the Longitude.
hdopBuffer to store the Horizontal Diluition of Precision.
altitudeBuffer to store the Altitude: mean-sea-level (geoid).
gps_fixBuffer to store the flag:
  • 0 = Invalid Fix
  • 2 = 2D fix
  • 3 = 3D fix
cogBuffer to store the Course over ground.
spkmBuffer to store the Speed over ground (km/hr).
spknBuffer to store the Speed over ground (knots).
nsatBuffer to store the number of satellites in use [0..12]
min_satellitesMinimum number of satellits the module should connect to.
max_triesMaximum number of attempts.
Returns
1u if the gps module was able to connect to the minimum number of satellites, 0u otherwise.

Here is the call graph for this function:

Here is the caller graph for this function:

uint8 modem_gps_power_toggle ( uint8  gps_power_on)

Toggle power to the GPS module.

Parameters
gps_power_onEnable flag:
  • 0 = Power off
  • 1 = Power on
Returns
1u on success, 0u otherwise.

Here is the call graph for this function:

Here is the caller graph for this function:

uint8 run_gps_routine ( int *  gps_trigger,
float *  lat,
float *  lon,
float *  hdop,
float *  altitude,
uint8 *  gps_fix,
float *  cog,
float *  spkm,
float *  spkn,
uint8 *  nsat,
uint8  min_satellites,
uint8  max_tries 
)

Runs GPS routine to retrieve GPS position.

Parameters
gps_triggergps_trigger flag.
latBuffer to store the Latitude.
lonBuffer to store the Longitude.
hdopBuffer to store the Horizontal Diluition of Precision.
altitudeBuffer to store the Altitude: mean-sea-level (geoid).
gps_fixBuffer to store the flag:
  • 0 = Invalid Fix
  • 2 = 2D fix
  • 3 = 3D fix
cogBuffer to store the Course over ground.
spkmBuffer to store the Speed over ground (km/hr).
spknBuffer to store the Speed over ground (knots).
nsatBuffer to store the number of satellites in use [0..12]
min_satellitesMinimum number of satellits the module should connect to.
max_triesMaximum number of attempts.
Returns
1u if the gps module was able to connect to the minimum number of satellites, 0u otherwise.

Here is the call graph for this function:

Here is the caller graph for this function:

uint8 zip_gps ( char *  labels[],
float  readings[],
uint8 *  array_ix,
int *  gps_trigger,
uint8  min_satellites,
uint8  max_tries,
uint8  max_size 
)

Takes a string array of labels and float array of values and pairs the corresponding values.

Parameters
labels[]Array to store the labels.
readings[]Array to store the corresponding values.
array_ixCurrent array index.
gps_triggerGPS trigger.
min_satellitesMinimum number of satellits the module should connect to.
max_triesMaximum number of attempts.
max_sizeMax size of the labels and readings arrays.
Returns
(*array_ix) + 10

Here is the call graph for this function:

Here is the caller graph for this function: