1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00
This commit is contained in:
Carles Fernandez 2019-07-30 12:52:15 +02:00
commit 4d0e1f6577
6 changed files with 10 additions and 9 deletions

View File

@ -12,6 +12,7 @@ Checks: '-*,
cppcoreguidelines-slicing, cppcoreguidelines-slicing,
google-build-namespaces, google-build-namespaces,
google-runtime-int, google-runtime-int,
hicpp-exception-baseclass,
misc-misplaced-const, misc-misplaced-const,
misc-new-delete-overloads, misc-new-delete-overloads,
misc-non-copyable-objects, misc-non-copyable-objects,

View File

@ -32,6 +32,7 @@
#include "tcp_communication.h" #include "tcp_communication.h"
#include "tcp_packet_data.h" #include "tcp_packet_data.h"
#include <iostream> #include <iostream>
#include <stdexcept>
#include <string> #include <string>
@ -87,7 +88,7 @@ void Tcp_Communication::send_receive_tcp_packet_galileo_e1(boost::array<float, N
//! Control. The GNSS-SDR program ends if an error in a TCP packet is detected. //! Control. The GNSS-SDR program ends if an error in a TCP packet is detected.
if (d_control_id_ != readbuf.data()[0]) if (d_control_id_ != readbuf.data()[0])
{ {
throw "Packet error!"; throw std::runtime_error("Packet error!");
} }
// Recover the variables received // Recover the variables received
@ -122,7 +123,7 @@ void Tcp_Communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NU
//! Control. The GNSS-SDR program ends if an error in a TCP packet is detected. //! Control. The GNSS-SDR program ends if an error in a TCP packet is detected.
if (d_control_id_ != readbuf.data()[0]) if (d_control_id_ != readbuf.data()[0])
{ {
throw "Packet error!"; throw std::runtime_error("Packet error!");
} }
// Recover the variables received // Recover the variables received

View File

@ -71,9 +71,7 @@ const uint32_t GPS_L1_CA_OPT_ACQ_FS_HZ = 2000000; //!< Sampling frequency that
*/ */
const double MAX_TOA_DELAY_MS = 20; const double MAX_TOA_DELAY_MS = 20;
//#define NAVIGATION_SOLUTION_RATE_MS 1000 // this cannot go here const double GPS_STARTOFFSET_MS = 68.802; // [ms] Initial signal travel time (only for old ls_pvt implementation)
//const double GPS_STARTOFFSET_ms = 68.802; //[ms] Initial sign. travel time (this cannot go here)
const double GPS_STARTOFFSET_MS = 60.0;
// OBSERVABLE HISTORY DEEP FOR INTERPOLATION // OBSERVABLE HISTORY DEEP FOR INTERPOLATION
const int32_t GPS_L1_CA_HISTORY_DEEP = 100; const int32_t GPS_L1_CA_HISTORY_DEEP = 100;

View File

@ -45,6 +45,7 @@
#include <cmath> #include <cmath>
#include <iostream> // for operator<< #include <iostream> // for operator<<
#include <map> #include <map>
#include <stdexcept>
#include <utility> #include <utility>
extern Concurrent_Map<Gps_Ephemeris> global_gps_ephemeris_map; extern Concurrent_Map<Gps_Ephemeris> global_gps_ephemeris_map;
@ -303,7 +304,7 @@ arma::vec FrontEndCal::geodetic2ecef(double phi, double lambda, double h, const
} }
double FrontEndCal::estimate_doppler_from_eph(unsigned int PRN, double TOW, double lat, double lon, double height) double FrontEndCal::estimate_doppler_from_eph(unsigned int PRN, double TOW, double lat, double lon, double height) noexcept(false)
{ {
int num_secs = 10; int num_secs = 10;
double step_secs = 0.5; double step_secs = 0.5;
@ -359,7 +360,7 @@ double FrontEndCal::estimate_doppler_from_eph(unsigned int PRN, double TOW, doub
mean_Doppler_Hz = arma::mean(Doppler_Hz); mean_Doppler_Hz = arma::mean(Doppler_Hz);
return mean_Doppler_Hz; return mean_Doppler_Hz;
} }
throw(1); throw std::runtime_error("1");
} }

View File

@ -65,7 +65,7 @@ public:
* 3- Approximate receiver Latitude and Longitude (WGS-84) * 3- Approximate receiver Latitude and Longitude (WGS-84)
* *
*/ */
double estimate_doppler_from_eph(unsigned int PRN, double TOW, double lat, double lon, double height); double estimate_doppler_from_eph(unsigned int PRN, double TOW, double lat, double lon, double height) noexcept(false);
/*! /*!
* \brief This function models the Elonics E4000 + RTL2832 front-end * \brief This function models the Elonics E4000 + RTL2832 front-end

View File

@ -574,7 +574,7 @@ int main(int argc, char** argv)
{ {
std::cout << "Exception caught while reading ephemeris" << std::endl; std::cout << "Exception caught while reading ephemeris" << std::endl;
} }
catch (int ex) catch (const std::exception& ex)
{ {
std::cout << " " << it.first << " " << it.second << " (Eph not found)" << std::endl; std::cout << " " << it.first << " " << it.second << " (Eph not found)" << std::endl;
} }