48 #ifndef _C_TIMECONV_H_ 49 #define _C_TIMECONV_H_ 59 #define GNSS_ERROR_MSG(errorMsg) 61 #ifndef SECONDS_IN_DAY 62 #define SECONDS_IN_DAY (86400.0) 65 #ifndef SECONDS_IN_WEEK 66 #define SECONDS_IN_WEEK (604800.0) 79 unsigned short* utc_year,
80 unsigned char* utc_month,
81 unsigned char* utc_day,
82 unsigned char* utc_hour,
83 unsigned char* utc_minute,
85 unsigned char* utc_offset,
87 unsigned short* gps_week,
101 int TIMECONV_SetSystemTime(
102 const unsigned short utc_year,
103 const unsigned char utc_month,
104 const unsigned char utc_day,
105 const unsigned char utc_hour,
106 const unsigned char utc_minute,
107 const float utc_seconds
124 const double julian_date,
125 unsigned char *day_of_week
142 const unsigned short gps_week,
143 const double gps_tow,
144 const unsigned char utc_offset,
166 const unsigned short utc_year,
167 const unsigned char utc_month,
168 const unsigned char utc_day,
169 const unsigned char utc_hour,
170 const unsigned char utc_minute,
171 const float utc_seconds,
191 const double julian_date,
192 const unsigned char utc_offset,
193 unsigned short* gps_week,
210 const double julian_date,
211 unsigned short* utc_year,
212 unsigned char* utc_month,
213 unsigned char* utc_day,
214 unsigned char* utc_hour,
215 unsigned char* utc_minute,
235 unsigned short utc_year,
236 unsigned char utc_month,
237 unsigned char utc_day,
238 unsigned char utc_hour,
239 unsigned char utc_minute,
241 unsigned short* gps_week,
265 unsigned short utc_year,
266 unsigned char utc_month,
267 unsigned char utc_day,
268 unsigned char utc_hour,
269 unsigned char utc_minute,
271 unsigned short* gps_week,
292 unsigned short gps_week,
294 unsigned short* utc_year,
295 unsigned char* utc_month,
296 unsigned char* utc_day,
297 unsigned char* utc_hour,
298 unsigned char* utc_minute,
339 unsigned char* utc_offset
355 const unsigned short year,
356 const unsigned char month,
357 unsigned char* days_in_month
387 const unsigned short utc_year,
388 const unsigned char utc_month,
389 const unsigned char utc_day,
390 unsigned short* dayofyear
403 const unsigned short year,
404 const unsigned short dayofyear,
405 unsigned short* gps_week,
416 #endif // _C_TIMECONV_H_ int TIMECONV_GetUTCTimeFromJulianDate(const double julian_date, unsigned short *utc_year, unsigned char *utc_month, unsigned char *utc_day, unsigned char *utc_hour, unsigned char *utc_minute, float *utc_seconds)
Computes UTC time from the Julian date.
int TIMECONV_IsALeapYear(const unsigned short year)
Determines if the given year is a leap year.
int TIMECONV_GetUTCTimeFromGPSTime(unsigned short gps_week, double gps_tow, unsigned short *utc_year, unsigned char *utc_month, unsigned char *utc_day, unsigned char *utc_hour, unsigned char *utc_minute, float *utc_seconds)
Computes UTC time from GPS time.
int TIMECONV_GetGPSTimeFromRinexTime(unsigned short utc_year, unsigned char utc_month, unsigned char utc_day, unsigned char utc_hour, unsigned char utc_minute, float utc_seconds, unsigned short *gps_week, double *gps_tow)
Computes GPS time from RINEX time. RINEX time looks like UTC but it is GPS time in year...
int TIMECONV_GetDayOfWeekFromJulianDate(const double julian_date, unsigned char *day_of_week)
Computes the day of the week from the Julian date.
int TIMECONV_GetSystemTime(unsigned short *utc_year, unsigned char *utc_month, unsigned char *utc_day, unsigned char *utc_hour, unsigned char *utc_minute, float *utc_seconds, unsigned char *utc_offset, double *julian_date, unsigned short *gps_week, double *gps_tow)
Obtains the UTC time, GPS time, and Julian date from PC system time.
int TIMECONV_GetDayOfYear(const unsigned short utc_year, const unsigned char utc_month, const unsigned char utc_day, unsigned short *dayofyear)
Determines the day of year given the year, month, and day.
int TIMECONV_DetermineUTCOffset(double julian_date, unsigned char *utc_offset)
This function is a look up table to determine the UTC offset from the Julian Date.
int TIMECONV_GetGPSTimeFromJulianDate(const double julian_date, const unsigned char utc_offset, unsigned short *gps_week, double *gps_tow)
Computes GPS time from the Julian date.
int TIMECONV_GetGPSTimeFromYearAndDayOfYear(const unsigned short year, const unsigned short dayofyear, unsigned short *gps_week, double *gps_tow)
Determines the GPS time of the start of a day from the day of year and the year.
int TIMECONV_GetNumberOfDaysInMonth(const unsigned short year, const unsigned char month, unsigned char *days_in_month)
Determines the number of days in a month, given the month and year.
int TIMECONV_GetGPSTimeFromUTCTime(unsigned short utc_year, unsigned char utc_month, unsigned char utc_day, unsigned char utc_hour, unsigned char utc_minute, float utc_seconds, unsigned short *gps_week, double *gps_tow)
Computes GPS time from UTC time.
int TIMECONV_GetJulianDateFromGPSTime(const unsigned short gps_week, const double gps_tow, const unsigned char utc_offset, double *julian_date)
Computes the Julian date from GPS time.
int TIMECONV_GetJulianDateFromUTCTime(const unsigned short utc_year, const unsigned char utc_month, const unsigned char utc_day, const unsigned char utc_hour, const unsigned char utc_minute, const float utc_seconds, double *julian_date)
Computes the Julian date from UTC time.