Functions
gpstime.c File Reference
#include <math.h>
#include "gpstime.h"
Include dependency graph for gpstime.c:

Go to the source code of this file.

Functions

time_t gps2time (gps_time_t gps_t)
double gpsdifftime (gps_time_t end, gps_time_t beginning)
gps_time_t normalize_gps_time (gps_time_t t)

Function Documentation

time_t gps2time ( gps_time_t  gps_t)

Convert a `gps_time_t` GPS time to a Unix `time_t`.

Note:
Adjusts for leap seconds using the current constant offset.
Parameters:
tGPS time struct.
Returns:
Unix time.

Definition at line 46 of file gpstime.c.

double gpsdifftime ( gps_time_t  end,
gps_time_t  beginning 
)

Time difference in seconds between two GPS times.

Parameters:
endHigher bound of the time interval whose length is calculated.
beginningLower bound of the time interval whose length is calculated. If this describes a time point later than end, the result is negative.
Returns:
The time difference in seconds between `beginning` and `end`.

Definition at line 63 of file gpstime.c.

Normalize a `gps_time_t` GPS time struct. Ensures that the time of week is greater than zero and less than one week by wrapping and adjusting the week number accordingly.

Parameters:
tGPS time struct.
Returns:
Normalized GPS time struct.

Definition at line 25 of file gpstime.c.



swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:52