1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-27 17:34:53 +00:00

Improve initialization

This commit is contained in:
Carles Fernandez 2017-02-10 09:57:16 +01:00
parent bbf4dc9860
commit ca0352b36b
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ gnss_sdr_supl_client::gnss_sdr_supl_client()
lac = 0;
ci = 0;
supl_ctx_new(&ctx);
assist = {};
assist = supl_assist_t();
server_port = 0;
request = 0;
}
@ -55,7 +55,7 @@ void gnss_sdr_supl_client::print_assistance()
if (assist.set & SUPL_RRLP_ASSIST_REFTIME)
{
fprintf(stdout, "T %ld %ld %ld %ld\n", assist.time.gps_week, assist.time.gps_tow,
assist.time.stamp.tv_sec, assist.time.stamp.tv_usec);
assist.time.stamp.tv_sec, static_cast<long>(assist.time.stamp.tv_usec));
}
if (assist.set & SUPL_RRLP_ASSIST_UTC)

View File

@ -442,7 +442,7 @@ int Sbas_Telemetry_Data::getbits(const unsigned char *buff, int pos, int len)
Sbas_Telemetry_Data::gtime_t Sbas_Telemetry_Data::epoch2time(const double *ep)
{
const int doy[] = {1, 32, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335};
gtime_t time = {};
gtime_t time = gtime_t();
int days, sec, year = (int)ep[0], mon = (int)ep[1], day = (int)ep[2];
if (year < 1970 || 2099 < year || mon < 1 || 12 < mon) return time;