etsi_its_messages v3.5.0
Loading...
Searching...
No Matches
rtcmem_ts_utils.h File Reference

Utility functions for the ETSI ITS RTCMEM. More...

#include <ctime>
#include <limits>

Go to the source code of this file.

Functions

uint64_t etsi_its_rtcmem_ts_msgs::access::getUnixSecondsOfYear (const uint64_t unixSecond)
 Get the unix seconds of the beginning of a year that corresponds to a given unix timestamp.
uint64_t etsi_its_rtcmem_ts_msgs::access::getUnixNanosecondsFromMinuteOfTheYear (const MinuteOfTheYear &moy, const uint64_t unix_nanoseconds_estimate)
 Get the unix nanoseconds from a MinuteOfTheYear object.
uint64_t etsi_its_rtcmem_ts_msgs::access::getUnixNanosecondsFromRTCMcorrections (const RTCMcorrections &rtcm, const uint64_t unix_nanoseconds_estimate)
 Get the unix nanoseconds from a RTCMcorrections object.
uint64_t etsi_its_rtcmem_ts_msgs::access::getUnixNanoseconds (const RTCMEM &rtcmem, const uint64_t unix_nanoseconds_estimate)
 Get the unix nanoseconds from a RTCMEM object.
double etsi_its_rtcmem_ts_msgs::access::interpretLatitudeInDegrees (const Latitude &lat)
 Convert Latitude integer representation into degrees.
double etsi_its_rtcmem_ts_msgs::access::interpretLongitudeInDegrees (const Longitude &lon)
 Convert Longitude integer representation into degrees.

Detailed Description

Utility functions for the ETSI ITS RTCMEM.

Definition in file rtcmem_ts_utils.h.

Function Documentation

◆ getUnixNanoseconds()

uint64_t etsi_its_rtcmem_ts_msgs::access::getUnixNanoseconds ( const RTCMEM & rtcmem,
const uint64_t unix_nanoseconds_estimate )
inline

Get the unix nanoseconds from a RTCMEM object.

Parameters
rtcmemgiven RTCMEM object
unix_nanoseconds_estimateunix timestamp to derive the current year from in nanoseconds
Returns
uint64_t unix timestamp according to the stored MinuteOfTheYear in nanoseconds

Definition at line 101 of file rtcmem_ts_utils.h.

◆ getUnixNanosecondsFromMinuteOfTheYear()

uint64_t etsi_its_rtcmem_ts_msgs::access::getUnixNanosecondsFromMinuteOfTheYear ( const MinuteOfTheYear & moy,
const uint64_t unix_nanoseconds_estimate )
inline

Get the unix nanoseconds from a MinuteOfTheYear object.

Parameters
moygiven MinuteOfTheYear object
unix_nanoseconds_estimateunix timestamp to derive the current year from in nanoseconds
Returns
uint64_t unix timestamp according to the given MinuteOfTheYear in nanoseconds

Definition at line 75 of file rtcmem_ts_utils.h.

◆ getUnixNanosecondsFromRTCMcorrections()

uint64_t etsi_its_rtcmem_ts_msgs::access::getUnixNanosecondsFromRTCMcorrections ( const RTCMcorrections & rtcm,
const uint64_t unix_nanoseconds_estimate )
inline

Get the unix nanoseconds from a RTCMcorrections object.

Parameters
rtcmgiven RTCMcorrections object
unix_nanoseconds_estimateunix timestamp to derive the current year from in nanoseconds
Returns
uint64_t unix timestamp according to the stored MinuteOfTheYear in nanoseconds

Definition at line 89 of file rtcmem_ts_utils.h.

◆ getUnixSecondsOfYear()

uint64_t etsi_its_rtcmem_ts_msgs::access::getUnixSecondsOfYear ( const uint64_t unixSecond)
inline

Get the unix seconds of the beginning of a year that corresponds to a given unix timestamp.

Parameters
unixSecondtimestamp that defines the year for that the unix seconds for the beginning of the year should be derived
Returns
uint64_t unix seconds of the beginning of the year

Definition at line 55 of file rtcmem_ts_utils.h.

◆ interpretLatitudeInDegrees()

double etsi_its_rtcmem_ts_msgs::access::interpretLatitudeInDegrees ( const Latitude & lat)
inline

Convert Latitude integer representation into degrees.

Value is encoded in 1e-7 degrees. If UNAVAILABLE, returns NaN.

Parameters
latLatitude object to interpret
Returns
double latitude in degrees or NaN if unavailable

Definition at line 114 of file rtcmem_ts_utils.h.

◆ interpretLongitudeInDegrees()

double etsi_its_rtcmem_ts_msgs::access::interpretLongitudeInDegrees ( const Longitude & lon)
inline

Convert Longitude integer representation into degrees.

Value is encoded in 1e-7 degrees. If UNAVAILABLE, returns NaN.

Parameters
lonLongitude object to interpret
Returns
double longitude in degrees or NaN if unavailable

Definition at line 130 of file rtcmem_ts_utils.h.