mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-07-04 19:12:57 +00:00
Catch exception
This commit is contained in:
parent
588edaef66
commit
bdce3c20d1
@ -472,24 +472,13 @@ int main(int argc, char** argv)
|
||||
<< " [seconds]" << std::endl;
|
||||
|
||||
// 6. find TOW from SUPL assistance
|
||||
|
||||
double current_TOW = 0;
|
||||
try
|
||||
{
|
||||
if (global_gps_ephemeris_map.size() > 0)
|
||||
{
|
||||
std::map<int, Gps_Ephemeris> Eph_map;
|
||||
try
|
||||
{
|
||||
Eph_map = global_gps_ephemeris_map.get_map_copy();
|
||||
}
|
||||
catch (const boost::exception& e)
|
||||
{
|
||||
std::cout << "Exception in getting Global ephemeris map" << std::endl;
|
||||
delete acquisition;
|
||||
delete gnss_synchro;
|
||||
google::ShutDownCommandLineFlags();
|
||||
std::cout << "GNSS-SDR Front-end calibration program ended." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
current_TOW = Eph_map.begin()->second.d_TOW;
|
||||
|
||||
time_t t = utc_time(Eph_map.begin()->second.i_GPS_week, (long int)current_TOW);
|
||||
@ -509,6 +498,16 @@ int main(int argc, char** argv)
|
||||
std::cout << "GNSS-SDR Front-end calibration program ended." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
catch (const boost::exception& e)
|
||||
{
|
||||
std::cout << "Exception in getting Global ephemeris map" << std::endl;
|
||||
delete acquisition;
|
||||
delete gnss_synchro;
|
||||
google::ShutDownCommandLineFlags();
|
||||
std::cout << "GNSS-SDR Front-end calibration program ended." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get user position from config file (or from SUPL using GSM Cell ID)
|
||||
double lat_deg = configuration->property("GNSS-SDR.init_latitude_deg", 41.0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user