Skip to content

Commit

Permalink
Improve initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesfernandez committed Feb 10, 2017
1 parent bbf4dc9 commit ca0352b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/libs/gnss_sdr_supl_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/core/system_parameters/sbas_telemetry_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ca0352b

Please sign in to comment.