Introduce readability-identifier-naming check

This commit enforces naming style for Classes and global constants:
Camel_Snake_Case for Classes
UPPER_CASE for global constants
CamelCase for abstract classes
This commit is contained in:
Carles Fernandez 2019-02-22 10:47:24 +01:00
parent 6d6979bb56
commit 62a7e54359
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
356 changed files with 2277 additions and 2268 deletions

View File

@ -35,12 +35,13 @@ Checks: '-*,
performance-unnecessary-copy-initialization, performance-unnecessary-copy-initialization,
performance-unnecessary-value-param, performance-unnecessary-value-param,
readability-container-size-empty, readability-container-size-empty,
readability-identifier-naming,
readability-inconsistent-declaration-parameter-name, readability-inconsistent-declaration-parameter-name,
readability-named-parameter, readability-named-parameter,
readability-non-const-parameter, readability-non-const-parameter,
readability-string-compare' readability-string-compare'
WarningsAsErrors: '' WarningsAsErrors: ''
HeaderFilterRegex: '*.h' HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false AnalyzeTemporaryDtors: false
FormatStyle: 'file' FormatStyle: 'file'
CheckOptions: CheckOptions:
@ -100,4 +101,12 @@ CheckOptions:
value: '1' value: '1'
- key: readability-inconsistent-declaration-parameter-name.Strict - key: readability-inconsistent-declaration-parameter-name.Strict
value: '0' value: '0'
- key: readability-identifier-naming.ClassCase
value: Camel_Snake_Case
- key: readability-identifier-naming.StructCase
value: aNy_CasE
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.AbstractClassCase
value: CamelCase
... ...

View File

@ -594,7 +594,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(uint32_t nchannels,
throw std::exception(); throw std::exception();
} }
d_pvt_solver = std::make_shared<rtklib_solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk); d_pvt_solver = std::make_shared<Rtklib_Solver>(static_cast<int32_t>(nchannels), dump_ls_pvt_filename, d_dump, d_dump_mat, rtk);
d_pvt_solver->set_averaging_depth(1); d_pvt_solver->set_averaging_depth(1);
start = std::chrono::system_clock::now(); start = std::chrono::system_clock::now();
} }

View File

@ -114,7 +114,7 @@ private:
bool d_kml_output_enabled; bool d_kml_output_enabled;
bool d_nmea_output_file_enabled; bool d_nmea_output_file_enabled;
std::shared_ptr<rtklib_solver> d_pvt_solver; std::shared_ptr<Rtklib_Solver> d_pvt_solver;
std::map<int, Gnss_Synchro> gnss_observables_map; std::map<int, Gnss_Synchro> gnss_observables_map;
bool observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b); bool observables_pairCompare_min(const std::pair<int, Gnss_Synchro>& a, const std::pair<int, Gnss_Synchro>& b);

View File

@ -155,14 +155,14 @@ bool Gpx_Printer::set_headers(const std::string& filename, bool time_tag_name)
} }
bool Gpx_Printer::print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values) bool Gpx_Printer::print_position(const std::shared_ptr<Rtklib_Solver>& position, bool print_average_values)
{ {
double latitude; double latitude;
double longitude; double longitude;
double height; double height;
positions_printed = true; positions_printed = true;
const std::shared_ptr<rtklib_solver>& position_ = position; const std::shared_ptr<Rtklib_Solver>& position_ = position;
double speed_over_ground = position_->get_speed_over_ground(); // expressed in m/s double speed_over_ground = position_->get_speed_over_ground(); // expressed in m/s
double course_over_ground = position_->get_course_over_ground(); // expressed in deg double course_over_ground = position_->get_course_over_ground(); // expressed in deg

View File

@ -58,7 +58,7 @@ public:
Gpx_Printer(const std::string& base_path = "."); Gpx_Printer(const std::string& base_path = ".");
~Gpx_Printer(); ~Gpx_Printer();
bool set_headers(const std::string& filename, bool time_tag_name = true); bool set_headers(const std::string& filename, bool time_tag_name = true);
bool print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values); bool print_position(const std::shared_ptr<Rtklib_Solver>& position, bool print_average_values);
bool close_file(); bool close_file();
}; };

View File

@ -40,7 +40,7 @@
using google::LogMessage; using google::LogMessage;
hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt() Hybrid_Ls_Pvt::Hybrid_Ls_Pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file) : Ls_Pvt()
{ {
// init empty ephemeris for all the available GNSS channels // init empty ephemeris for all the available GNSS channels
d_nchannels = nchannels; d_nchannels = nchannels;
@ -69,7 +69,7 @@ hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag
} }
hybrid_ls_pvt::~hybrid_ls_pvt() Hybrid_Ls_Pvt::~Hybrid_Ls_Pvt()
{ {
if (d_dump_file.is_open() == true) if (d_dump_file.is_open() == true)
{ {
@ -85,7 +85,7 @@ hybrid_ls_pvt::~hybrid_ls_pvt()
} }
bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging) bool Hybrid_Ls_Pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging)
{ {
std::map<int, Gnss_Synchro>::iterator gnss_observables_iter; std::map<int, Gnss_Synchro>::iterator gnss_observables_iter;
std::map<int, Galileo_Ephemeris>::iterator galileo_ephemeris_iter; std::map<int, Galileo_Ephemeris>::iterator galileo_ephemeris_iter;
@ -133,7 +133,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
// COMMON RX TIME PVT ALGORITHM // COMMON RX TIME PVT ALGORITHM
double Rx_time = hybrid_current_time; double Rx_time = hybrid_current_time;
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GALILEO_C_m_s; double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GALILEO_C_M_S;
// 2- compute the clock drift using the clock model (broadcast) for this SV // 2- compute the clock drift using the clock model (broadcast) for this SV
SV_clock_bias_s = galileo_ephemeris_iter->second.sv_clock_drift(Tx_time); SV_clock_bias_s = galileo_ephemeris_iter->second.sv_clock_drift(Tx_time);
@ -150,7 +150,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
// 4- fill the observations vector with the corrected observables // 4- fill the observations vector with the corrected observables
obs.resize(valid_obs + 1, 1); obs.resize(valid_obs + 1, 1);
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_m_s - this->get_time_offset_s() * GALILEO_C_m_s; obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + SV_clock_bias_s * GALILEO_C_M_S - this->get_time_offset_s() * GALILEO_C_M_S;
Galileo_week_number = galileo_ephemeris_iter->second.WN_5; //for GST Galileo_week_number = galileo_ephemeris_iter->second.WN_5; //for GST
GST = galileo_ephemeris_iter->second.Galileo_System_Time(Galileo_week_number, hybrid_current_time); GST = galileo_ephemeris_iter->second.Galileo_System_Time(Galileo_week_number, hybrid_current_time);
@ -188,7 +188,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
// COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files) // COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files)
// first estimate of transmit time // first estimate of transmit time
double Rx_time = hybrid_current_time; double Rx_time = hybrid_current_time;
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_m_s; double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_M_S;
// 2- compute the clock drift using the clock model (broadcast) for this SV, not including relativistic effect // 2- compute the clock drift using the clock model (broadcast) for this SV, not including relativistic effect
SV_clock_bias_s = gps_ephemeris_iter->second.sv_clock_drift(Tx_time); //- gps_ephemeris_iter->second.d_TGD; SV_clock_bias_s = gps_ephemeris_iter->second.sv_clock_drift(Tx_time); //- gps_ephemeris_iter->second.d_TGD;
@ -208,10 +208,10 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
// See IS-GPS-200E section 20.3.3.3.3.2 // See IS-GPS-200E section 20.3.3.3.3.2
double sqrt_Gamma = GPS_L1_FREQ_HZ / GPS_L2_FREQ_HZ; double sqrt_Gamma = GPS_L1_FREQ_HZ / GPS_L2_FREQ_HZ;
double Gamma = sqrt_Gamma * sqrt_Gamma; double Gamma = sqrt_Gamma * sqrt_Gamma;
double P1_P2 = (1.0 - Gamma) * (gps_ephemeris_iter->second.d_TGD * GPS_C_m_s); double P1_P2 = (1.0 - Gamma) * (gps_ephemeris_iter->second.d_TGD * GPS_C_M_S);
double Code_bias_m = P1_P2 / (1.0 - Gamma); double Code_bias_m = P1_P2 / (1.0 - Gamma);
obs.resize(valid_obs + 1, 1); obs.resize(valid_obs + 1, 1);
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_m_s - Code_bias_m - this->get_time_offset_s() * GPS_C_m_s; obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_M_S - Code_bias_m - this->get_time_offset_s() * GPS_C_M_S;
// SV ECEF DEBUG OUTPUT // SV ECEF DEBUG OUTPUT
LOG(INFO) << "(new)ECEF GPS L1 CA satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN LOG(INFO) << "(new)ECEF GPS L1 CA satellite SV ID=" << gps_ephemeris_iter->second.i_satellite_PRN
@ -243,7 +243,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
// COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files) // COMMON RX TIME PVT ALGORITHM MODIFICATION (Like RINEX files)
// first estimate of transmit time // first estimate of transmit time
double Rx_time = hybrid_current_time; double Rx_time = hybrid_current_time;
double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_m_s; double Tx_time = Rx_time - gnss_observables_iter->second.Pseudorange_m / GPS_C_M_S;
// 2- compute the clock drift using the clock model (broadcast) for this SV // 2- compute the clock drift using the clock model (broadcast) for this SV
SV_clock_bias_s = gps_cnav_ephemeris_iter->second.sv_clock_drift(Tx_time); SV_clock_bias_s = gps_cnav_ephemeris_iter->second.sv_clock_drift(Tx_time);
@ -261,7 +261,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
// 4- fill the observations vector with the corrected observables // 4- fill the observations vector with the corrected observables
obs.resize(valid_obs + 1, 1); obs.resize(valid_obs + 1, 1);
obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_m_s + SV_clock_bias_s * GPS_C_m_s; obs(valid_obs) = gnss_observables_iter->second.Pseudorange_m + dtr * GPS_C_M_S + SV_clock_bias_s * GPS_C_M_S;
GPS_week = gps_cnav_ephemeris_iter->second.i_GPS_week; GPS_week = gps_cnav_ephemeris_iter->second.i_GPS_week;
GPS_week = GPS_week % 1024; //Necessary due to the increase of WN bits in CNAV message (10 in GPS NAV and 13 in CNAV) GPS_week = GPS_week % 1024; //Necessary due to the increase of WN bits in CNAV message (10 in GPS NAV and 13 in CNAV)
@ -311,17 +311,17 @@ bool hybrid_ls_pvt::get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, do
DLOG(INFO) << " Executing Bancroft algorithm..."; DLOG(INFO) << " Executing Bancroft algorithm...";
rx_position_and_time = bancroftPos(satpos.t(), obs); rx_position_and_time = bancroftPos(satpos.t(), obs);
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
this->set_time_offset_s(rx_position_and_time(3) / GPS_C_m_s); // save time for the next iteration [meters]->[seconds] this->set_time_offset_s(rx_position_and_time(3) / GPS_C_M_S); // save time for the next iteration [meters]->[seconds]
} }
// Execute WLS using previous position as the initialization point // Execute WLS using previous position as the initialization point
rx_position_and_time = leastSquarePos(satpos, obs, W); rx_position_and_time = leastSquarePos(satpos, obs, W);
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration
this->set_time_offset_s(this->get_time_offset_s() + rx_position_and_time(3) / GPS_C_m_s); // accumulate the rx time error for the next iteration [meters]->[seconds] this->set_time_offset_s(this->get_time_offset_s() + rx_position_and_time(3) / GPS_C_M_S); // accumulate the rx time error for the next iteration [meters]->[seconds]
DLOG(INFO) << "Hybrid Position at TOW=" << hybrid_current_time << " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time; DLOG(INFO) << "Hybrid Position at TOW=" << hybrid_current_time << " in ECEF (X,Y,Z,t[meters]) = " << rx_position_and_time;
DLOG(INFO) << "Accumulated rx clock error=" << this->get_time_offset_s() << " clock error for this iteration=" << rx_position_and_time(3) / GPS_C_m_s << " [s]"; DLOG(INFO) << "Accumulated rx clock error=" << this->get_time_offset_s() << " clock error for this iteration=" << rx_position_and_time(3) / GPS_C_M_S << " [s]";
// Compute GST and Gregorian time // Compute GST and Gregorian time
if (GST != 0.0) if (GST != 0.0)

View File

@ -46,7 +46,7 @@
/*! /*!
* \brief This class implements a simple PVT Least Squares solution * \brief This class implements a simple PVT Least Squares solution
*/ */
class hybrid_ls_pvt : public Ls_Pvt class Hybrid_Ls_Pvt : public Ls_Pvt
{ {
private: private:
int count_valid_position; int count_valid_position;
@ -57,8 +57,8 @@ private:
double d_galileo_current_time; double d_galileo_current_time;
public: public:
hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file); Hybrid_Ls_Pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file);
~hybrid_ls_pvt(); ~Hybrid_Ls_Pvt();
bool get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging); bool get_PVT(std::map<int, Gnss_Synchro> gnss_observables_map, double hybrid_current_time, bool flag_averaging);

View File

@ -212,7 +212,7 @@ bool Kml_Printer::set_headers(const std::string& filename, bool time_tag_name)
} }
bool Kml_Printer::print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values) bool Kml_Printer::print_position(const std::shared_ptr<Rtklib_Solver>& position, bool print_average_values)
{ {
double latitude; double latitude;
double longitude; double longitude;
@ -220,7 +220,7 @@ bool Kml_Printer::print_position(const std::shared_ptr<rtklib_solver>& position,
positions_printed = true; positions_printed = true;
const std::shared_ptr<rtklib_solver>& position_ = position; const std::shared_ptr<Rtklib_Solver>& position_ = position;
double speed_over_ground = position_->get_speed_over_ground(); // expressed in m/s double speed_over_ground = position_->get_speed_over_ground(); // expressed in m/s
double course_over_ground = position_->get_course_over_ground(); // expressed in deg double course_over_ground = position_->get_course_over_ground(); // expressed in deg

View File

@ -61,7 +61,7 @@ public:
Kml_Printer(const std::string& base_path = std::string(".")); Kml_Printer(const std::string& base_path = std::string("."));
~Kml_Printer(); ~Kml_Printer();
bool set_headers(const std::string& filename, bool time_tag_name = true); bool set_headers(const std::string& filename, bool time_tag_name = true);
bool print_position(const std::shared_ptr<rtklib_solver>& position, bool print_average_values); bool print_position(const std::shared_ptr<Rtklib_Solver>& position, bool print_average_values);
bool close_file(); bool close_file();
}; };

View File

@ -95,7 +95,7 @@ arma::vec Ls_Pvt::bancroftPos(const arma::mat& satpos, const arma::vec& obs)
{ {
int z = B(i, 2); int z = B(i, 2);
double rho = (x - pos(0)) * (x - pos(0)) + (y - pos(1)) * (y - pos(1)) + (z - pos(2)) * (z - pos(2)); double rho = (x - pos(0)) * (x - pos(0)) + (y - pos(1)) * (y - pos(1)) + (z - pos(2)) * (z - pos(2));
traveltime = sqrt(rho) / GPS_C_m_s; traveltime = sqrt(rho) / GPS_C_M_S;
} }
double angle = traveltime * 7.292115147e-5; double angle = traveltime * 7.292115147e-5;
double cosa = cos(angle); double cosa = cos(angle);
@ -228,7 +228,7 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs,
(X(1, i) - pos(1)) + (X(1, i) - pos(1)) +
(X(2, i) - pos(2)) * (X(2, i) - pos(2)) *
(X(2, i) - pos(2)); (X(2, i) - pos(2));
traveltime = sqrt(rho2) / GPS_C_m_s; traveltime = sqrt(rho2) / GPS_C_M_S;
//--- Correct satellite position (do to earth rotation) -------- //--- Correct satellite position (do to earth rotation) --------
Rot_X = Ls_Pvt::rotateSatellite(traveltime, X.col(i)); //armadillo Rot_X = Ls_Pvt::rotateSatellite(traveltime, X.col(i)); //armadillo
@ -283,9 +283,9 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat& satpos, const arma::vec& obs,
} }
// check the consistency of the PVT solution // check the consistency of the PVT solution
if (((fabs(pos(3)) * 1000.0) / GPS_C_m_s) > GPS_STARTOFFSET_ms * 2) if (((fabs(pos(3)) * 1000.0) / GPS_C_M_S) > GPS_STARTOFFSET_MS * 2)
{ {
LOG(WARNING) << "Receiver time offset out of range! Estimated RX Time error [s]:" << pos(3) / GPS_C_m_s; LOG(WARNING) << "Receiver time offset out of range! Estimated RX Time error [s]:" << pos(3) / GPS_C_M_S;
throw std::runtime_error("Receiver time offset out of range!"); throw std::runtime_error("Receiver time offset out of range!");
} }
return pos; return pos;

View File

@ -199,7 +199,7 @@ void Nmea_Printer::close_serial()
} }
bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr<rtklib_solver>& pvt_data, bool print_average_values) bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr<Rtklib_Solver>& pvt_data, bool print_average_values)
{ {
std::string GPRMC; std::string GPRMC;
std::string GPGGA; std::string GPGGA;

View File

@ -59,7 +59,7 @@ public:
/*! /*!
* \brief Print NMEA PVT and satellite info to the initialized device * \brief Print NMEA PVT and satellite info to the initialized device
*/ */
bool Print_Nmea_Line(const std::shared_ptr<rtklib_solver>& pvt_data, bool print_average_values); bool Print_Nmea_Line(const std::shared_ptr<Rtklib_Solver>& pvt_data, bool print_average_values);
/*! /*!
* \brief Default destructor. * \brief Default destructor.
@ -72,7 +72,7 @@ private:
std::ofstream nmea_file_descriptor; // Output file stream for NMEA log file std::ofstream nmea_file_descriptor; // Output file stream for NMEA log file
std::string nmea_devname; std::string nmea_devname;
int nmea_dev_descriptor; // NMEA serial device descriptor (i.e. COM port) int nmea_dev_descriptor; // NMEA serial device descriptor (i.e. COM port)
std::shared_ptr<rtklib_solver> d_PVT_data; std::shared_ptr<Rtklib_Solver> d_PVT_data;
int init_serial(const std::string& serial_device); //serial port control int init_serial(const std::string& serial_device); //serial port control
void close_serial(); void close_serial();
std::string get_GPGGA(); // fix data std::string get_GPGGA(); // fix data

View File

@ -66,7 +66,7 @@
using google::LogMessage; using google::LogMessage;
rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk) Rtklib_Solver::Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t &rtk)
{ {
// init empty ephemeris for all the available GNSS channels // init empty ephemeris for all the available GNSS channels
d_nchannels = nchannels; d_nchannels = nchannels;
@ -134,7 +134,7 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
monitor_pvt.vdop = 0.0; monitor_pvt.vdop = 0.0;
} }
bool rtklib_solver::save_matfile() bool Rtklib_Solver::save_matfile()
{ {
// READ DUMP FILE // READ DUMP FILE
std::string dump_filename = d_dump_filename; std::string dump_filename = d_dump_filename;
@ -431,7 +431,7 @@ bool rtklib_solver::save_matfile()
} }
rtklib_solver::~rtklib_solver() Rtklib_Solver::~Rtklib_Solver()
{ {
if (d_dump_file.is_open() == true) if (d_dump_file.is_open() == true)
{ {
@ -458,35 +458,35 @@ rtklib_solver::~rtklib_solver()
} }
double rtklib_solver::get_gdop() const double Rtklib_Solver::get_gdop() const
{ {
return dop_[0]; return dop_[0];
} }
double rtklib_solver::get_pdop() const double Rtklib_Solver::get_pdop() const
{ {
return dop_[1]; return dop_[1];
} }
double rtklib_solver::get_hdop() const double Rtklib_Solver::get_hdop() const
{ {
return dop_[2]; return dop_[2];
} }
double rtklib_solver::get_vdop() const double Rtklib_Solver::get_vdop() const
{ {
return dop_[3]; return dop_[3];
} }
Monitor_Pvt rtklib_solver::get_monitor_pvt() const Monitor_Pvt Rtklib_Solver::get_monitor_pvt() const
{ {
return monitor_pvt; return monitor_pvt;
} }
bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, bool flag_averaging) bool Rtklib_Solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_map, bool flag_averaging)
{ {
std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter; std::map<int, Gnss_Synchro>::const_iterator gnss_observables_iter;
std::map<int, Galileo_Ephemeris>::const_iterator galileo_ephemeris_iter; std::map<int, Galileo_Ephemeris>::const_iterator galileo_ephemeris_iter;
@ -916,7 +916,7 @@ bool rtklib_solver::get_PVT(const std::map<int, Gnss_Synchro> &gnss_observables_
} }
else else
{ {
rx_position_and_time(3) = pvt_sol.dtr[0] / GPS_C_m_s; // the receiver clock offset is expressed in [meters], so we convert it into [s] rx_position_and_time(3) = pvt_sol.dtr[0] / GPS_C_M_S; // the receiver clock offset is expressed in [meters], so we convert it into [s]
} }
this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration this->set_rx_pos(rx_position_and_time.rows(0, 2)); // save ECEF position for the next iteration

View File

@ -74,7 +74,7 @@
/*! /*!
* \brief This class implements a simple PVT Least Squares solution * \brief This class implements a simple PVT Least Squares solution
*/ */
class rtklib_solver : public Pvt_Solution class Rtklib_Solver : public Pvt_Solution
{ {
private: private:
rtk_t rtk_; rtk_t rtk_;
@ -91,8 +91,8 @@ private:
public: public:
sol_t pvt_sol; sol_t pvt_sol;
ssat_t pvt_ssat[MAXSAT]; ssat_t pvt_ssat[MAXSAT];
rtklib_solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t& rtk); Rtklib_Solver(int nchannels, std::string dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat, const rtk_t& rtk);
~rtklib_solver(); ~Rtklib_Solver();
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging); bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, bool flag_averaging);
double get_hdop() const; double get_hdop() const;

View File

@ -82,7 +82,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
//--- Find number of samples per spreading code (4 ms) ----------------- //--- Find number of samples per spreading code (4 ms) -----------------
code_length_ = round( code_length_ = round(
fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4); vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);

View File

@ -98,10 +98,10 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
} }
if (acq_parameters_.use_automatic_resampler) if (acq_parameters_.use_automatic_resampler)
{ {
if (acq_parameters_.fs_in > Galileo_E1_OPT_ACQ_FS_HZ) if (acq_parameters_.fs_in > GALILEO_E1_OPT_ACQ_FS_HZ)
{ {
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / Galileo_E1_OPT_ACQ_FS_HZ); acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GALILEO_E1_OPT_ACQ_FS_HZ);
uint32_t decimation = acq_parameters_.fs_in / Galileo_E1_OPT_ACQ_FS_HZ; uint32_t decimation = acq_parameters_.fs_in / GALILEO_E1_OPT_ACQ_FS_HZ;
while (acq_parameters_.fs_in % decimation > 0) while (acq_parameters_.fs_in % decimation > 0)
{ {
decimation--; decimation--;
@ -110,19 +110,19 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast<int>(acq_parameters_.resampler_ratio); acq_parameters_.resampled_fs = acq_parameters_.fs_in / static_cast<int>(acq_parameters_.resampler_ratio);
} }
//--- Find number of samples per spreading code (4 ms) ----------------- //--- Find number of samples per spreading code (4 ms) -----------------
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001; acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs))); acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
} }
else else
{ {
//--- Find number of samples per spreading code (4 ms) ----------------- //--- Find number of samples per spreading code (4 ms) -----------------
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001; acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in))); acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E1_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
} }
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(Galileo_E1_CODE_PERIOD_MS); acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GALILEO_E1_CODE_PERIOD_MS);
vector_length_ = sampled_ms_ * acq_parameters_.samples_per_ms; vector_length_ = sampled_ms_ * acq_parameters_.samples_per_ms;
if (bit_transition_flag_) if (bit_transition_flag_)
{ {

View File

@ -82,7 +82,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
//--- Find number of samples per spreading code (4 ms) ----------------- //--- Find number of samples per spreading code (4 ms) -----------------
code_length_ = round( code_length_ = round(
fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4); vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);

View File

@ -69,7 +69,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
/*--- Find number of samples per spreading code (4 ms) -----------------*/ /*--- Find number of samples per spreading code (4 ms) -----------------*/
code_length_ = round( code_length_ = round(
fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
int samples_per_ms = round(code_length_ / 4.0); int samples_per_ms = round(code_length_ / 4.0);

View File

@ -85,7 +85,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
//--- Find number of samples per spreading code (4 ms) ----------------- //--- Find number of samples per spreading code (4 ms) -----------------
code_length_ = round( code_length_ = round(
fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); fs_in_ / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4); vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);

View File

@ -91,7 +91,7 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false); bit_transition_flag_ = configuration_->property(role + ".bit_transition_flag", false);
//--- Find number of samples per spreading code (1ms)------------------------- //--- Find number of samples per spreading code (1ms)-------------------------
code_length_ = round(static_cast<double>(fs_in_) / Galileo_E5a_CODE_CHIP_RATE_HZ * static_cast<double>(Galileo_E5a_CODE_LENGTH_CHIPS)); code_length_ = round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * sampled_ms_; vector_length_ = code_length_ * sampled_ms_;

View File

@ -96,10 +96,10 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
} }
if (acq_parameters_.use_automatic_resampler) if (acq_parameters_.use_automatic_resampler)
{ {
if (acq_parameters_.fs_in > Galileo_E5a_OPT_ACQ_FS_HZ) if (acq_parameters_.fs_in > GALILEO_E5A_OPT_ACQ_FS_HZ)
{ {
acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / Galileo_E5a_OPT_ACQ_FS_HZ); acq_parameters_.resampler_ratio = floor(static_cast<float>(acq_parameters_.fs_in) / GALILEO_E5A_OPT_ACQ_FS_HZ);
uint32_t decimation = acq_parameters_.fs_in / Galileo_E5a_OPT_ACQ_FS_HZ; uint32_t decimation = acq_parameters_.fs_in / GALILEO_E5A_OPT_ACQ_FS_HZ;
while (acq_parameters_.fs_in % decimation > 0) while (acq_parameters_.fs_in % decimation > 0)
{ {
decimation--; decimation--;
@ -109,21 +109,21 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
} }
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS))); code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS)));
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001; acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E5a_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs))); acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
} }
else else
{ {
acq_parameters_.resampled_fs = fs_in_; acq_parameters_.resampled_fs = fs_in_;
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS))); code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS)));
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001; acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / Galileo_E5a_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in))); acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GALILEO_E5A_CODE_CHIP_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
} }
//--- Find number of samples per spreading code (1ms)------------------------- //--- Find number of samples per spreading code (1ms)-------------------------
code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / Galileo_E5a_CODE_CHIP_RATE_HZ * static_cast<double>(Galileo_E5a_CODE_LENGTH_CHIPS))); code_length_ = static_cast<unsigned int>(std::round(static_cast<double>(fs_in_) / GALILEO_E5A_CODE_CHIP_RATE_HZ * static_cast<double>(GALILEO_E5A_CODE_LENGTH_CHIPS)));
vector_length_ = code_length_ * sampled_ms_; vector_length_ = code_length_ * sampled_ms_;
code_ = new gr_complex[vector_length_]; code_ = new gr_complex[vector_length_];
@ -144,7 +144,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
acq_parameters_.it_size = item_size_; acq_parameters_.it_size = item_size_;
acq_parameters_.sampled_ms = sampled_ms_; acq_parameters_.sampled_ms = sampled_ms_;
acq_parameters_.ms_per_code = 1; acq_parameters_.ms_per_code = 1;
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GALILEO_E5a_CODE_PERIOD_MS); acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GALILEO_E5A_CODE_PERIOD_MS);
acq_parameters_.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4); acq_parameters_.num_doppler_bins_step2 = configuration_->property(role + ".second_nbins", 4);
acq_parameters_.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters_.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0);
acq_parameters_.make_2_steps = configuration_->property(role + ".make_two_steps", false); acq_parameters_.make_2_steps = configuration_->property(role + ".make_two_steps", false);

View File

@ -121,20 +121,20 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
} }
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L5i_CODE_RATE_HZ / GPS_L5i_CODE_LENGTH_CHIPS))); code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GPS_L5I_CODE_RATE_HZ / GPS_L5I_CODE_LENGTH_CHIPS)));
acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001; acq_parameters_.samples_per_ms = static_cast<float>(acq_parameters_.resampled_fs) * 0.001;
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5i_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs))); acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5I_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.resampled_fs)));
} }
else else
{ {
acq_parameters_.resampled_fs = fs_in_; acq_parameters_.resampled_fs = fs_in_;
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L5i_CODE_RATE_HZ / GPS_L5i_CODE_LENGTH_CHIPS))); code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(fs_in_) / (GPS_L5I_CODE_RATE_HZ / GPS_L5I_CODE_LENGTH_CHIPS)));
acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001; acq_parameters_.samples_per_ms = static_cast<float>(fs_in_) * 0.001;
acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5i_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in))); acq_parameters_.samples_per_chip = static_cast<unsigned int>(ceil((1.0 / GPS_L5I_CODE_RATE_HZ) * static_cast<float>(acq_parameters_.fs_in)));
} }
acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L5i_PERIOD * 1000.0); acq_parameters_.samples_per_code = acq_parameters_.samples_per_ms * static_cast<float>(GPS_L5I_PERIOD * 1000.0);
vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1); vector_length_ = std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2 : 1);
code_ = new gr_complex[vector_length_]; code_ = new gr_complex[vector_length_];
acquisition_ = pcps_make_acquisition(acq_parameters_); acquisition_ = pcps_make_acquisition(acq_parameters_);

View File

@ -42,7 +42,7 @@
#include <sstream> #include <sstream>
#include <utility> #include <utility>
extern concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map; extern Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
using google::LogMessage; using google::LogMessage;

View File

@ -51,7 +51,7 @@ void galileo_e1_code_gen_int(int* _dest, char _Signal[3], int32_t _prn)
if (_galileo_signal.rfind("1B") != std::string::npos && _galileo_signal.length() >= 2) if (_galileo_signal.rfind("1B") != std::string::npos && _galileo_signal.length() >= 2)
{ {
for (char i : Galileo_E1_B_PRIMARY_CODE[prn]) for (char i : GALILEO_E1_B_PRIMARY_CODE[prn])
{ {
hex_to_binary_converter(&_dest[index], i); hex_to_binary_converter(&_dest[index], i);
index += 4; index += 4;
@ -59,7 +59,7 @@ void galileo_e1_code_gen_int(int* _dest, char _Signal[3], int32_t _prn)
} }
else if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2) else if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2)
{ {
for (char i : Galileo_E1_C_PRIMARY_CODE[prn]) for (char i : GALILEO_E1_C_PRIMARY_CODE[prn])
{ {
hex_to_binary_converter(&_dest[index], i); hex_to_binary_converter(&_dest[index], i);
index += 4; index += 4;
@ -70,7 +70,7 @@ void galileo_e1_code_gen_int(int* _dest, char _Signal[3], int32_t _prn)
void galileo_e1_sinboc_11_gen_int(int* _dest, const int* _prn, uint32_t _length_out) void galileo_e1_sinboc_11_gen_int(int* _dest, const int* _prn, uint32_t _length_out)
{ {
const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS; const uint32_t _length_in = GALILEO_E1_B_CODE_LENGTH_CHIPS;
auto _period = static_cast<uint32_t>(_length_out / _length_in); auto _period = static_cast<uint32_t>(_length_out / _length_in);
for (uint32_t i = 0; i < _length_in; i++) for (uint32_t i = 0; i < _length_in; i++)
{ {
@ -88,7 +88,7 @@ void galileo_e1_sinboc_11_gen_int(int* _dest, const int* _prn, uint32_t _length_
void galileo_e1_sinboc_61_gen_int(int* _dest, const int* _prn, uint32_t _length_out) void galileo_e1_sinboc_61_gen_int(int* _dest, const int* _prn, uint32_t _length_out)
{ {
const uint32_t _length_in = Galileo_E1_B_CODE_LENGTH_CHIPS; const uint32_t _length_in = GALILEO_E1_B_CODE_LENGTH_CHIPS;
auto _period = static_cast<uint32_t>(_length_out / _length_in); auto _period = static_cast<uint32_t>(_length_out / _length_in);
for (uint32_t i = 0; i < _length_in; i++) for (uint32_t i = 0; i < _length_in; i++)
@ -108,7 +108,7 @@ void galileo_e1_sinboc_61_gen_int(int* _dest, const int* _prn, uint32_t _length_
void galileo_e1_code_gen_sinboc11_float(float* _dest, char _Signal[3], uint32_t _prn) void galileo_e1_code_gen_sinboc11_float(float* _dest, char _Signal[3], uint32_t _prn)
{ {
std::string _galileo_signal = _Signal; std::string _galileo_signal = _Signal;
const auto _codeLength = static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS); const auto _codeLength = static_cast<uint32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS);
int32_t primary_code_E1_chips[4092]; // _codeLength not accepted by Clang int32_t primary_code_E1_chips[4092]; // _codeLength not accepted by Clang
galileo_e1_code_gen_int(primary_code_E1_chips, _Signal, _prn); //generate Galileo E1 code, 1 sample per chip galileo_e1_code_gen_int(primary_code_E1_chips, _Signal, _prn); //generate Galileo E1 code, 1 sample per chip
for (uint32_t i = 0; i < _codeLength; i++) for (uint32_t i = 0; i < _codeLength; i++)
@ -122,7 +122,7 @@ void galileo_e1_code_gen_sinboc11_float(float* _dest, char _Signal[3], uint32_t
void galileo_e1_gen_float(float* _dest, int* _prn, char _Signal[3]) void galileo_e1_gen_float(float* _dest, int* _prn, char _Signal[3])
{ {
std::string _galileo_signal = _Signal; std::string _galileo_signal = _Signal;
const uint32_t _codeLength = 12 * Galileo_E1_B_CODE_LENGTH_CHIPS; const uint32_t _codeLength = 12 * GALILEO_E1_B_CODE_LENGTH_CHIPS;
const float alpha = sqrt(10.0 / 11.0); const float alpha = sqrt(10.0 / 11.0);
const float beta = sqrt(1.0 / 11.0); const float beta = sqrt(1.0 / 11.0);
@ -158,20 +158,20 @@ void galileo_e1_code_gen_float_sampled(float* _dest, char _Signal[3],
// This function is based on the GNU software GPS for MATLAB in Kay Borre's book // This function is based on the GNU software GPS for MATLAB in Kay Borre's book
std::string _galileo_signal = _Signal; std::string _galileo_signal = _Signal;
uint32_t _samplesPerCode; uint32_t _samplesPerCode;
const int32_t _codeFreqBasis = Galileo_E1_CODE_CHIP_RATE_HZ; // Hz const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_HZ; // Hz
auto _codeLength = static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS); auto _codeLength = static_cast<uint32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS);
auto* primary_code_E1_chips = static_cast<int32_t*>(volk_gnsssdr_malloc(static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(int32_t), volk_gnsssdr_get_alignment())); auto* primary_code_E1_chips = static_cast<int32_t*>(volk_gnsssdr_malloc(static_cast<uint32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS) * sizeof(int32_t), volk_gnsssdr_get_alignment()));
_samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / static_cast<double>(_codeLength))); _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / static_cast<double>(_codeLength)));
const int32_t _samplesPerChip = (_cboc == true) ? 12 : 2; const int32_t _samplesPerChip = (_cboc == true) ? 12 : 2;
const uint32_t delay = ((static_cast<int32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS) - _chip_shift) % static_cast<int32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS)) * _samplesPerCode / Galileo_E1_B_CODE_LENGTH_CHIPS; const uint32_t delay = ((static_cast<int32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS) - _chip_shift) % static_cast<int32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS)) * _samplesPerCode / GALILEO_E1_B_CODE_LENGTH_CHIPS;
galileo_e1_code_gen_int(primary_code_E1_chips, _Signal, _prn); // generate Galileo E1 code, 1 sample per chip galileo_e1_code_gen_int(primary_code_E1_chips, _Signal, _prn); // generate Galileo E1 code, 1 sample per chip
float* _signal_E1; float* _signal_E1;
_codeLength = _samplesPerChip * Galileo_E1_B_CODE_LENGTH_CHIPS; _codeLength = _samplesPerChip * GALILEO_E1_B_CODE_LENGTH_CHIPS;
_signal_E1 = new float[_codeLength]; _signal_E1 = new float[_codeLength];
if (_cboc == true) if (_cboc == true)
@ -203,17 +203,17 @@ void galileo_e1_code_gen_float_sampled(float* _dest, char _Signal[3],
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag) if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
{ {
auto* _signal_E1C_secondary = new float[static_cast<int32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode]; auto* _signal_E1C_secondary = new float[static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) * _samplesPerCode];
for (uint32_t i = 0; i < static_cast<uint32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH); i++) for (uint32_t i = 0; i < static_cast<uint32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH); i++)
{ {
for (unsigned k = 0; k < _samplesPerCode; k++) for (unsigned k = 0; k < _samplesPerCode; k++)
{ {
_signal_E1C_secondary[i * _samplesPerCode + k] = _signal_E1[k] * (Galileo_E1_C_SECONDARY_CODE.at(i) == '0' ? 1.0f : -1.0f); _signal_E1C_secondary[i * _samplesPerCode + k] = _signal_E1[k] * (GALILEO_E1_C_SECONDARY_CODE.at(i) == '0' ? 1.0f : -1.0f);
} }
} }
_samplesPerCode *= static_cast<int32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH); _samplesPerCode *= static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH);
delete[] _signal_E1; delete[] _signal_E1;
_signal_E1 = _signal_E1C_secondary; _signal_E1 = _signal_E1C_secondary;
@ -234,13 +234,13 @@ void galileo_e1_code_gen_complex_sampled(std::complex<float>* _dest, char _Signa
bool _secondary_flag) bool _secondary_flag)
{ {
std::string _galileo_signal = _Signal; std::string _galileo_signal = _Signal;
const int32_t _codeFreqBasis = Galileo_E1_CODE_CHIP_RATE_HZ; // Hz const int32_t _codeFreqBasis = GALILEO_E1_CODE_CHIP_RATE_HZ; // Hz
auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) /
(static_cast<double>(_codeFreqBasis) / static_cast<double>(Galileo_E1_B_CODE_LENGTH_CHIPS))); (static_cast<double>(_codeFreqBasis) / static_cast<double>(GALILEO_E1_B_CODE_LENGTH_CHIPS)));
if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag) if (_galileo_signal.rfind("1C") != std::string::npos && _galileo_signal.length() >= 2 && _secondary_flag)
{ {
_samplesPerCode *= static_cast<int32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH); _samplesPerCode *= static_cast<int32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH);
} }
auto* real_code = static_cast<float*>(volk_gnsssdr_malloc(_samplesPerCode * sizeof(float), volk_gnsssdr_get_alignment())); auto* real_code = static_cast<float*>(volk_gnsssdr_malloc(_samplesPerCode * sizeof(float), volk_gnsssdr_get_alignment()));

View File

@ -48,9 +48,9 @@ void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _
} }
if (_Signal[0] == '5' && _Signal[1] == 'Q') if (_Signal[0] == '5' && _Signal[1] == 'Q')
{ {
for (size_t i = 0; i < Galileo_E5a_Q_PRIMARY_CODE[prn].length() - 1; i++) for (size_t i = 0; i < GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1; i++)
{ {
hex_to_binary_converter(a, Galileo_E5a_Q_PRIMARY_CODE[prn].at(i)); hex_to_binary_converter(a, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(i));
_dest[index] = std::complex<float>(0.0, float(a[0])); _dest[index] = std::complex<float>(0.0, float(a[0]));
_dest[index + 1] = std::complex<float>(0.0, float(a[1])); _dest[index + 1] = std::complex<float>(0.0, float(a[1]));
_dest[index + 2] = std::complex<float>(0.0, float(a[2])); _dest[index + 2] = std::complex<float>(0.0, float(a[2]));
@ -58,15 +58,15 @@ void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _
index = index + 4; index = index + 4;
} }
// last 2 bits are filled up zeros // last 2 bits are filled up zeros
hex_to_binary_converter(a, Galileo_E5a_Q_PRIMARY_CODE[prn].at(Galileo_E5a_Q_PRIMARY_CODE[prn].length() - 1)); hex_to_binary_converter(a, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1));
_dest[index] = std::complex<float>(float(0.0), a[0]); _dest[index] = std::complex<float>(float(0.0), a[0]);
_dest[index + 1] = std::complex<float>(float(0.0), a[1]); _dest[index + 1] = std::complex<float>(float(0.0), a[1]);
} }
else if (_Signal[0] == '5' && _Signal[1] == 'I') else if (_Signal[0] == '5' && _Signal[1] == 'I')
{ {
for (size_t i = 0; i < Galileo_E5a_I_PRIMARY_CODE[prn].length() - 1; i++) for (size_t i = 0; i < GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1; i++)
{ {
hex_to_binary_converter(a, Galileo_E5a_I_PRIMARY_CODE[prn].at(i)); hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(i));
_dest[index] = std::complex<float>(float(a[0]), 0.0); _dest[index] = std::complex<float>(float(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(float(a[1]), 0.0); _dest[index + 1] = std::complex<float>(float(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(float(a[2]), 0.0); _dest[index + 2] = std::complex<float>(float(a[2]), 0.0);
@ -74,17 +74,17 @@ void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _
index = index + 4; index = index + 4;
} }
// last 2 bits are filled up zeros // last 2 bits are filled up zeros
hex_to_binary_converter(a, Galileo_E5a_I_PRIMARY_CODE[prn].at(Galileo_E5a_I_PRIMARY_CODE[prn].length() - 1)); hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1));
_dest[index] = std::complex<float>(float(a[0]), 0.0); _dest[index] = std::complex<float>(float(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(float(a[1]), 0.0); _dest[index + 1] = std::complex<float>(float(a[1]), 0.0);
} }
else if (_Signal[0] == '5' && _Signal[1] == 'X') else if (_Signal[0] == '5' && _Signal[1] == 'X')
{ {
int32_t b[4]; int32_t b[4];
for (size_t i = 0; i < Galileo_E5a_I_PRIMARY_CODE[prn].length() - 1; i++) for (size_t i = 0; i < GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1; i++)
{ {
hex_to_binary_converter(a, Galileo_E5a_I_PRIMARY_CODE[prn].at(i)); hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(i));
hex_to_binary_converter(b, Galileo_E5a_Q_PRIMARY_CODE[prn].at(i)); hex_to_binary_converter(b, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(i));
_dest[index] = std::complex<float>(float(a[0]), float(b[0])); _dest[index] = std::complex<float>(float(a[0]), float(b[0]));
_dest[index + 1] = std::complex<float>(float(a[1]), float(b[1])); _dest[index + 1] = std::complex<float>(float(a[1]), float(b[1]));
_dest[index + 2] = std::complex<float>(float(a[2]), float(b[2])); _dest[index + 2] = std::complex<float>(float(a[2]), float(b[2]));
@ -92,8 +92,8 @@ void galileo_e5_a_code_gen_complex_primary(std::complex<float>* _dest, int32_t _
index = index + 4; index = index + 4;
} }
// last 2 bits are filled up zeros // last 2 bits are filled up zeros
hex_to_binary_converter(a, Galileo_E5a_I_PRIMARY_CODE[prn].at(Galileo_E5a_I_PRIMARY_CODE[prn].length() - 1)); hex_to_binary_converter(a, GALILEO_E5A_I_PRIMARY_CODE[prn].at(GALILEO_E5A_I_PRIMARY_CODE[prn].length() - 1));
hex_to_binary_converter(b, Galileo_E5a_Q_PRIMARY_CODE[prn].at(Galileo_E5a_Q_PRIMARY_CODE[prn].length() - 1)); hex_to_binary_converter(b, GALILEO_E5A_Q_PRIMARY_CODE[prn].at(GALILEO_E5A_Q_PRIMARY_CODE[prn].length() - 1));
_dest[index] = std::complex<float>(float(a[0]), float(b[0])); _dest[index] = std::complex<float>(float(a[0]), float(b[0]));
_dest[index + 1] = std::complex<float>(float(a[1]), float(b[1])); _dest[index + 1] = std::complex<float>(float(a[1]), float(b[1]));
} }
@ -105,8 +105,8 @@ void galileo_e5_a_code_gen_complex_sampled(std::complex<float>* _dest, char _Sig
{ {
uint32_t _samplesPerCode; uint32_t _samplesPerCode;
uint32_t delay; uint32_t delay;
const uint32_t _codeLength = Galileo_E5a_CODE_LENGTH_CHIPS; const uint32_t _codeLength = GALILEO_E5A_CODE_LENGTH_CHIPS;
const int32_t _codeFreqBasis = Galileo_E5a_CODE_CHIP_RATE_HZ; const int32_t _codeFreqBasis = GALILEO_E5A_CODE_CHIP_RATE_HZ;
auto* _code = new std::complex<float>[_codeLength](); auto* _code = new std::complex<float>[_codeLength]();

View File

@ -81,9 +81,9 @@ std::deque<bool> l5q_xb_shift(std::deque<bool> xb)
std::deque<bool> make_l5i_xa() std::deque<bool> make_l5i_xa()
{ {
std::deque<bool> xa = {true, true, true, true, true, true, true, true, true, true, true, true, true}; std::deque<bool> xa = {true, true, true, true, true, true, true, true, true, true, true, true, true};
std::deque<bool> y(GPS_L5i_CODE_LENGTH_CHIPS, false); std::deque<bool> y(GPS_L5I_CODE_LENGTH_CHIPS, false);
for (int32_t i = 0; i < GPS_L5i_CODE_LENGTH_CHIPS; i++) for (int32_t i = 0; i < GPS_L5I_CODE_LENGTH_CHIPS; i++)
{ {
y[i] = xa[12]; y[i] = xa[12];
xa = l5i_xa_shift(xa); xa = l5i_xa_shift(xa);
@ -95,9 +95,9 @@ std::deque<bool> make_l5i_xa()
std::deque<bool> make_l5i_xb() std::deque<bool> make_l5i_xb()
{ {
std::deque<bool> xb = {true, true, true, true, true, true, true, true, true, true, true, true, true}; std::deque<bool> xb = {true, true, true, true, true, true, true, true, true, true, true, true, true};
std::deque<bool> y(GPS_L5i_CODE_LENGTH_CHIPS, false); std::deque<bool> y(GPS_L5I_CODE_LENGTH_CHIPS, false);
for (int32_t i = 0; i < GPS_L5i_CODE_LENGTH_CHIPS; i++) for (int32_t i = 0; i < GPS_L5I_CODE_LENGTH_CHIPS; i++)
{ {
y[i] = xb[12]; y[i] = xb[12];
xb = l5i_xb_shift(xb); xb = l5i_xb_shift(xb);
@ -109,9 +109,9 @@ std::deque<bool> make_l5i_xb()
std::deque<bool> make_l5q_xa() std::deque<bool> make_l5q_xa()
{ {
std::deque<bool> xa = {true, true, true, true, true, true, true, true, true, true, true, true, true}; std::deque<bool> xa = {true, true, true, true, true, true, true, true, true, true, true, true, true};
std::deque<bool> y(GPS_L5q_CODE_LENGTH_CHIPS, false); std::deque<bool> y(GPS_L5Q_CODE_LENGTH_CHIPS, false);
for (int32_t i = 0; i < GPS_L5q_CODE_LENGTH_CHIPS; i++) for (int32_t i = 0; i < GPS_L5Q_CODE_LENGTH_CHIPS; i++)
{ {
y[i] = xa[12]; y[i] = xa[12];
xa = l5q_xa_shift(xa); xa = l5q_xa_shift(xa);
@ -123,9 +123,9 @@ std::deque<bool> make_l5q_xa()
std::deque<bool> make_l5q_xb() std::deque<bool> make_l5q_xb()
{ {
std::deque<bool> xb = {true, true, true, true, true, true, true, true, true, true, true, true, true}; std::deque<bool> xb = {true, true, true, true, true, true, true, true, true, true, true, true, true};
std::deque<bool> y(GPS_L5q_CODE_LENGTH_CHIPS, false); std::deque<bool> y(GPS_L5Q_CODE_LENGTH_CHIPS, false);
for (int32_t i = 0; i < GPS_L5q_CODE_LENGTH_CHIPS; i++) for (int32_t i = 0; i < GPS_L5Q_CODE_LENGTH_CHIPS; i++)
{ {
y[i] = xb[12]; y[i] = xb[12];
xb = l5q_xb_shift(xb); xb = l5q_xb_shift(xb);
@ -136,18 +136,18 @@ std::deque<bool> make_l5q_xb()
void make_l5i(int32_t* _dest, int32_t prn) void make_l5i(int32_t* _dest, int32_t prn)
{ {
int32_t xb_offset = GPS_L5i_INIT_REG[prn]; int32_t xb_offset = GPS_L5I_INIT_REG[prn];
std::deque<bool> xb = make_l5i_xb(); std::deque<bool> xb = make_l5i_xb();
std::deque<bool> xa = make_l5i_xa(); std::deque<bool> xa = make_l5i_xa();
std::deque<bool> xb_shift(GPS_L5i_CODE_LENGTH_CHIPS, false); std::deque<bool> xb_shift(GPS_L5I_CODE_LENGTH_CHIPS, false);
for (int32_t n = 0; n < GPS_L5i_CODE_LENGTH_CHIPS; n++) for (int32_t n = 0; n < GPS_L5I_CODE_LENGTH_CHIPS; n++)
{ {
xb_shift[n] = xb[(xb_offset + n) % GPS_L5i_CODE_LENGTH_CHIPS]; xb_shift[n] = xb[(xb_offset + n) % GPS_L5I_CODE_LENGTH_CHIPS];
} }
std::deque<bool> out_code(GPS_L5i_CODE_LENGTH_CHIPS, false); std::deque<bool> out_code(GPS_L5I_CODE_LENGTH_CHIPS, false);
for (int32_t n = 0; n < GPS_L5i_CODE_LENGTH_CHIPS; n++) for (int32_t n = 0; n < GPS_L5I_CODE_LENGTH_CHIPS; n++)
{ {
_dest[n] = xa[n] xor xb_shift[n]; _dest[n] = xa[n] xor xb_shift[n];
} }
@ -156,18 +156,18 @@ void make_l5i(int32_t* _dest, int32_t prn)
void make_l5q(int32_t* _dest, int32_t prn) void make_l5q(int32_t* _dest, int32_t prn)
{ {
int32_t xb_offset = GPS_L5q_INIT_REG[prn]; int32_t xb_offset = GPS_L5Q_INIT_REG[prn];
std::deque<bool> xb = make_l5q_xb(); std::deque<bool> xb = make_l5q_xb();
std::deque<bool> xa = make_l5q_xa(); std::deque<bool> xa = make_l5q_xa();
std::deque<bool> xb_shift(GPS_L5q_CODE_LENGTH_CHIPS, false); std::deque<bool> xb_shift(GPS_L5Q_CODE_LENGTH_CHIPS, false);
for (int32_t n = 0; n < GPS_L5q_CODE_LENGTH_CHIPS; n++) for (int32_t n = 0; n < GPS_L5Q_CODE_LENGTH_CHIPS; n++)
{ {
xb_shift[n] = xb[(xb_offset + n) % GPS_L5q_CODE_LENGTH_CHIPS]; xb_shift[n] = xb[(xb_offset + n) % GPS_L5Q_CODE_LENGTH_CHIPS];
} }
std::deque<bool> out_code(GPS_L5q_CODE_LENGTH_CHIPS, false); std::deque<bool> out_code(GPS_L5Q_CODE_LENGTH_CHIPS, false);
for (int32_t n = 0; n < GPS_L5q_CODE_LENGTH_CHIPS; n++) for (int32_t n = 0; n < GPS_L5Q_CODE_LENGTH_CHIPS; n++)
{ {
_dest[n] = xa[n] xor xb_shift[n]; _dest[n] = xa[n] xor xb_shift[n];
} }
@ -176,14 +176,14 @@ void make_l5q(int32_t* _dest, int32_t prn)
void gps_l5i_code_gen_complex(std::complex<float>* _dest, uint32_t _prn) void gps_l5i_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
{ {
auto* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS]; auto* _code = new int32_t[GPS_L5I_CODE_LENGTH_CHIPS];
if (_prn > 0 and _prn < 51) if (_prn > 0 and _prn < 51)
{ {
make_l5i(_code, _prn - 1); make_l5i(_code, _prn - 1);
} }
for (int32_t i = 0; i < GPS_L5i_CODE_LENGTH_CHIPS; i++) for (int32_t i = 0; i < GPS_L5I_CODE_LENGTH_CHIPS; i++)
{ {
_dest[i] = std::complex<float>(1.0 - 2.0 * _code[i], 0.0); _dest[i] = std::complex<float>(1.0 - 2.0 * _code[i], 0.0);
} }
@ -194,14 +194,14 @@ void gps_l5i_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
void gps_l5i_code_gen_float(float* _dest, uint32_t _prn) void gps_l5i_code_gen_float(float* _dest, uint32_t _prn)
{ {
auto* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS]; auto* _code = new int32_t[GPS_L5I_CODE_LENGTH_CHIPS];
if (_prn > 0 and _prn < 51) if (_prn > 0 and _prn < 51)
{ {
make_l5i(_code, _prn - 1); make_l5i(_code, _prn - 1);
} }
for (int32_t i = 0; i < GPS_L5i_CODE_LENGTH_CHIPS; i++) for (int32_t i = 0; i < GPS_L5I_CODE_LENGTH_CHIPS; i++)
{ {
_dest[i] = 1.0 - 2.0 * static_cast<float>(_code[i]); _dest[i] = 1.0 - 2.0 * static_cast<float>(_code[i]);
} }
@ -215,7 +215,7 @@ void gps_l5i_code_gen_float(float* _dest, uint32_t _prn)
*/ */
void gps_l5i_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn, int32_t _fs) void gps_l5i_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn, int32_t _fs)
{ {
auto* _code = new int32_t[GPS_L5i_CODE_LENGTH_CHIPS]; auto* _code = new int32_t[GPS_L5I_CODE_LENGTH_CHIPS];
if (_prn > 0 and _prn < 51) if (_prn > 0 and _prn < 51)
{ {
make_l5i(_code, _prn - 1); make_l5i(_code, _prn - 1);
@ -224,14 +224,14 @@ void gps_l5i_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn,
int32_t _samplesPerCode, _codeValueIndex; int32_t _samplesPerCode, _codeValueIndex;
float _ts; float _ts;
float _tc; float _tc;
const int32_t _codeLength = GPS_L5i_CODE_LENGTH_CHIPS; const int32_t _codeLength = GPS_L5I_CODE_LENGTH_CHIPS;
//--- Find number of samples per spreading code ---------------------------- //--- Find number of samples per spreading code ----------------------------
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5i_CODE_RATE_HZ) / static_cast<double>(_codeLength))); _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
//--- Find time constants -------------------------------------------------- //--- Find time constants --------------------------------------------------
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec _ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
_tc = 1.0 / static_cast<float>(GPS_L5i_CODE_RATE_HZ); // C/A chip period in sec _tc = 1.0 / static_cast<float>(GPS_L5I_CODE_RATE_HZ); // C/A chip period in sec
//float aux; //float aux;
for (int32_t i = 0; i < _samplesPerCode; i++) for (int32_t i = 0; i < _samplesPerCode; i++)
@ -261,14 +261,14 @@ void gps_l5i_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn,
void gps_l5q_code_gen_complex(std::complex<float>* _dest, uint32_t _prn) void gps_l5q_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
{ {
auto* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS]; auto* _code = new int32_t[GPS_L5Q_CODE_LENGTH_CHIPS];
if (_prn > 0 and _prn < 51) if (_prn > 0 and _prn < 51)
{ {
make_l5q(_code, _prn - 1); make_l5q(_code, _prn - 1);
} }
for (int32_t i = 0; i < GPS_L5q_CODE_LENGTH_CHIPS; i++) for (int32_t i = 0; i < GPS_L5Q_CODE_LENGTH_CHIPS; i++)
{ {
_dest[i] = std::complex<float>(1.0 - 2.0 * _code[i], 0.0); _dest[i] = std::complex<float>(1.0 - 2.0 * _code[i], 0.0);
} }
@ -279,14 +279,14 @@ void gps_l5q_code_gen_complex(std::complex<float>* _dest, uint32_t _prn)
void gps_l5q_code_gen_float(float* _dest, uint32_t _prn) void gps_l5q_code_gen_float(float* _dest, uint32_t _prn)
{ {
auto* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS]; auto* _code = new int32_t[GPS_L5Q_CODE_LENGTH_CHIPS];
if (_prn > 0 and _prn < 51) if (_prn > 0 and _prn < 51)
{ {
make_l5q(_code, _prn - 1); make_l5q(_code, _prn - 1);
} }
for (int32_t i = 0; i < GPS_L5q_CODE_LENGTH_CHIPS; i++) for (int32_t i = 0; i < GPS_L5Q_CODE_LENGTH_CHIPS; i++)
{ {
_dest[i] = 1.0 - 2.0 * static_cast<float>(_code[i]); _dest[i] = 1.0 - 2.0 * static_cast<float>(_code[i]);
} }
@ -300,7 +300,7 @@ void gps_l5q_code_gen_float(float* _dest, uint32_t _prn)
*/ */
void gps_l5q_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn, int32_t _fs) void gps_l5q_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn, int32_t _fs)
{ {
auto* _code = new int32_t[GPS_L5q_CODE_LENGTH_CHIPS]; auto* _code = new int32_t[GPS_L5Q_CODE_LENGTH_CHIPS];
if (_prn > 0 and _prn < 51) if (_prn > 0 and _prn < 51)
{ {
make_l5q(_code, _prn - 1); make_l5q(_code, _prn - 1);
@ -309,14 +309,14 @@ void gps_l5q_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn,
int32_t _samplesPerCode, _codeValueIndex; int32_t _samplesPerCode, _codeValueIndex;
float _ts; float _ts;
float _tc; float _tc;
const int32_t _codeLength = GPS_L5q_CODE_LENGTH_CHIPS; const int32_t _codeLength = GPS_L5Q_CODE_LENGTH_CHIPS;
//--- Find number of samples per spreading code ---------------------------- //--- Find number of samples per spreading code ----------------------------
_samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5q_CODE_RATE_HZ) / static_cast<double>(_codeLength))); _samplesPerCode = static_cast<int32_t>(static_cast<double>(_fs) / (static_cast<double>(GPS_L5Q_CODE_RATE_HZ) / static_cast<double>(_codeLength)));
//--- Find time constants -------------------------------------------------- //--- Find time constants --------------------------------------------------
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec _ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
_tc = 1.0 / static_cast<float>(GPS_L5q_CODE_RATE_HZ); // C/A chip period in sec _tc = 1.0 / static_cast<float>(GPS_L5Q_CODE_RATE_HZ); // C/A chip period in sec
//float aux; //float aux;
for (int32_t i = 0; i < _samplesPerCode; i++) for (int32_t i = 0; i < _samplesPerCode; i++)

View File

@ -50,7 +50,7 @@ Rtcm::Rtcm(uint16_t port)
RTCM_port = port; RTCM_port = port;
preamble = std::bitset<8>("11010011"); preamble = std::bitset<8>("11010011");
reserved_field = std::bitset<6>("000000"); reserved_field = std::bitset<6>("000000");
rtcm_message_queue = std::make_shared<concurrent_queue<std::string> >(); rtcm_message_queue = std::make_shared<Concurrent_Queue<std::string> >();
boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), RTCM_port); boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), RTCM_port);
servers.emplace_back(io_context, endpoint); servers.emplace_back(io_context, endpoint);
server_is_running = false; server_is_running = false;
@ -2197,64 +2197,64 @@ int32_t Rtcm::read_MT1045(const std::string& message, Galileo_Ephemeris& gal_eph
gal_eph.SISA_3 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 8))); gal_eph.SISA_3 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 8)));
index += 8; index += 8;
gal_eph.iDot_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 14))) * iDot_2_LSB; gal_eph.iDot_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 14))) * I_DOT_2_LSB;
index += 14; index += 14;
gal_eph.t0c_4 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 14))) * t0c_4_LSB; gal_eph.t0c_4 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 14))) * T0C_4_LSB;
index += 14; index += 14;
gal_eph.af2_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 6))) * af2_4_LSB; gal_eph.af2_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 6))) * AF2_4_LSB;
index += 6; index += 6;
gal_eph.af1_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 21))) * af1_4_LSB; gal_eph.af1_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 21))) * AF1_4_LSB;
index += 21; index += 21;
gal_eph.af0_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 31))) * af0_4_LSB; gal_eph.af0_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 31))) * AF0_4_LSB;
index += 31; index += 31;
gal_eph.C_rs_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_rs_3_LSB; gal_eph.C_rs_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RS_3_LSB;
index += 16; index += 16;
gal_eph.delta_n_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * delta_n_3_LSB; gal_eph.delta_n_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * DELTA_N_3_LSB;
index += 16; index += 16;
gal_eph.M0_1 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * M0_1_LSB; gal_eph.M0_1 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * M0_1_LSB;
index += 32; index += 32;
gal_eph.C_uc_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_uc_3_LSB; gal_eph.C_uc_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_UC_3_LSB;
index += 16; index += 16;
gal_eph.e_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * e_1_LSB; gal_eph.e_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * E_1_LSB;
index += 32; index += 32;
gal_eph.C_us_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_us_3_LSB; gal_eph.C_us_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_US_3_LSB;
index += 16; index += 16;
gal_eph.A_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * A_1_LSB_gal; gal_eph.A_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 32))) * A_1_LSB_GAL;
index += 32; index += 32;
gal_eph.t0e_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 14))) * t0e_1_LSB; gal_eph.t0e_1 = static_cast<double>(Rtcm::bin_to_uint(message_bin.substr(index, 14))) * T0E_1_LSB;
index += 14; index += 14;
gal_eph.C_ic_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_ic_4_LSB; gal_eph.C_ic_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IC_4_LSB;
index += 16; index += 16;
gal_eph.OMEGA_0_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_0_2_LSB; gal_eph.OMEGA_0_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_0_2_LSB;
index += 32; index += 32;
gal_eph.C_is_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_is_4_LSB; gal_eph.C_is_4 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_IS_4_LSB;
index += 16; index += 16;
gal_eph.i_0_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * i_0_2_LSB; gal_eph.i_0_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * I_0_2_LSB;
index += 32; index += 32;
gal_eph.C_rc_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_rc_3_LSB; gal_eph.C_rc_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 16))) * C_RC_3_LSB;
index += 16; index += 16;
gal_eph.omega_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * omega_2_LSB; gal_eph.omega_2 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 32))) * OMEGA_2_LSB;
index += 32; index += 32;
gal_eph.OMEGA_dot_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 24))) * OMEGA_dot_3_LSB; gal_eph.OMEGA_dot_3 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 24))) * OMEGA_DOT_3_LSB;
index += 24; index += 24;
gal_eph.BGD_E1E5a_5 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 10))); gal_eph.BGD_E1E5a_5 = static_cast<double>(Rtcm::bin_to_int(message_bin.substr(index, 10)));
@ -3811,7 +3811,7 @@ int32_t Rtcm::set_DF011(const Gnss_Synchro& gnss_synchro)
int32_t Rtcm::set_DF012(const Gnss_Synchro& gnss_synchro) int32_t Rtcm::set_DF012(const Gnss_Synchro& gnss_synchro)
{ {
const double lambda = GPS_C_m_s / GPS_L1_FREQ_HZ; const double lambda = GPS_C_M_S / GPS_L1_FREQ_HZ;
double ambiguity = std::floor(gnss_synchro.Pseudorange_m / 299792.458); double ambiguity = std::floor(gnss_synchro.Pseudorange_m / 299792.458);
double gps_L1_pseudorange = std::round((gnss_synchro.Pseudorange_m - ambiguity * 299792.458) / 0.02); double gps_L1_pseudorange = std::round((gnss_synchro.Pseudorange_m - ambiguity * 299792.458) / 0.02);
double gps_L1_pseudorange_c = gps_L1_pseudorange * 0.02 + ambiguity * 299792.458; double gps_L1_pseudorange_c = gps_L1_pseudorange * 0.02 + ambiguity * 299792.458;
@ -3873,7 +3873,7 @@ int32_t Rtcm::set_DF017(const Gnss_Synchro& gnss_synchroL1, const Gnss_Synchro&
int32_t Rtcm::set_DF018(const Gnss_Synchro& gnss_synchroL1, const Gnss_Synchro& gnss_synchroL2) int32_t Rtcm::set_DF018(const Gnss_Synchro& gnss_synchroL1, const Gnss_Synchro& gnss_synchroL2)
{ {
const double lambda2 = GPS_C_m_s / GPS_L2_FREQ_HZ; const double lambda2 = GPS_C_M_S / GPS_L2_FREQ_HZ;
int32_t l2_phaserange_minus_l1_pseudorange = 0xFFF80000; int32_t l2_phaserange_minus_l1_pseudorange = 0xFFF80000;
double ambiguity = std::floor(gnss_synchroL1.Pseudorange_m / 299792.458); double ambiguity = std::floor(gnss_synchroL1.Pseudorange_m / 299792.458);
double gps_L1_pseudorange = std::round((gnss_synchroL1.Pseudorange_m - ambiguity * 299792.458) / 0.02); double gps_L1_pseudorange = std::round((gnss_synchroL1.Pseudorange_m - ambiguity * 299792.458) / 0.02);
@ -4103,7 +4103,7 @@ int32_t Rtcm::set_DF041(const Gnss_Synchro& gnss_synchro)
int32_t Rtcm::set_DF042(const Gnss_Synchro& gnss_synchro) int32_t Rtcm::set_DF042(const Gnss_Synchro& gnss_synchro)
{ {
const double lambda = GLONASS_C_m_s / (GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN))); const double lambda = GLONASS_C_M_S / (GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN)));
double ambiguity = std::floor(gnss_synchro.Pseudorange_m / 599584.92); double ambiguity = std::floor(gnss_synchro.Pseudorange_m / 599584.92);
double glonass_L1_pseudorange = std::round((gnss_synchro.Pseudorange_m - ambiguity * 599584.92) / 0.02); double glonass_L1_pseudorange = std::round((gnss_synchro.Pseudorange_m - ambiguity * 599584.92) / 0.02);
double glonass_L1_pseudorange_c = glonass_L1_pseudorange * 0.02 + ambiguity * 299792.458; double glonass_L1_pseudorange_c = glonass_L1_pseudorange * 0.02 + ambiguity * 299792.458;
@ -4166,7 +4166,7 @@ int32_t Rtcm::set_DF047(const Gnss_Synchro& gnss_synchroL1, const Gnss_Synchro&
//TODO Need to consider frequency channel in this fields //TODO Need to consider frequency channel in this fields
int32_t Rtcm::set_DF048(const Gnss_Synchro& gnss_synchroL1, const Gnss_Synchro& gnss_synchroL2) int32_t Rtcm::set_DF048(const Gnss_Synchro& gnss_synchroL1, const Gnss_Synchro& gnss_synchroL2)
{ {
const double lambda2 = GLONASS_C_m_s / GLONASS_L2_CA_FREQ_HZ; const double lambda2 = GLONASS_C_M_S / GLONASS_L2_CA_FREQ_HZ;
int32_t l2_phaserange_minus_l1_pseudorange = 0xFFF80000; int32_t l2_phaserange_minus_l1_pseudorange = 0xFFF80000;
double ambiguity = std::floor(gnss_synchroL1.Pseudorange_m / 599584.92); double ambiguity = std::floor(gnss_synchroL1.Pseudorange_m / 599584.92);
double glonass_L1_pseudorange = std::round((gnss_synchroL1.Pseudorange_m - ambiguity * 599584.92) / 0.02); double glonass_L1_pseudorange = std::round((gnss_synchroL1.Pseudorange_m - ambiguity * 599584.92) / 0.02);
@ -4846,7 +4846,7 @@ int32_t Rtcm::set_DF291(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF292(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF292(const Galileo_Ephemeris& gal_eph)
{ {
auto idot = static_cast<int32_t>(std::round(gal_eph.iDot_2 / FNAV_idot_2_LSB)); auto idot = static_cast<int32_t>(std::round(gal_eph.iDot_2 / FNAV_IDOT_2_LSB));
DF292 = std::bitset<14>(idot); DF292 = std::bitset<14>(idot);
return 0; return 0;
} }
@ -4866,7 +4866,7 @@ int32_t Rtcm::set_DF293(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF294(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF294(const Galileo_Ephemeris& gal_eph)
{ {
auto af2 = static_cast<int16_t>(std::round(gal_eph.af2_4 / FNAV_af2_1_LSB)); auto af2 = static_cast<int16_t>(std::round(gal_eph.af2_4 / FNAV_AF2_1_LSB));
DF294 = std::bitset<6>(af2); DF294 = std::bitset<6>(af2);
return 0; return 0;
} }
@ -4874,7 +4874,7 @@ int32_t Rtcm::set_DF294(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF295(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF295(const Galileo_Ephemeris& gal_eph)
{ {
auto af1 = static_cast<int64_t>(std::round(gal_eph.af1_4 / FNAV_af1_1_LSB)); auto af1 = static_cast<int64_t>(std::round(gal_eph.af1_4 / FNAV_AF1_1_LSB));
DF295 = std::bitset<21>(af1); DF295 = std::bitset<21>(af1);
return 0; return 0;
} }
@ -4882,7 +4882,7 @@ int32_t Rtcm::set_DF295(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF296(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF296(const Galileo_Ephemeris& gal_eph)
{ {
int64_t af0 = static_cast<uint32_t>(std::round(gal_eph.af0_4 / FNAV_af0_1_LSB)); int64_t af0 = static_cast<uint32_t>(std::round(gal_eph.af0_4 / FNAV_AF0_1_LSB));
DF296 = std::bitset<31>(af0); DF296 = std::bitset<31>(af0);
return 0; return 0;
} }
@ -4890,7 +4890,7 @@ int32_t Rtcm::set_DF296(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF297(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF297(const Galileo_Ephemeris& gal_eph)
{ {
auto crs = static_cast<int32_t>(std::round(gal_eph.C_rs_3 / FNAV_Crs_3_LSB)); auto crs = static_cast<int32_t>(std::round(gal_eph.C_rs_3 / FNAV_CRS_3_LSB));
DF297 = std::bitset<16>(crs); DF297 = std::bitset<16>(crs);
return 0; return 0;
} }
@ -4898,7 +4898,7 @@ int32_t Rtcm::set_DF297(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF298(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF298(const Galileo_Ephemeris& gal_eph)
{ {
auto delta_n = static_cast<int32_t>(std::round(gal_eph.delta_n_3 / FNAV_deltan_3_LSB)); auto delta_n = static_cast<int32_t>(std::round(gal_eph.delta_n_3 / FNAV_DELTAN_3_LSB));
DF298 = std::bitset<16>(delta_n); DF298 = std::bitset<16>(delta_n);
return 0; return 0;
} }
@ -4914,7 +4914,7 @@ int32_t Rtcm::set_DF299(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF300(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF300(const Galileo_Ephemeris& gal_eph)
{ {
int32_t cuc = static_cast<uint32_t>(std::round(gal_eph.C_uc_3 / FNAV_Cuc_3_LSB)); int32_t cuc = static_cast<uint32_t>(std::round(gal_eph.C_uc_3 / FNAV_CUC_3_LSB));
DF300 = std::bitset<16>(cuc); DF300 = std::bitset<16>(cuc);
return 0; return 0;
} }
@ -4922,7 +4922,7 @@ int32_t Rtcm::set_DF300(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF301(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF301(const Galileo_Ephemeris& gal_eph)
{ {
auto ecc = static_cast<uint64_t>(std::round(gal_eph.e_1 / FNAV_e_2_LSB)); auto ecc = static_cast<uint64_t>(std::round(gal_eph.e_1 / FNAV_E_2_LSB));
DF301 = std::bitset<32>(ecc); DF301 = std::bitset<32>(ecc);
return 0; return 0;
} }
@ -4930,7 +4930,7 @@ int32_t Rtcm::set_DF301(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF302(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF302(const Galileo_Ephemeris& gal_eph)
{ {
auto cus = static_cast<int32_t>(std::round(gal_eph.C_us_3 / FNAV_Cus_3_LSB)); auto cus = static_cast<int32_t>(std::round(gal_eph.C_us_3 / FNAV_CUS_3_LSB));
DF302 = std::bitset<16>(cus); DF302 = std::bitset<16>(cus);
return 0; return 0;
} }
@ -4938,7 +4938,7 @@ int32_t Rtcm::set_DF302(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF303(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF303(const Galileo_Ephemeris& gal_eph)
{ {
auto sqr_a = static_cast<uint64_t>(std::round(gal_eph.A_1 / FNAV_a12_2_LSB)); auto sqr_a = static_cast<uint64_t>(std::round(gal_eph.A_1 / FNAV_A12_2_LSB));
DF303 = std::bitset<32>(sqr_a); DF303 = std::bitset<32>(sqr_a);
return 0; return 0;
} }
@ -4946,7 +4946,7 @@ int32_t Rtcm::set_DF303(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF304(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF304(const Galileo_Ephemeris& gal_eph)
{ {
auto toe = static_cast<uint32_t>(std::round(gal_eph.t0e_1 / FNAV_t0e_3_LSB)); auto toe = static_cast<uint32_t>(std::round(gal_eph.t0e_1 / FNAV_T0E_3_LSB));
DF304 = std::bitset<14>(toe); DF304 = std::bitset<14>(toe);
return 0; return 0;
} }
@ -4954,7 +4954,7 @@ int32_t Rtcm::set_DF304(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF305(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF305(const Galileo_Ephemeris& gal_eph)
{ {
auto cic = static_cast<int32_t>(std::round(gal_eph.C_ic_4 / FNAV_Cic_4_LSB)); auto cic = static_cast<int32_t>(std::round(gal_eph.C_ic_4 / FNAV_CIC_4_LSB));
DF305 = std::bitset<16>(cic); DF305 = std::bitset<16>(cic);
return 0; return 0;
} }
@ -4962,7 +4962,7 @@ int32_t Rtcm::set_DF305(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF306(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF306(const Galileo_Ephemeris& gal_eph)
{ {
auto Omega0 = static_cast<int64_t>(std::round(gal_eph.OMEGA_0_2 / FNAV_omega0_2_LSB)); auto Omega0 = static_cast<int64_t>(std::round(gal_eph.OMEGA_0_2 / FNAV_OMEGA0_2_LSB));
DF306 = std::bitset<32>(Omega0); DF306 = std::bitset<32>(Omega0);
return 0; return 0;
} }
@ -4970,7 +4970,7 @@ int32_t Rtcm::set_DF306(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF307(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF307(const Galileo_Ephemeris& gal_eph)
{ {
auto cis = static_cast<int32_t>(std::round(gal_eph.C_is_4 / FNAV_Cis_4_LSB)); auto cis = static_cast<int32_t>(std::round(gal_eph.C_is_4 / FNAV_CIS_4_LSB));
DF307 = std::bitset<16>(cis); DF307 = std::bitset<16>(cis);
return 0; return 0;
} }
@ -4978,7 +4978,7 @@ int32_t Rtcm::set_DF307(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF308(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF308(const Galileo_Ephemeris& gal_eph)
{ {
auto i0 = static_cast<int64_t>(std::round(gal_eph.i_0_2 / FNAV_i0_3_LSB)); auto i0 = static_cast<int64_t>(std::round(gal_eph.i_0_2 / FNAV_I0_3_LSB));
DF308 = std::bitset<32>(i0); DF308 = std::bitset<32>(i0);
return 0; return 0;
} }
@ -4986,7 +4986,7 @@ int32_t Rtcm::set_DF308(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF309(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF309(const Galileo_Ephemeris& gal_eph)
{ {
int32_t crc = static_cast<uint32_t>(std::round(gal_eph.C_rc_3 / FNAV_Crc_3_LSB)); int32_t crc = static_cast<uint32_t>(std::round(gal_eph.C_rc_3 / FNAV_CRC_3_LSB));
DF309 = std::bitset<16>(crc); DF309 = std::bitset<16>(crc);
return 0; return 0;
} }
@ -4994,7 +4994,7 @@ int32_t Rtcm::set_DF309(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF310(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF310(const Galileo_Ephemeris& gal_eph)
{ {
auto omega = static_cast<int32_t>(std::round(gal_eph.omega_2 / FNAV_omega0_2_LSB)); auto omega = static_cast<int32_t>(std::round(gal_eph.omega_2 / FNAV_OMEGA0_2_LSB));
DF310 = std::bitset<32>(omega); DF310 = std::bitset<32>(omega);
return 0; return 0;
} }
@ -5002,7 +5002,7 @@ int32_t Rtcm::set_DF310(const Galileo_Ephemeris& gal_eph)
int32_t Rtcm::set_DF311(const Galileo_Ephemeris& gal_eph) int32_t Rtcm::set_DF311(const Galileo_Ephemeris& gal_eph)
{ {
auto Omegadot = static_cast<int64_t>(std::round(gal_eph.OMEGA_dot_3 / FNAV_omegadot_2_LSB)); auto Omegadot = static_cast<int64_t>(std::round(gal_eph.OMEGA_dot_3 / FNAV_OMEGADOT_2_LSB));
DF311 = std::bitset<24>(Omegadot); DF311 = std::bitset<24>(Omegadot);
return 0; return 0;
} }
@ -5269,7 +5269,7 @@ std::string Rtcm::set_DF396(const std::map<int32_t, Gnss_Synchro>& observables)
int32_t Rtcm::set_DF397(const Gnss_Synchro& gnss_synchro) int32_t Rtcm::set_DF397(const Gnss_Synchro& gnss_synchro)
{ {
double meters_to_miliseconds = GPS_C_m_s * 0.001; double meters_to_miliseconds = GPS_C_M_S * 0.001;
double rough_range_s = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10; double rough_range_s = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10;
uint32_t int_ms = 0; uint32_t int_ms = 0;
@ -5294,7 +5294,7 @@ int32_t Rtcm::set_DF397(const Gnss_Synchro& gnss_synchro)
int32_t Rtcm::set_DF398(const Gnss_Synchro& gnss_synchro) int32_t Rtcm::set_DF398(const Gnss_Synchro& gnss_synchro)
{ {
double meters_to_miliseconds = GPS_C_m_s * 0.001; double meters_to_miliseconds = GPS_C_M_S * 0.001;
double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10; double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10;
uint32_t rr_mod_ms; uint32_t rr_mod_ms;
if ((rough_range_m <= 0.0) || (rough_range_m > meters_to_miliseconds * 255.0)) if ((rough_range_m <= 0.0) || (rough_range_m > meters_to_miliseconds * 255.0))
@ -5318,23 +5318,23 @@ int32_t Rtcm::set_DF399(const Gnss_Synchro& gnss_synchro)
if (sig == "1C") if (sig == "1C")
{ {
lambda = GPS_C_m_s / GPS_L1_FREQ_HZ; lambda = GPS_C_M_S / GPS_L1_FREQ_HZ;
} }
if (sig == "2S") if (sig == "2S")
{ {
lambda = GPS_C_m_s / GPS_L2_FREQ_HZ; lambda = GPS_C_M_S / GPS_L2_FREQ_HZ;
} }
if (sig == "5X") if (sig == "5X")
{ {
lambda = GPS_C_m_s / Galileo_E5a_FREQ_HZ; lambda = GPS_C_M_S / GALILEO_E5A_FREQ_HZ;
} }
if (sig == "1B") if (sig == "1B")
{ {
lambda = GPS_C_m_s / Galileo_E1_FREQ_HZ; lambda = GPS_C_M_S / GALILEO_E1_FREQ_HZ;
} }
if (sig == "7X") if (sig == "7X")
{ {
lambda = GPS_C_m_s / 1.207140e9; // Galileo_E1b_FREQ_HZ; lambda = GPS_C_M_S / 1.207140e9; // Galileo_E1b_FREQ_HZ;
} }
double rough_phase_range_rate_ms = std::round(-gnss_synchro.Carrier_Doppler_hz * lambda); double rough_phase_range_rate_ms = std::round(-gnss_synchro.Carrier_Doppler_hz * lambda);
@ -5354,7 +5354,7 @@ int32_t Rtcm::set_DF399(const Gnss_Synchro& gnss_synchro)
int32_t Rtcm::set_DF400(const Gnss_Synchro& gnss_synchro) int32_t Rtcm::set_DF400(const Gnss_Synchro& gnss_synchro)
{ {
double meters_to_miliseconds = GPS_C_m_s * 0.001; double meters_to_miliseconds = GPS_C_M_S * 0.001;
double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10; double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10;
double psrng_s; double psrng_s;
int32_t fine_pseudorange; int32_t fine_pseudorange;
@ -5381,7 +5381,7 @@ int32_t Rtcm::set_DF400(const Gnss_Synchro& gnss_synchro)
int32_t Rtcm::set_DF401(const Gnss_Synchro& gnss_synchro) int32_t Rtcm::set_DF401(const Gnss_Synchro& gnss_synchro)
{ {
double meters_to_miliseconds = GPS_C_m_s * 0.001; double meters_to_miliseconds = GPS_C_M_S * 0.001;
double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10; double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10;
double phrng_m; double phrng_m;
int64_t fine_phaserange; int64_t fine_phaserange;
@ -5393,32 +5393,32 @@ int32_t Rtcm::set_DF401(const Gnss_Synchro& gnss_synchro)
if ((sig == "1C") && (sys == "G")) if ((sig == "1C") && (sys == "G"))
{ {
lambda = GPS_C_m_s / GPS_L1_FREQ_HZ; lambda = GPS_C_M_S / GPS_L1_FREQ_HZ;
} }
if ((sig == "2S") && (sys == "G")) if ((sig == "2S") && (sys == "G"))
{ {
lambda = GPS_C_m_s / GPS_L2_FREQ_HZ; lambda = GPS_C_M_S / GPS_L2_FREQ_HZ;
} }
if ((sig == "5X") && (sys == "E")) if ((sig == "5X") && (sys == "E"))
{ {
lambda = GPS_C_m_s / Galileo_E5a_FREQ_HZ; lambda = GPS_C_M_S / GALILEO_E5A_FREQ_HZ;
} }
if ((sig == "1B") && (sys == "E")) if ((sig == "1B") && (sys == "E"))
{ {
lambda = GPS_C_m_s / Galileo_E1_FREQ_HZ; lambda = GPS_C_M_S / GALILEO_E1_FREQ_HZ;
} }
if ((sig == "7X") && (sys == "E")) if ((sig == "7X") && (sys == "E"))
{ {
lambda = GPS_C_m_s / 1.207140e9; // Galileo_E1b_FREQ_HZ; lambda = GPS_C_M_S / 1.207140e9; // Galileo_E1b_FREQ_HZ;
} }
if ((sig == "1C") && (sys == "R")) if ((sig == "1C") && (sys == "R"))
{ {
lambda = GLONASS_C_m_s / ((GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN)))); lambda = GLONASS_C_M_S / ((GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN))));
} }
if ((sig == "2C") && (sys == "R")) if ((sig == "2C") && (sys == "R"))
{ {
// TODO Need to add slot number and freq number to gnss_syncro // TODO Need to add slot number and freq number to gnss_syncro
lambda = GLONASS_C_m_s / (GLONASS_L2_CA_FREQ_HZ); lambda = GLONASS_C_M_S / (GLONASS_L2_CA_FREQ_HZ);
} }
phrng_m = (gnss_synchro.Carrier_phase_rads / GPS_TWO_PI) * lambda - rough_range_m; phrng_m = (gnss_synchro.Carrier_phase_rads / GPS_TWO_PI) * lambda - rough_range_m;
@ -5502,32 +5502,32 @@ int32_t Rtcm::set_DF404(const Gnss_Synchro& gnss_synchro)
if ((sig_ == "1C") && (sys_ == "G")) if ((sig_ == "1C") && (sys_ == "G"))
{ {
lambda = GPS_C_m_s / GPS_L1_FREQ_HZ; lambda = GPS_C_M_S / GPS_L1_FREQ_HZ;
} }
if ((sig_ == "2S") && (sys_ == "G")) if ((sig_ == "2S") && (sys_ == "G"))
{ {
lambda = GPS_C_m_s / GPS_L2_FREQ_HZ; lambda = GPS_C_M_S / GPS_L2_FREQ_HZ;
} }
if ((sig_ == "5X") && (sys_ == "E")) if ((sig_ == "5X") && (sys_ == "E"))
{ {
lambda = GPS_C_m_s / Galileo_E5a_FREQ_HZ; lambda = GPS_C_M_S / GALILEO_E5A_FREQ_HZ;
} }
if ((sig_ == "1B") && (sys_ == "E")) if ((sig_ == "1B") && (sys_ == "E"))
{ {
lambda = GPS_C_m_s / Galileo_E1_FREQ_HZ; lambda = GPS_C_M_S / GALILEO_E1_FREQ_HZ;
} }
if ((sig_ == "7X") && (sys_ == "E")) if ((sig_ == "7X") && (sys_ == "E"))
{ {
lambda = GPS_C_m_s / 1.207140e9; // Galileo_E1b_FREQ_HZ; lambda = GPS_C_M_S / 1.207140e9; // Galileo_E1b_FREQ_HZ;
} }
if ((sig_ == "1C") && (sys_ == "R")) if ((sig_ == "1C") && (sys_ == "R"))
{ {
lambda = GLONASS_C_m_s / (GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN))); lambda = GLONASS_C_M_S / (GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN)));
} }
if ((sig_ == "2C") && (sys_ == "R")) if ((sig_ == "2C") && (sys_ == "R"))
{ {
//TODO Need to add slot number and freq number to gnss syncro //TODO Need to add slot number and freq number to gnss syncro
lambda = GLONASS_C_m_s / (GLONASS_L2_CA_FREQ_HZ); lambda = GLONASS_C_M_S / (GLONASS_L2_CA_FREQ_HZ);
} }
double rough_phase_range_rate = std::round(-gnss_synchro.Carrier_Doppler_hz * lambda); double rough_phase_range_rate = std::round(-gnss_synchro.Carrier_Doppler_hz * lambda);
double phrr = (-gnss_synchro.Carrier_Doppler_hz * lambda - rough_phase_range_rate); double phrr = (-gnss_synchro.Carrier_Doppler_hz * lambda - rough_phase_range_rate);
@ -5552,7 +5552,7 @@ int32_t Rtcm::set_DF404(const Gnss_Synchro& gnss_synchro)
int32_t Rtcm::set_DF405(const Gnss_Synchro& gnss_synchro) int32_t Rtcm::set_DF405(const Gnss_Synchro& gnss_synchro)
{ {
double meters_to_miliseconds = GPS_C_m_s * 0.001; double meters_to_miliseconds = GPS_C_M_S * 0.001;
double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10; double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10;
double psrng_s; double psrng_s;
int64_t fine_pseudorange; int64_t fine_pseudorange;
@ -5579,7 +5579,7 @@ int32_t Rtcm::set_DF405(const Gnss_Synchro& gnss_synchro)
int32_t Rtcm::set_DF406(const Gnss_Synchro& gnss_synchro) int32_t Rtcm::set_DF406(const Gnss_Synchro& gnss_synchro)
{ {
int64_t fine_phaserange_ex; int64_t fine_phaserange_ex;
double meters_to_miliseconds = GPS_C_m_s * 0.001; double meters_to_miliseconds = GPS_C_M_S * 0.001;
double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10; double rough_range_m = std::round(gnss_synchro.Pseudorange_m / meters_to_miliseconds / TWO_N10) * meters_to_miliseconds * TWO_N10;
double phrng_m; double phrng_m;
double lambda = 0.0; double lambda = 0.0;
@ -5589,32 +5589,32 @@ int32_t Rtcm::set_DF406(const Gnss_Synchro& gnss_synchro)
if ((sig_ == "1C") && (sys_ == "G")) if ((sig_ == "1C") && (sys_ == "G"))
{ {
lambda = GPS_C_m_s / GPS_L1_FREQ_HZ; lambda = GPS_C_M_S / GPS_L1_FREQ_HZ;
} }
if ((sig_ == "2S") && (sys_ == "G")) if ((sig_ == "2S") && (sys_ == "G"))
{ {
lambda = GPS_C_m_s / GPS_L2_FREQ_HZ; lambda = GPS_C_M_S / GPS_L2_FREQ_HZ;
} }
if ((sig_ == "5X") && (sys_ == "E")) if ((sig_ == "5X") && (sys_ == "E"))
{ {
lambda = GPS_C_m_s / Galileo_E5a_FREQ_HZ; lambda = GPS_C_M_S / GALILEO_E5A_FREQ_HZ;
} }
if ((sig_ == "1B") && (sys_ == "E")) if ((sig_ == "1B") && (sys_ == "E"))
{ {
lambda = GPS_C_m_s / Galileo_E1_FREQ_HZ; lambda = GPS_C_M_S / GALILEO_E1_FREQ_HZ;
} }
if ((sig_ == "7X") && (sys_ == "E")) if ((sig_ == "7X") && (sys_ == "E"))
{ {
lambda = GPS_C_m_s / 1.207140e9; // Galileo_E1b_FREQ_HZ; lambda = GPS_C_M_S / 1.207140e9; // Galileo_E1b_FREQ_HZ;
} }
if ((sig_ == "1C") && (sys_ == "R")) if ((sig_ == "1C") && (sys_ == "R"))
{ {
lambda = GLONASS_C_m_s / (GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN))); lambda = GLONASS_C_M_S / (GLONASS_L1_CA_FREQ_HZ + (GLONASS_L1_CA_DFREQ_HZ * GLONASS_PRN.at(gnss_synchro.PRN)));
} }
if ((sig_ == "2C") && (sys_ == "R")) if ((sig_ == "2C") && (sys_ == "R"))
{ {
//TODO Need to add slot number and freq number to gnss syncro //TODO Need to add slot number and freq number to gnss syncro
lambda = GLONASS_C_m_s / (GLONASS_L2_CA_FREQ_HZ); lambda = GLONASS_C_M_S / (GLONASS_L2_CA_FREQ_HZ);
} }
phrng_m = (gnss_synchro.Carrier_phase_rads / GPS_TWO_PI) * lambda - rough_range_m; phrng_m = (gnss_synchro.Carrier_phase_rads / GPS_TWO_PI) * lambda - rough_range_m;

View File

@ -596,10 +596,10 @@ private:
}; };
class Rtcm_Listener class RtcmListener
{ {
public: public:
virtual ~Rtcm_Listener() = default; virtual ~RtcmListener() = default;
virtual void deliver(const Rtcm_Message& msg) = 0; virtual void deliver(const Rtcm_Message& msg) = 0;
}; };
@ -607,7 +607,7 @@ private:
class Rtcm_Listener_Room class Rtcm_Listener_Room
{ {
public: public:
inline void join(const std::shared_ptr<Rtcm_Listener>& participant) inline void join(const std::shared_ptr<RtcmListener>& participant)
{ {
participants_.insert(participant); participants_.insert(participant);
for (auto msg : recent_msgs_) for (auto msg : recent_msgs_)
@ -616,7 +616,7 @@ private:
} }
} }
inline void leave(const std::shared_ptr<Rtcm_Listener>& participant) inline void leave(const std::shared_ptr<RtcmListener>& participant)
{ {
participants_.erase(participant); participants_.erase(participant);
} }
@ -636,7 +636,7 @@ private:
} }
private: private:
std::set<std::shared_ptr<Rtcm_Listener> > participants_; std::set<std::shared_ptr<RtcmListener> > participants_;
enum enum
{ {
max_recent_msgs = 1 max_recent_msgs = 1
@ -646,7 +646,7 @@ private:
class Rtcm_Session class Rtcm_Session
: public Rtcm_Listener, : public RtcmListener,
public std::enable_shared_from_this<Rtcm_Session> public std::enable_shared_from_this<Rtcm_Session>
{ {
public: public:
@ -846,7 +846,7 @@ private:
class Queue_Reader class Queue_Reader
{ {
public: public:
Queue_Reader(boost::asio::io_service& io_context, std::shared_ptr<concurrent_queue<std::string> >& queue, int32_t port) : queue_(queue) Queue_Reader(boost::asio::io_service& io_context, std::shared_ptr<Concurrent_Queue<std::string> >& queue, int32_t port) : queue_(queue)
{ {
boost::asio::ip::tcp::resolver resolver(io_context); boost::asio::ip::tcp::resolver resolver(io_context);
std::string host("localhost"); std::string host("localhost");
@ -877,7 +877,7 @@ private:
private: private:
std::shared_ptr<Tcp_Internal_Client> c; std::shared_ptr<Tcp_Internal_Client> c;
std::shared_ptr<concurrent_queue<std::string> >& queue_; std::shared_ptr<Concurrent_Queue<std::string> >& queue_;
}; };
@ -952,7 +952,7 @@ private:
}; };
boost::asio::io_service io_context; boost::asio::io_service io_context;
std::shared_ptr<concurrent_queue<std::string> > rtcm_message_queue; std::shared_ptr<Concurrent_Queue<std::string> > rtcm_message_queue;
std::thread t; std::thread t;
std::thread tq; std::thread tq;
std::list<Rtcm::Tcp_Server> servers; std::list<Rtcm::Tcp_Server> servers;

View File

@ -1308,7 +1308,7 @@ typedef struct
} msm_h_t; } msm_h_t;
const double chisqr[100] = {/* chi-sqr(n) (alpha=0.001) */ const double CHISQR[100] = {/* chi-sqr(n) (alpha=0.001) */
10.8, 13.8, 16.3, 18.5, 20.5, 22.5, 24.3, 26.1, 27.9, 29.6, 10.8, 13.8, 16.3, 18.5, 20.5, 22.5, 24.3, 26.1, 27.9, 29.6,
31.3, 32.9, 34.5, 36.1, 37.7, 39.3, 40.8, 42.3, 43.8, 45.3, 31.3, 32.9, 34.5, 36.1, 37.7, 39.3, 40.8, 42.3, 43.8, 45.3,
46.8, 48.3, 49.7, 51.2, 52.6, 54.1, 55.5, 56.9, 58.3, 59.7, 46.8, 48.3, 49.7, 51.2, 52.6, 54.1, 55.5, 56.9, 58.3, 59.7,
@ -1321,7 +1321,7 @@ const double chisqr[100] = {/* chi-sqr(n) (alpha=0.001) */
138, 139, 140, 142, 143, 144, 145, 147, 148, 149}; 138, 139, 140, 142, 143, 144, 145, 147, 148, 149};
const double lam_carr[MAXFREQ] = {/* carrier wave length (m) */ const double LAM_CARR[MAXFREQ] = {/* carrier wave length (m) */
SPEED_OF_LIGHT / FREQ1, SPEED_OF_LIGHT / FREQ2, SPEED_OF_LIGHT / FREQ5, SPEED_OF_LIGHT / FREQ6, SPEED_OF_LIGHT / FREQ7, SPEED_OF_LIGHT / FREQ1, SPEED_OF_LIGHT / FREQ2, SPEED_OF_LIGHT / FREQ5, SPEED_OF_LIGHT / FREQ6, SPEED_OF_LIGHT / FREQ7,
SPEED_OF_LIGHT / FREQ8, SPEED_OF_LIGHT / FREQ9}; SPEED_OF_LIGHT / FREQ8, SPEED_OF_LIGHT / FREQ9};

View File

@ -488,7 +488,7 @@ int rescode(int iter, const obsd_t *obs, int n, const double *rs,
/* GPS-L1 -> L1/B1 */ /* GPS-L1 -> L1/B1 */
if ((lam_L1 = nav->lam[obs[i].sat - 1][0]) > 0.0) if ((lam_L1 = nav->lam[obs[i].sat - 1][0]) > 0.0)
{ {
dion *= std::pow(lam_L1 / lam_carr[0], 2.0); dion *= std::pow(lam_L1 / LAM_CARR[0], 2.0);
} }
/* tropospheric corrections */ /* tropospheric corrections */
if (!tropcorr(obs[i].time, nav, pos, azel + i * 2, if (!tropcorr(obs[i].time, nav, pos, azel + i * 2,
@ -571,9 +571,9 @@ int valsol(const double *azel, const int *vsat, int n,
/* chi-square validation of residuals */ /* chi-square validation of residuals */
vv = dot(v, v, nv); vv = dot(v, v, nv);
if (nv > nx && vv > chisqr[nv - nx - 1]) if (nv > nx && vv > CHISQR[nv - nx - 1])
{ {
sprintf(msg, "chi-square error nv=%d vv=%.1f cs=%.1f", nv, vv, chisqr[nv - nx - 1]); sprintf(msg, "chi-square error nv=%d vv=%.1f cs=%.1f", nv, vv, CHISQR[nv - nx - 1]);
return 0; return 0;
} }
/* large gdop check */ /* large gdop check */

View File

@ -436,8 +436,8 @@ int fix_amb_ROUND(rtk_t *rtk, int *sat1, int *sat2, const int *NW, int n)
double C1, C2, B1, v1, BC, v, vc, *NC, *var, lam_NL = lam_LC(1, 1, 0), lam1, lam2; double C1, C2, B1, v1, BC, v, vc, *NC, *var, lam_NL = lam_LC(1, 1, 0), lam1, lam2;
int i, j, k, m = 0, N1, stat; int i, j, k, m = 0, N1, stat;
lam1 = lam_carr[0]; lam1 = LAM_CARR[0];
lam2 = lam_carr[1]; lam2 = LAM_CARR[1];
C1 = std::pow(lam2, 2.0) / (std::pow(lam2, 2.0) - std::pow(lam1, 2.0)); C1 = std::pow(lam2, 2.0) / (std::pow(lam2, 2.0) - std::pow(lam1, 2.0));
C2 = -std::pow(lam1, 2.0) / (std::pow(lam2, 2.0) - std::pow(lam1, 2.0)); C2 = -std::pow(lam1, 2.0) / (std::pow(lam2, 2.0) - std::pow(lam1, 2.0));
@ -498,8 +498,8 @@ int fix_amb_ILS(rtk_t *rtk, int *sat1, int *sat2, int *NW, int n)
double C1, C2, *B1, *N1, *NC, *D, *E, *Q, s[2], lam_NL = lam_LC(1, 1, 0), lam1, lam2; double C1, C2, *B1, *N1, *NC, *D, *E, *Q, s[2], lam_NL = lam_LC(1, 1, 0), lam1, lam2;
int i, j, k, m = 0, info, stat, flgs[MAXSAT] = {0}, max_flg = 0; int i, j, k, m = 0, info, stat, flgs[MAXSAT] = {0}, max_flg = 0;
lam1 = lam_carr[0]; lam1 = LAM_CARR[0];
lam2 = lam_carr[1]; lam2 = LAM_CARR[1];
C1 = std::pow(lam2, 2.0) / (std::pow(lam2, 2.0) - std::pow(lam1, 2.0)); C1 = std::pow(lam2, 2.0) / (std::pow(lam2, 2.0) - std::pow(lam1, 2.0));
C2 = -std::pow(lam1, 2.0) / (std::pow(lam2, 2.0) - std::pow(lam1, 2.0)); C2 = -std::pow(lam1, 2.0) / (std::pow(lam2, 2.0) - std::pow(lam1, 2.0));

View File

@ -385,8 +385,8 @@ int decode_type1002(rtcm_t *rtcm)
if (ppr1 != static_cast<int>(0xFFF80000)) if (ppr1 != static_cast<int>(0xFFF80000))
{ {
rtcm->obs.data[index].P[0] = pr1; rtcm->obs.data[index].P[0] = pr1;
cp1 = adjcp(rtcm, sat, 0, ppr1 * 0.0005 / lam_carr[0]); cp1 = adjcp(rtcm, sat, 0, ppr1 * 0.0005 / LAM_CARR[0]);
rtcm->obs.data[index].L[0] = pr1 / lam_carr[0] + cp1; rtcm->obs.data[index].L[0] = pr1 / LAM_CARR[0] + cp1;
} }
rtcm->obs.data[index].LLI[0] = lossoflock(rtcm, sat, 0, lock1); rtcm->obs.data[index].LLI[0] = lossoflock(rtcm, sat, 0, lock1);
rtcm->obs.data[index].SNR[0] = snratio(cnr1 * 0.25); rtcm->obs.data[index].SNR[0] = snratio(cnr1 * 0.25);
@ -475,8 +475,8 @@ int decode_type1004(rtcm_t *rtcm)
if (ppr1 != static_cast<int>(0xFFF80000)) if (ppr1 != static_cast<int>(0xFFF80000))
{ {
rtcm->obs.data[index].P[0] = pr1; rtcm->obs.data[index].P[0] = pr1;
cp1 = adjcp(rtcm, sat, 0, ppr1 * 0.0005 / lam_carr[0]); cp1 = adjcp(rtcm, sat, 0, ppr1 * 0.0005 / LAM_CARR[0]);
rtcm->obs.data[index].L[0] = pr1 / lam_carr[0] + cp1; rtcm->obs.data[index].L[0] = pr1 / LAM_CARR[0] + cp1;
} }
rtcm->obs.data[index].LLI[0] = lossoflock(rtcm, sat, 0, lock1); rtcm->obs.data[index].LLI[0] = lossoflock(rtcm, sat, 0, lock1);
rtcm->obs.data[index].SNR[0] = snratio(cnr1 * 0.25); rtcm->obs.data[index].SNR[0] = snratio(cnr1 * 0.25);
@ -488,8 +488,8 @@ int decode_type1004(rtcm_t *rtcm)
} }
if (ppr2 != static_cast<int>(0xFFF80000)) if (ppr2 != static_cast<int>(0xFFF80000))
{ {
cp2 = adjcp(rtcm, sat, 1, ppr2 * 0.0005 / lam_carr[1]); cp2 = adjcp(rtcm, sat, 1, ppr2 * 0.0005 / LAM_CARR[1]);
rtcm->obs.data[index].L[1] = pr1 / lam_carr[1] + cp2; rtcm->obs.data[index].L[1] = pr1 / LAM_CARR[1] + cp2;
} }
rtcm->obs.data[index].LLI[1] = lossoflock(rtcm, sat, 1, lock2); rtcm->obs.data[index].LLI[1] = lossoflock(rtcm, sat, 1, lock2);
rtcm->obs.data[index].SNR[1] = snratio(cnr2 * 0.25); rtcm->obs.data[index].SNR[1] = snratio(cnr2 * 0.25);
@ -1986,7 +1986,7 @@ int decode_ssr1_head(rtcm_t *rtcm, int sys, int *sync, int *iod,
i += 4; /* solution id */ i += 4; /* solution id */
nsat = getbitu(rtcm->buff, i, ns); nsat = getbitu(rtcm->buff, i, ns);
i += ns; i += ns;
*udint = ssrudint[udi]; *udint = SSRUDINT[udi];
trace(4, "decode_ssr1_head: time=%s sys=%d nsat=%d sync=%d iod=%d provid=%d solid=%d\n", trace(4, "decode_ssr1_head: time=%s sys=%d nsat=%d sync=%d iod=%d provid=%d solid=%d\n",
time_str(rtcm->time, 2), sys, nsat, *sync, *iod, provid, solid); time_str(rtcm->time, 2), sys, nsat, *sync, *iod, provid, solid);
@ -2042,7 +2042,7 @@ int decode_ssr2_head(rtcm_t *rtcm, int sys, int *sync, int *iod,
i += 4; /* solution id */ i += 4; /* solution id */
nsat = getbitu(rtcm->buff, i, ns); nsat = getbitu(rtcm->buff, i, ns);
i += ns; i += ns;
*udint = ssrudint[udi]; *udint = SSRUDINT[udi];
trace(4, "decode_ssr2_head: time=%s sys=%d nsat=%d sync=%d iod=%d provid=%d solid=%d\n", trace(4, "decode_ssr2_head: time=%s sys=%d nsat=%d sync=%d iod=%d provid=%d solid=%d\n",
time_str(rtcm->time, 2), sys, nsat, *sync, *iod, provid, solid); time_str(rtcm->time, 2), sys, nsat, *sync, *iod, provid, solid);
@ -2102,7 +2102,7 @@ int decode_ssr7_head(rtcm_t *rtcm, int sys, int *sync, int *iod,
i += 1; /* MW consistency indicator */ i += 1; /* MW consistency indicator */
nsat = getbitu(rtcm->buff, i, ns); nsat = getbitu(rtcm->buff, i, ns);
i += ns; i += ns;
*udint = ssrudint[udi]; *udint = SSRUDINT[udi];
trace(4, "decode_ssr7_head: time=%s sys=%d nsat=%d sync=%d iod=%d provid=%d solid=%d\n", trace(4, "decode_ssr7_head: time=%s sys=%d nsat=%d sync=%d iod=%d provid=%d solid=%d\n",
time_str(rtcm->time, 2), sys, nsat, *sync, *iod, provid, solid); time_str(rtcm->time, 2), sys, nsat, *sync, *iod, provid, solid);
@ -2307,37 +2307,37 @@ int decode_ssr3(rtcm_t *rtcm, int sys)
case SYS_GPS: case SYS_GPS:
np = 6; np = 6;
offp = 0; offp = 0;
codes = codes_gps; codes = CODES_GPS;
ncode = 17; ncode = 17;
break; break;
case SYS_GLO: case SYS_GLO:
np = 5; np = 5;
offp = 0; offp = 0;
codes = codes_glo; codes = CODES_GLO;
ncode = 4; ncode = 4;
break; break;
case SYS_GAL: case SYS_GAL:
np = 6; np = 6;
offp = 0; offp = 0;
codes = codes_gal; codes = CODES_GAL;
ncode = 19; ncode = 19;
break; break;
case SYS_QZS: case SYS_QZS:
np = 4; np = 4;
offp = 192; offp = 192;
codes = codes_qzs; codes = CODES_QZS;
ncode = 13; ncode = 13;
break; break;
case SYS_BDS: case SYS_BDS:
np = 6; np = 6;
offp = 1; offp = 1;
codes = codes_bds; codes = CODES_BDS;
ncode = 9; ncode = 9;
break; break;
case SYS_SBS: case SYS_SBS:
np = 6; np = 6;
offp = 120; offp = 120;
codes = codes_sbs; codes = CODES_SBS;
ncode = 4; ncode = 4;
break; break;
default: default:
@ -2642,31 +2642,31 @@ int decode_ssr7(rtcm_t *rtcm, int sys)
case SYS_GPS: case SYS_GPS:
np = 6; np = 6;
offp = 0; offp = 0;
codes = codes_gps; codes = CODES_GPS;
ncode = 17; ncode = 17;
break; break;
case SYS_GLO: case SYS_GLO:
np = 5; np = 5;
offp = 0; offp = 0;
codes = codes_glo; codes = CODES_GLO;
ncode = 4; ncode = 4;
break; break;
case SYS_GAL: case SYS_GAL:
np = 6; np = 6;
offp = 0; offp = 0;
codes = codes_gal; codes = CODES_GAL;
ncode = 19; ncode = 19;
break; break;
case SYS_QZS: case SYS_QZS:
np = 4; np = 4;
offp = 192; offp = 192;
codes = codes_qzs; codes = CODES_QZS;
ncode = 13; ncode = 13;
break; break;
case SYS_BDS: case SYS_BDS:
np = 6; np = 6;
offp = 1; offp = 1;
codes = codes_bds; codes = CODES_BDS;
ncode = 9; ncode = 9;
break; break;
default: default:

View File

@ -64,38 +64,38 @@ const double RANGE_MS = SPEED_OF_LIGHT * 0.001; /* range in 1 ms */
/* ssr update intervals ------------------------------------------------------*/ /* ssr update intervals ------------------------------------------------------*/
const double ssrudint[16] = { const double SSRUDINT[16] = {
1, 2, 5, 10, 15, 30, 60, 120, 240, 300, 600, 900, 1800, 3600, 7200, 10800}; 1, 2, 5, 10, 15, 30, 60, 120, 240, 300, 600, 900, 1800, 3600, 7200, 10800};
/* ssr 3 and 7 signal and tracking mode ids ----------------------------------*/ /* ssr 3 and 7 signal and tracking mode ids ----------------------------------*/
const int codes_gps[] = { const int CODES_GPS[] = {
CODE_L1C, CODE_L1P, CODE_L1W, CODE_L1Y, CODE_L1M, CODE_L2C, CODE_L2D, CODE_L2S, CODE_L1C, CODE_L1P, CODE_L1W, CODE_L1Y, CODE_L1M, CODE_L2C, CODE_L2D, CODE_L2S,
CODE_L2L, CODE_L2X, CODE_L2P, CODE_L2W, CODE_L2Y, CODE_L2M, CODE_L5I, CODE_L5Q, CODE_L2L, CODE_L2X, CODE_L2P, CODE_L2W, CODE_L2Y, CODE_L2M, CODE_L5I, CODE_L5Q,
CODE_L5X}; CODE_L5X};
const int codes_glo[] = { const int CODES_GLO[] = {
CODE_L1C, CODE_L1P, CODE_L2C, CODE_L2P}; CODE_L1C, CODE_L1P, CODE_L2C, CODE_L2P};
const int codes_gal[] = { const int CODES_GAL[] = {
CODE_L1A, CODE_L1B, CODE_L1C, CODE_L1X, CODE_L1Z, CODE_L5I, CODE_L5Q, CODE_L5X, CODE_L1A, CODE_L1B, CODE_L1C, CODE_L1X, CODE_L1Z, CODE_L5I, CODE_L5Q, CODE_L5X,
CODE_L7I, CODE_L7Q, CODE_L7X, CODE_L8I, CODE_L8Q, CODE_L8X, CODE_L6A, CODE_L6B, CODE_L7I, CODE_L7Q, CODE_L7X, CODE_L8I, CODE_L8Q, CODE_L8X, CODE_L6A, CODE_L6B,
CODE_L6C, CODE_L6X, CODE_L6Z}; CODE_L6C, CODE_L6X, CODE_L6Z};
const int codes_qzs[] = { const int CODES_QZS[] = {
CODE_L1C, CODE_L1S, CODE_L1L, CODE_L2S, CODE_L2L, CODE_L2X, CODE_L5I, CODE_L5Q, CODE_L1C, CODE_L1S, CODE_L1L, CODE_L2S, CODE_L2L, CODE_L2X, CODE_L5I, CODE_L5Q,
CODE_L5X, CODE_L6S, CODE_L6L, CODE_L6X, CODE_L1X}; CODE_L5X, CODE_L6S, CODE_L6L, CODE_L6X, CODE_L1X};
const int codes_bds[] = { const int CODES_BDS[] = {
CODE_L1I, CODE_L1Q, CODE_L1X, CODE_L7I, CODE_L7Q, CODE_L7X, CODE_L6I, CODE_L6Q, CODE_L1I, CODE_L1Q, CODE_L1X, CODE_L7I, CODE_L7Q, CODE_L7X, CODE_L6I, CODE_L6Q,
CODE_L6X}; CODE_L6X};
const int codes_sbs[] = { const int CODES_SBS[] = {
CODE_L1C, CODE_L5I, CODE_L5Q, CODE_L5X}; CODE_L1C, CODE_L5I, CODE_L5Q, CODE_L5X};

View File

@ -62,9 +62,9 @@
#include <sys/types.h> #include <sys/types.h>
const double gpst0[] = {1980, 1, 6, 0, 0, 0}; /* gps time reference */ const double GPST0[] = {1980, 1, 6, 0, 0, 0}; /* gps time reference */
const double gst0[] = {1999, 8, 22, 0, 0, 0}; /* galileo system time reference */ const double GST0[] = {1999, 8, 22, 0, 0, 0}; /* galileo system time reference */
const double bdt0[] = {2006, 1, 1, 0, 0, 0}; /* beidou time reference */ const double BDT0[] = {2006, 1, 1, 0, 0, 0}; /* beidou time reference */
static double timeoffset_ = 0.0; static double timeoffset_ = 0.0;
@ -154,7 +154,7 @@ char codepris[7][MAXFREQ][16] = {
fatalfunc_t *fatalfunc = nullptr; /* fatal callback function */ fatalfunc_t *fatalfunc = nullptr; /* fatal callback function */
/* crc tables generated by util/gencrc ---------------------------------------*/ /* crc tables generated by util/gencrc ---------------------------------------*/
const uint16_t tbl_CRC16[] = { const uint16_t TBL_CR_C16[] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
@ -189,7 +189,7 @@ const uint16_t tbl_CRC16[] = {
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0}; 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0};
const unsigned int tbl_CRC24Q[] = { const unsigned int TBL_CR_C24_Q[] = {
0x000000, 0x864CFB, 0x8AD50D, 0x0C99F6, 0x93E6E1, 0x15AA1A, 0x1933EC, 0x9F7F17, 0x000000, 0x864CFB, 0x8AD50D, 0x0C99F6, 0x93E6E1, 0x15AA1A, 0x1933EC, 0x9F7F17,
0xA18139, 0x27CDC2, 0x2B5434, 0xAD18CF, 0x3267D8, 0xB42B23, 0xB8B2D5, 0x3EFE2E, 0xA18139, 0x27CDC2, 0x2B5434, 0xAD18CF, 0x3267D8, 0xB42B23, 0xB8B2D5, 0x3EFE2E,
0xC54E89, 0x430272, 0x4F9B84, 0xC9D77F, 0x56A868, 0xD0E493, 0xDC7D65, 0x5A319E, 0xC54E89, 0x430272, 0x4F9B84, 0xC9D77F, 0x56A868, 0xD0E493, 0xDC7D65, 0x5A319E,
@ -890,7 +890,7 @@ unsigned int rtk_crc24q(const unsigned char *buff, int len)
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
crc = ((crc << 8) & 0xFFFFFF) ^ tbl_CRC24Q[(crc >> 16) ^ buff[i]]; crc = ((crc << 8) & 0xFFFFFF) ^ TBL_CR_C24_Q[(crc >> 16) ^ buff[i]];
} }
return crc; return crc;
} }
@ -912,7 +912,7 @@ uint16_t rtk_crc16(const unsigned char *buff, int len)
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
crc = (crc << 8) ^ tbl_CRC16[((crc >> 8) ^ buff[i]) & 0xFF]; crc = (crc << 8) ^ TBL_CR_C16[((crc >> 8) ^ buff[i]) & 0xFF];
} }
return crc; return crc;
} }
@ -1551,7 +1551,7 @@ void time2epoch(gtime_t t, double *ep)
*-----------------------------------------------------------------------------*/ *-----------------------------------------------------------------------------*/
gtime_t gpst2time(int week, double sec) gtime_t gpst2time(int week, double sec)
{ {
gtime_t t = epoch2time(gpst0); gtime_t t = epoch2time(GPST0);
if (sec < -1e9 || 1e9 < sec) if (sec < -1e9 || 1e9 < sec)
{ {
@ -1571,7 +1571,7 @@ gtime_t gpst2time(int week, double sec)
*-----------------------------------------------------------------------------*/ *-----------------------------------------------------------------------------*/
double time2gpst(gtime_t t, int *week) double time2gpst(gtime_t t, int *week)
{ {
gtime_t t0 = epoch2time(gpst0); gtime_t t0 = epoch2time(GPST0);
time_t sec = t.time - t0.time; time_t sec = t.time - t0.time;
int w = static_cast<int>(sec / 604800); int w = static_cast<int>(sec / 604800);
@ -1591,7 +1591,7 @@ double time2gpst(gtime_t t, int *week)
*-----------------------------------------------------------------------------*/ *-----------------------------------------------------------------------------*/
gtime_t gst2time(int week, double sec) gtime_t gst2time(int week, double sec)
{ {
gtime_t t = epoch2time(gst0); gtime_t t = epoch2time(GST0);
if (sec < -1e9 || 1e9 < sec) if (sec < -1e9 || 1e9 < sec)
{ {
@ -1611,7 +1611,7 @@ gtime_t gst2time(int week, double sec)
*-----------------------------------------------------------------------------*/ *-----------------------------------------------------------------------------*/
double time2gst(gtime_t t, int *week) double time2gst(gtime_t t, int *week)
{ {
gtime_t t0 = epoch2time(gst0); gtime_t t0 = epoch2time(GST0);
time_t sec = t.time - t0.time; time_t sec = t.time - t0.time;
int w = static_cast<int>(sec / (86400 * 7)); int w = static_cast<int>(sec / (86400 * 7));
@ -1631,7 +1631,7 @@ double time2gst(gtime_t t, int *week)
*-----------------------------------------------------------------------------*/ *-----------------------------------------------------------------------------*/
gtime_t bdt2time(int week, double sec) gtime_t bdt2time(int week, double sec)
{ {
gtime_t t = epoch2time(bdt0); gtime_t t = epoch2time(BDT0);
if (sec < -1e9 || 1e9 < sec) if (sec < -1e9 || 1e9 < sec)
{ {
@ -1651,7 +1651,7 @@ gtime_t bdt2time(int week, double sec)
*-----------------------------------------------------------------------------*/ *-----------------------------------------------------------------------------*/
double time2bdt(gtime_t t, int *week) double time2bdt(gtime_t t, int *week)
{ {
gtime_t t0 = epoch2time(bdt0); gtime_t t0 = epoch2time(BDT0);
time_t sec = t.time - t0.time; time_t sec = t.time - t0.time;
int w = static_cast<int>(sec / (86400 * 7)); int w = static_cast<int>(sec / (86400 * 7));
@ -4806,7 +4806,7 @@ void csmooth(obs_t *obs, int ns)
} }
else else
{ {
dcp = lam_carr[j] * (p->L[j] - Lp[r - 1][s - 1][j]); dcp = LAM_CARR[j] * (p->L[j] - Lp[r - 1][s - 1][j]);
Ps[r - 1][s - 1][j] = p->P[j] / ns + (Ps[r - 1][s - 1][j] + dcp) * (ns - 1) / ns; Ps[r - 1][s - 1][j] = p->P[j] / ns + (Ps[r - 1][s - 1][j] + dcp) * (ns - 1) / ns;
} }
if (++n[r - 1][s - 1][j] < ns) if (++n[r - 1][s - 1][j] < ns)

View File

@ -1613,8 +1613,8 @@ int ddres(rtk_t *rtk, const nav_t *nav, double dt, const double *x,
/* double-differenced ionospheric delay term */ /* double-differenced ionospheric delay term */
if (opt->ionoopt == IONOOPT_EST) if (opt->ionoopt == IONOOPT_EST)
{ {
fi = lami / lam_carr[0]; fi = lami / LAM_CARR[0];
fj = lamj / lam_carr[0]; fj = lamj / LAM_CARR[0];
didxi = (f < nf ? -1.0 : 1.0) * fi * fi * im[i]; didxi = (f < nf ? -1.0 : 1.0) * fi * fi * im[i];
didxj = (f < nf ? -1.0 : 1.0) * fj * fj * im[j]; didxj = (f < nf ? -1.0 : 1.0) * fj * fj * im[j];
v[nv] -= didxi * x[II_RTK(sat[i], opt)] - didxj * x[II_RTK(sat[j], opt)]; v[nv] -= didxi * x[II_RTK(sat[i], opt)] - didxj * x[II_RTK(sat[j], opt)];

View File

@ -35,7 +35,7 @@ void saveoutbuf(rtksvr_t *svr, unsigned char *buff, int n, int index)
/* write solution to output stream -------------------------------------------*/ /* write solution to output stream -------------------------------------------*/
void writesol(rtksvr_t *svr, int index) void writesol(rtksvr_t *svr, int index)
{ {
solopt_t solopt = solopt_default; solopt_t solopt = SOLOPT_DEFAULT;
unsigned char buff[1024]; unsigned char buff[1024];
int i, n; int i, n;
@ -672,10 +672,10 @@ int rtksvrinit(rtksvr_t *svr)
} }
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
{ {
svr->solopt[i] = solopt_default; svr->solopt[i] = SOLOPT_DEFAULT;
} }
svr->navsel = svr->nsbs = svr->nsol = 0; svr->navsel = svr->nsbs = svr->nsol = 0;
rtkinit(&svr->rtk, &prcopt_default); rtkinit(&svr->rtk, &PRCOPT_DEFAULT);
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
{ {
svr->nb[i] = 0; svr->nb[i] = 0;

View File

@ -57,7 +57,7 @@
#include "rtklib.h" #include "rtklib.h"
const solopt_t solopt_default = { const solopt_t SOLOPT_DEFAULT = {
/* defaults solution output options */ /* defaults solution output options */
SOLF_LLH, TIMES_GPST, 1, 3, /* posf, times, timef, timeu */ SOLF_LLH, TIMES_GPST, 1, 3, /* posf, times, timef, timeu */
0, 1, 0, 0, 0, 0, /* degf, outhead, outopt, datum, height, geoid */ 0, 1, 0, 0, 0, 0, /* degf, outhead, outopt, datum, height, geoid */
@ -66,7 +66,7 @@ const solopt_t solopt_default = {
" ", "", 0 /* separator/program name */ " ", "", 0 /* separator/program name */
}; };
const prcopt_t prcopt_default = { /* defaults processing options */ const prcopt_t PRCOPT_DEFAULT = { /* defaults processing options */
PMODE_SINGLE, 0, 2, SYS_GPS, /* mode, soltype, nf, navsys */ PMODE_SINGLE, 0, 2, SYS_GPS, /* mode, soltype, nf, navsys */
15.0 * D2R, {{}, {{}, {}}}, /* elmin, snrmask */ 15.0 * D2R, {{}, {{}, {}}}, /* elmin, snrmask */
0, 1, 1, 1, /* sateph, modear, glomodear, bdsmodear */ 0, 1, 1, 1, /* sateph, modear, glomodear, bdsmodear */

View File

@ -319,12 +319,12 @@ int decode_sbstype18(const sbsmsg_t *msg, sbsion_t *sbsion)
if (0 <= band && band <= 8) if (0 <= band && band <= 8)
{ {
p = igpband1[band]; p = IGPBAND1[band];
m = 8; m = 8;
} }
else if (9 <= band && band <= 10) else if (9 <= band && band <= 10)
{ {
p = igpband2[band - 9]; p = IGPBAND2[band - 9];
m = 5; m = 5;
} }
else else

View File

@ -70,50 +70,50 @@ const int WEEKOFFSET = 1024; /* gps week offset for NovAtel OEM-3 */
/* sbas igp definition -------------------------------------------------------*/ /* sbas igp definition -------------------------------------------------------*/
static const short static const short
x1[] = {-75, -65, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, X1[] = {-75, -65, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20,
25, 30, 35, 40, 45, 50, 55, 65, 75, 85}, 25, 30, 35, 40, 45, 50, 55, 65, 75, 85},
x2[] = {-55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30, X2[] = {-55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30,
35, 40, 45, 50, 55}, 35, 40, 45, 50, 55},
x3[] = {-75, -65, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, X3[] = {-75, -65, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20,
25, 30, 35, 40, 45, 50, 55, 65, 75}, 25, 30, 35, 40, 45, 50, 55, 65, 75},
x4[] = {-85, -75, -65, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, X4[] = {-85, -75, -65, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15,
20, 25, 30, 35, 40, 45, 50, 55, 65, 75}, 20, 25, 30, 35, 40, 45, 50, 55, 65, 75},
x5[] = {-180, -175, -170, -165, -160, -155, -150, -145, -140, -135, -130, -125, -120, -115, X5[] = {-180, -175, -170, -165, -160, -155, -150, -145, -140, -135, -130, -125, -120, -115,
-110, -105, -100, -95, -90, -85, -80, -75, -70, -65, -60, -55, -50, -45, -110, -105, -100, -95, -90, -85, -80, -75, -70, -65, -60, -55, -50, -45,
-40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25,
30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,
100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165,
170, 175}, 170, 175},
x6[] = {-180, -170, -160, -150, -140, -130, -120, -110, -100, -90, -80, -70, -60, -50, X6[] = {-180, -170, -160, -150, -140, -130, -120, -110, -100, -90, -80, -70, -60, -50,
-40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
100, 110, 120, 130, 140, 150, 160, 170}, 100, 110, 120, 130, 140, 150, 160, 170},
x7[] = {-180, -150, -120, -90, -60, -30, 0, 30, 60, 90, 120, 150}, X7[] = {-180, -150, -120, -90, -60, -30, 0, 30, 60, 90, 120, 150},
x8[] = {-170, -140, -110, -80, -50, -20, 10, 40, 70, 100, 130, 160}; X8[] = {-170, -140, -110, -80, -50, -20, 10, 40, 70, 100, 130, 160};
const sbsigpband_t igpband1[9][8] = {/* band 0-8 */ const sbsigpband_t IGPBAND1[9][8] = {/* band 0-8 */
{{-180, x1, 1, 28}, {-175, x2, 29, 51}, {-170, x3, 52, 78}, {-165, x2, 79, 101}, {{-180, X1, 1, 28}, {-175, X2, 29, 51}, {-170, X3, 52, 78}, {-165, X2, 79, 101},
{-160, x3, 102, 128}, {-155, x2, 129, 151}, {-150, x3, 152, 178}, {-145, x2, 179, 201}}, {-160, X3, 102, 128}, {-155, X2, 129, 151}, {-150, X3, 152, 178}, {-145, X2, 179, 201}},
{{-140, x4, 1, 28}, {-135, x2, 29, 51}, {-130, x3, 52, 78}, {-125, x2, 79, 101}, {{-140, X4, 1, 28}, {-135, X2, 29, 51}, {-130, X3, 52, 78}, {-125, X2, 79, 101},
{-120, x3, 102, 128}, {-115, x2, 129, 151}, {-110, x3, 152, 178}, {-105, x2, 179, 201}}, {-120, X3, 102, 128}, {-115, X2, 129, 151}, {-110, X3, 152, 178}, {-105, X2, 179, 201}},
{{-100, x3, 1, 27}, {-95, x2, 28, 50}, {-90, x1, 51, 78}, {-85, x2, 79, 101}, {{-100, X3, 1, 27}, {-95, X2, 28, 50}, {-90, X1, 51, 78}, {-85, X2, 79, 101},
{-80, x3, 102, 128}, {-75, x2, 129, 151}, {-70, x3, 152, 178}, {-65, x2, 179, 201}}, {-80, X3, 102, 128}, {-75, X2, 129, 151}, {-70, X3, 152, 178}, {-65, X2, 179, 201}},
{{-60, x3, 1, 27}, {-55, x2, 28, 50}, {-50, x4, 51, 78}, {-45, x2, 79, 101}, {{-60, X3, 1, 27}, {-55, X2, 28, 50}, {-50, X4, 51, 78}, {-45, X2, 79, 101},
{-40, x3, 102, 128}, {-35, x2, 129, 151}, {-30, x3, 152, 178}, {-25, x2, 179, 201}}, {-40, X3, 102, 128}, {-35, X2, 129, 151}, {-30, X3, 152, 178}, {-25, X2, 179, 201}},
{{-20, x3, 1, 27}, {-15, x2, 28, 50}, {-10, x3, 51, 77}, {-5, x2, 78, 100}, {{-20, X3, 1, 27}, {-15, X2, 28, 50}, {-10, X3, 51, 77}, {-5, X2, 78, 100},
{0, x1, 101, 128}, {5, x2, 129, 151}, {10, x3, 152, 178}, {15, x2, 179, 201}}, {0, X1, 101, 128}, {5, X2, 129, 151}, {10, X3, 152, 178}, {15, X2, 179, 201}},
{{20, x3, 1, 27}, {25, x2, 28, 50}, {30, x3, 51, 77}, {35, x2, 78, 100}, {{20, X3, 1, 27}, {25, X2, 28, 50}, {30, X3, 51, 77}, {35, X2, 78, 100},
{40, x4, 101, 128}, {45, x2, 129, 151}, {50, x3, 152, 178}, {55, x2, 179, 201}}, {40, X4, 101, 128}, {45, X2, 129, 151}, {50, X3, 152, 178}, {55, X2, 179, 201}},
{{60, x3, 1, 27}, {65, x2, 28, 50}, {70, x3, 51, 77}, {75, x2, 78, 100}, {{60, X3, 1, 27}, {65, X2, 28, 50}, {70, X3, 51, 77}, {75, X2, 78, 100},
{80, x3, 101, 127}, {85, x2, 128, 150}, {90, x1, 151, 178}, {95, x2, 179, 201}}, {80, X3, 101, 127}, {85, X2, 128, 150}, {90, X1, 151, 178}, {95, X2, 179, 201}},
{{100, x3, 1, 27}, {105, x2, 28, 50}, {110, x3, 51, 77}, {115, x2, 78, 100}, {{100, X3, 1, 27}, {105, X2, 28, 50}, {110, X3, 51, 77}, {115, X2, 78, 100},
{120, x3, 101, 127}, {125, x2, 128, 150}, {130, x4, 151, 178}, {135, x2, 179, 201}}, {120, X3, 101, 127}, {125, X2, 128, 150}, {130, X4, 151, 178}, {135, X2, 179, 201}},
{{140, x3, 1, 27}, {145, x2, 28, 50}, {150, x3, 51, 77}, {155, x2, 78, 100}, {{140, X3, 1, 27}, {145, X2, 28, 50}, {150, X3, 51, 77}, {155, X2, 78, 100},
{160, x3, 101, 127}, {165, x2, 128, 150}, {170, x3, 151, 177}, {175, x2, 178, 200}}}; {160, X3, 101, 127}, {165, X2, 128, 150}, {170, X3, 151, 177}, {175, X2, 178, 200}}};
const sbsigpband_t igpband2[2][5] = {/* band 9-10 */ const sbsigpband_t IGPBAND2[2][5] = {/* band 9-10 */
{{60, x5, 1, 72}, {65, x6, 73, 108}, {70, x6, 109, 144}, {75, x6, 145, 180}, {{60, X5, 1, 72}, {65, X6, 73, 108}, {70, X6, 109, 144}, {75, X6, 145, 180},
{85, x7, 181, 192}}, {85, X7, 181, 192}},
{{-60, x5, 1, 72}, {-65, x6, 73, 108}, {-70, x6, 109, 144}, {-75, x6, 145, 180}, {{-60, X5, 1, 72}, {-65, X6, 73, 108}, {-70, X6, 109, 144}, {-75, X6, 145, 180},
{-85, x8, 181, 192}}}; {-85, X8, 181, 192}}};
char *getfield(char *p, int pos); char *getfield(char *p, int pos);

View File

@ -67,7 +67,7 @@ const int MAXFIELD = 64; /* max number of fields in a record */
const double KNOT2M = 0.514444444; /* m/knot */ const double KNOT2M = 0.514444444; /* m/knot */
static const int solq_nmea[] = {/* nmea quality flags to rtklib sol quality */ static const int SOLQ_NMEA[] = {/* nmea quality flags to rtklib sol quality */
/* nmea 0183 v.2.3 quality flags: */ /* nmea 0183 v.2.3 quality flags: */
/* 0=invalid, 1=gps fix (sps), 2=dgps fix, 3=pps fix, 4=rtk, 5=float rtk */ /* 0=invalid, 1=gps fix (sps), 2=dgps fix, 3=pps fix, 4=rtk, 5=float rtk */
/* 6=estimated (dead reckoning), 7=manual input, 8=simulation */ /* 6=estimated (dead reckoning), 7=manual input, 8=simulation */
@ -326,7 +326,7 @@ int decode_nmeagga(char **val, int n, sol_t *sol)
sol->time = time; sol->time = time;
} }
pos2ecef(pos, sol->rr); pos2ecef(pos, sol->rr);
sol->stat = 0 <= solq && solq <= 8 ? solq_nmea[solq] : SOLQ_NONE; sol->stat = 0 <= solq && solq <= 8 ? SOLQ_NMEA[solq] : SOLQ_NONE;
sol->ns = nrcv; sol->ns = nrcv;
sol->type = 0; /* position type = xyz */ sol->type = 0; /* position type = xyz */
@ -1005,7 +1005,7 @@ int readsolt(char *files[], int nfile, gtime_t ts, gtime_t te,
double tint, int qflag, solbuf_t *solbuf) double tint, int qflag, solbuf_t *solbuf)
{ {
FILE *fp; FILE *fp;
solopt_t opt = solopt_default; solopt_t opt = SOLOPT_DEFAULT;
int i; int i;
trace(3, "readsolt: nfile=%d\n", nfile); trace(3, "readsolt: nfile=%d\n", nfile);
@ -1537,7 +1537,7 @@ int outnmea_gga(unsigned char *buff, const sol_t *sol)
} }
for (solq = 0; solq < 8; solq++) for (solq = 0; solq < 8; solq++)
{ {
if (solq_nmea[solq] == sol->stat) if (SOLQ_NMEA[solq] == sol->stat)
{ {
break; break;
} }

View File

@ -482,9 +482,9 @@ void hybrid_observables_cc::compute_pranges(std::vector<Gnss_Synchro> &data)
{ {
if (it->Flag_valid_word) if (it->Flag_valid_word)
{ {
double traveltime_s = (static_cast<double>(T_rx_TOW_ms) - it->interp_TOW_ms + GPS_STARTOFFSET_ms) / 1000.0; double traveltime_s = (static_cast<double>(T_rx_TOW_ms) - it->interp_TOW_ms + GPS_STARTOFFSET_MS) / 1000.0;
//todo: check what happens during the week rollover (TOW rollover at 604800000s) //todo: check what happens during the week rollover (TOW rollover at 604800000s)
it->RX_time = (static_cast<double>(T_rx_TOW_ms) + GPS_STARTOFFSET_ms) / 1000.0; it->RX_time = (static_cast<double>(T_rx_TOW_ms) + GPS_STARTOFFSET_MS) / 1000.0;
it->Pseudorange_m = traveltime_s * SPEED_OF_LIGHT; it->Pseudorange_m = traveltime_s * SPEED_OF_LIGHT;
it->Flag_valid_pseudorange = true; it->Flag_valid_pseudorange = true;
// debug code // debug code

View File

@ -90,11 +90,11 @@ SignalGenerator::SignalGenerator(ConfigurationInterface* configuration,
{ {
if (signal1[0].at(0) == '5') if (signal1[0].at(0) == '5')
{ {
vector_length = round(static_cast<float>(fs_in) / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS)); vector_length = round(static_cast<float>(fs_in) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS));
} }
else else
{ {
vector_length = round(static_cast<float>(fs_in) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)) * Galileo_E1_C_SECONDARY_CODE_LENGTH; vector_length = round(static_cast<float>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)) * GALILEO_E1_C_SECONDARY_CODE_LENGTH;
} }
} }
else if (std::find(system.begin(), system.end(), "G") != system.end()) else if (std::find(system.begin(), system.end(), "G") != system.end())

View File

@ -107,39 +107,39 @@ void signal_generator_c::init()
current_data_bit_int_.push_back(1); current_data_bit_int_.push_back(1);
current_data_bits_.emplace_back(1, 0); current_data_bits_.emplace_back(1, 0);
ms_counter_.push_back(0); ms_counter_.push_back(0);
data_modulation_.push_back((Galileo_E5a_I_SECONDARY_CODE.at(0) == '0' ? 1 : -1)); data_modulation_.push_back((GALILEO_E5A_I_SECONDARY_CODE.at(0) == '0' ? 1 : -1));
pilot_modulation_.push_back((Galileo_E5a_Q_SECONDARY_CODE[PRN_[sat]].at(0) == '0' ? 1 : -1)); pilot_modulation_.push_back((GALILEO_E5A_Q_SECONDARY_CODE[PRN_[sat]].at(0) == '0' ? 1 : -1));
if (system_[sat] == "G") if (system_[sat] == "G")
{ {
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS))); samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)));
num_of_codes_per_vector_.push_back(galileo_signal ? 4 * static_cast<int>(Galileo_E1_C_SECONDARY_CODE_LENGTH) : 1); num_of_codes_per_vector_.push_back(galileo_signal ? 4 * static_cast<int>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) : 1);
data_bit_duration_ms_.push_back(1e3 / GPS_CA_TELEMETRY_RATE_BITS_SECOND); data_bit_duration_ms_.push_back(1e3 / GPS_CA_TELEMETRY_RATE_BITS_SECOND);
} }
else if (system_[sat] == "R") else if (system_[sat] == "R")
{ {
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS))); samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)));
num_of_codes_per_vector_.push_back(galileo_signal ? 4 * static_cast<int>(Galileo_E1_C_SECONDARY_CODE_LENGTH) : 1); num_of_codes_per_vector_.push_back(galileo_signal ? 4 * static_cast<int>(GALILEO_E1_C_SECONDARY_CODE_LENGTH) : 1);
data_bit_duration_ms_.push_back(1e3 / GLONASS_GNAV_TELEMETRY_RATE_BITS_SECOND); data_bit_duration_ms_.push_back(1e3 / GLONASS_GNAV_TELEMETRY_RATE_BITS_SECOND);
} }
else if (system_[sat] == "E") else if (system_[sat] == "E")
{ {
if (signal_[sat].at(0) == '5') if (signal_[sat].at(0) == '5')
{ {
int codelen = static_cast<int>(Galileo_E5a_CODE_LENGTH_CHIPS); int codelen = static_cast<int>(GALILEO_E5A_CODE_LENGTH_CHIPS);
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (Galileo_E5a_CODE_CHIP_RATE_HZ / codelen))); samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GALILEO_E5A_CODE_CHIP_RATE_HZ / codelen)));
num_of_codes_per_vector_.push_back(1); num_of_codes_per_vector_.push_back(1);
data_bit_duration_ms_.push_back(1e3 / Galileo_E5a_SYMBOL_RATE_BPS); data_bit_duration_ms_.push_back(1e3 / GALILEO_E5A_SYMBOL_RATE_BPS);
} }
else else
{ {
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS))); samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
num_of_codes_per_vector_.push_back(static_cast<int>(Galileo_E1_C_SECONDARY_CODE_LENGTH)); num_of_codes_per_vector_.push_back(static_cast<int>(GALILEO_E1_C_SECONDARY_CODE_LENGTH));
data_bit_duration_ms_.push_back(1e3 / Galileo_E1_B_SYMBOL_RATE_BPS); data_bit_duration_ms_.push_back(1e3 / GALILEO_E1_B_SYMBOL_RATE_BPS);
} }
} }
} }
@ -212,7 +212,7 @@ void signal_generator_c::generate_codes()
strcpy(signal, "5X"); strcpy(signal, "5X");
galileo_e5_a_code_gen_complex_sampled(sampled_code_data_[sat], signal, PRN_[sat], fs_in_, galileo_e5_a_code_gen_complex_sampled(sampled_code_data_[sat], signal, PRN_[sat], fs_in_,
static_cast<int>(Galileo_E5a_CODE_LENGTH_CHIPS) - delay_chips_[sat]); static_cast<int>(GALILEO_E5A_CODE_LENGTH_CHIPS) - delay_chips_[sat]);
//noise //noise
if (noise_flag_) if (noise_flag_)
{ {
@ -230,7 +230,7 @@ void signal_generator_c::generate_codes()
strcpy(signal, "1B"); strcpy(signal, "1B");
galileo_e1_code_gen_complex_sampled(code, signal, cboc, PRN_[sat], fs_in_, galileo_e1_code_gen_complex_sampled(code, signal, cboc, PRN_[sat], fs_in_,
static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) - delay_chips_[sat]); static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) - delay_chips_[sat]);
// Obtain the desired CN0 assuming that Pn = 1. // Obtain the desired CN0 assuming that Pn = 1.
if (noise_flag_) if (noise_flag_)
@ -254,7 +254,7 @@ void signal_generator_c::generate_codes()
strcpy(signal, "1C"); strcpy(signal, "1C");
galileo_e1_code_gen_complex_sampled(sampled_code_pilot_[sat], signal, cboc, PRN_[sat], fs_in_, galileo_e1_code_gen_complex_sampled(sampled_code_pilot_[sat], signal, cboc, PRN_[sat], fs_in_,
static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS) - delay_chips_[sat], true); static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS) - delay_chips_[sat], true);
// Obtain the desired CN0 assuming that Pn = 1. // Obtain the desired CN0 assuming that Pn = 1.
if (noise_flag_) if (noise_flag_)
@ -380,7 +380,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
if (signal_[sat].at(0) == '5') if (signal_[sat].at(0) == '5')
{ {
// EACH WORK outputs 1 modulated primary code // EACH WORK outputs 1 modulated primary code
int codelen = static_cast<int>(Galileo_E5a_CODE_LENGTH_CHIPS); int codelen = static_cast<int>(GALILEO_E5A_CODE_LENGTH_CHIPS);
unsigned int delay_samples = (delay_chips_[sat] % codelen) * samples_per_code_[sat] / codelen; unsigned int delay_samples = (delay_chips_[sat] % codelen) * samples_per_code_[sat] / codelen;
for (k = 0; k < delay_samples; k++) for (k = 0; k < delay_samples; k++)
{ {
@ -395,10 +395,10 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
// New random data bit // New random data bit
current_data_bit_int_[sat] = (uniform_dist(e1) % 2) == 0 ? 1 : -1; current_data_bit_int_[sat] = (uniform_dist(e1) % 2) == 0 ? 1 : -1;
} }
data_modulation_[sat] = current_data_bit_int_[sat] * (Galileo_E5a_I_SECONDARY_CODE.at((ms_counter_[sat] + delay_sec_[sat]) % 20) == '0' ? 1 : -1); data_modulation_[sat] = current_data_bit_int_[sat] * (GALILEO_E5A_I_SECONDARY_CODE.at((ms_counter_[sat] + delay_sec_[sat]) % 20) == '0' ? 1 : -1);
pilot_modulation_[sat] = (Galileo_E5a_Q_SECONDARY_CODE[PRN_[sat] - 1].at((ms_counter_[sat] + delay_sec_[sat]) % 100) == '0' ? 1 : -1); pilot_modulation_[sat] = (GALILEO_E5A_Q_SECONDARY_CODE[PRN_[sat] - 1].at((ms_counter_[sat] + delay_sec_[sat]) % 100) == '0' ? 1 : -1);
ms_counter_[sat] = ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E5a_CODE_PERIOD)); ms_counter_[sat] = ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E5A_CODE_PERIOD));
for (k = delay_samples; k < samples_per_code_[sat]; k++) for (k = delay_samples; k < samples_per_code_[sat]; k++)
{ {
@ -410,7 +410,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
} }
else else
{ {
unsigned int delay_samples = (delay_chips_[sat] % static_cast<int>(Galileo_E1_B_CODE_LENGTH_CHIPS)) * samples_per_code_[sat] / Galileo_E1_B_CODE_LENGTH_CHIPS; unsigned int delay_samples = (delay_chips_[sat] % static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)) * samples_per_code_[sat] / GALILEO_E1_B_CODE_LENGTH_CHIPS;
for (i = 0; i < num_of_codes_per_vector_[sat]; i++) for (i = 0; i < num_of_codes_per_vector_[sat]; i++)
{ {
@ -432,7 +432,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
out_idx++; out_idx++;
} }
ms_counter_[sat] = (ms_counter_[sat] + static_cast<int>(round(1e3 * Galileo_E1_CODE_PERIOD))) % data_bit_duration_ms_[sat]; ms_counter_[sat] = (ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E1_CODE_PERIOD))) % data_bit_duration_ms_[sat];
} }
} }
} }

View File

@ -222,7 +222,7 @@ void rtl_tcp_signal_source_c::set_if_gain(int gain)
{ {
double start, stop, step; double start, stop, step;
}; };
if (info_.get_tuner_type() != rtl_tcp_dongle_info::TUNER_E4000) if (info_.get_tuner_type() != Rtl_Tcp_Dongle_Info::TUNER_E4000)
{ {
return; return;
} }

View File

@ -88,7 +88,7 @@ private:
int16_t port, int16_t port,
bool flip_iq); bool flip_iq);
rtl_tcp_dongle_info info_; Rtl_Tcp_Dongle_Info info_;
// IO members // IO members
boost::asio::io_service io_service_; boost::asio::io_service io_service_;

View File

@ -39,7 +39,7 @@
#include <cstring> // for memcpy #include <cstring> // for memcpy
#include <utility> #include <utility>
gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item, Gnss_Sdr_Valve::Gnss_Sdr_Valve(size_t sizeof_stream_item,
uint64_t nitems, uint64_t nitems,
gr::msg_queue::sptr queue, gr::msg_queue::sptr queue,
bool stop_flowgraph) : gr::sync_block("valve", bool stop_flowgraph) : gr::sync_block("valve",
@ -56,25 +56,25 @@ gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, gr::msg_queue::sptr queue, bool stop_flowgraph) boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, gr::msg_queue::sptr queue, bool stop_flowgraph)
{ {
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, std::move(queue), stop_flowgraph)); boost::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), stop_flowgraph));
return valve_; return valve_;
} }
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, gr::msg_queue::sptr queue) boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, gr::msg_queue::sptr queue)
{ {
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, std::move(queue), true)); boost::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), true));
return valve_; return valve_;
} }
void gnss_sdr_valve::open_valve() void Gnss_Sdr_Valve::open_valve()
{ {
d_open_valve = true; d_open_valve = true;
} }
int gnss_sdr_valve::work(int noutput_items, int Gnss_Sdr_Valve::work(int noutput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items) gr_vector_void_star &output_items)
{ {

View File

@ -52,7 +52,7 @@ boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
* \brief Implementation of a GNU Radio block that sends a STOP message to the * \brief Implementation of a GNU Radio block that sends a STOP message to the
* control queue right after a specific number of samples have passed through it. * control queue right after a specific number of samples have passed through it.
*/ */
class gnss_sdr_valve : public gr::sync_block class Gnss_Sdr_Valve : public gr::sync_block
{ {
friend boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, friend boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item,
uint64_t nitems, uint64_t nitems,
@ -69,7 +69,7 @@ class gnss_sdr_valve : public gr::sync_block
bool d_open_valve; bool d_open_valve;
public: public:
gnss_sdr_valve(size_t sizeof_stream_item, Gnss_Sdr_Valve(size_t sizeof_stream_item,
uint64_t nitems, uint64_t nitems,
gr::msg_queue::sptr queue, bool stop_flowgraph); gr::msg_queue::sptr queue, bool stop_flowgraph);
void open_valve(); void open_valve();

View File

@ -37,13 +37,13 @@
using boost::asio::ip::tcp; using boost::asio::ip::tcp;
rtl_tcp_dongle_info::rtl_tcp_dongle_info() : tuner_type_(0), tuner_gain_count_(0) Rtl_Tcp_Dongle_Info::Rtl_Tcp_Dongle_Info() : tuner_type_(0), tuner_gain_count_(0)
{ {
std::memset(magic_, 0, sizeof(magic_)); std::memset(magic_, 0, sizeof(magic_));
} }
boost::system::error_code rtl_tcp_dongle_info::read(boost::asio::ip::tcp::socket &socket) boost::system::error_code Rtl_Tcp_Dongle_Info::read(boost::asio::ip::tcp::socket &socket)
{ {
boost::system::error_code ec; boost::system::error_code ec;
@ -67,7 +67,7 @@ boost::system::error_code rtl_tcp_dongle_info::read(boost::asio::ip::tcp::socket
} }
const char *rtl_tcp_dongle_info::get_type_name() const const char *Rtl_Tcp_Dongle_Info::get_type_name() const
{ {
switch (get_tuner_type()) switch (get_tuner_type())
{ {
@ -89,7 +89,7 @@ const char *rtl_tcp_dongle_info::get_type_name() const
} }
double rtl_tcp_dongle_info::clip_gain(int gain) const double Rtl_Tcp_Dongle_Info::clip_gain(int gain) const
{ {
// the following gain values have been copied from librtlsdr // the following gain values have been copied from librtlsdr
// all gain values are expressed in tenths of a dB // all gain values are expressed in tenths of a dB
@ -146,7 +146,7 @@ double rtl_tcp_dongle_info::clip_gain(int gain) const
} }
bool rtl_tcp_dongle_info::is_valid() const bool Rtl_Tcp_Dongle_Info::is_valid() const
{ {
return std::memcmp(magic_, "RTL0", 4) == 0; return std::memcmp(magic_, "RTL0", 4) == 0;
} }

View File

@ -39,7 +39,7 @@
* \brief This class represents the dongle information * \brief This class represents the dongle information
* which is sent by rtl_tcp. * which is sent by rtl_tcp.
*/ */
class rtl_tcp_dongle_info class Rtl_Tcp_Dongle_Info
{ {
private: private:
char magic_[4]{}; char magic_[4]{};
@ -58,7 +58,7 @@ public:
TUNER_R828D TUNER_R828D
}; };
rtl_tcp_dongle_info(); Rtl_Tcp_Dongle_Info();
boost::system::error_code read(boost::asio::ip::tcp::socket &socket); boost::system::error_code read(boost::asio::ip::tcp::socket &socket);

View File

@ -88,8 +88,8 @@ galileo_telemetry_decoder_cc::galileo_telemetry_decoder_cc(
{ {
case 1: // INAV case 1: // INAV
{ {
d_PRN_code_period_ms = static_cast<uint32_t>(GALILEO_E1_CODE_PERIOD_MS); d_PRN_code_period_ms = static_cast<uint32_t>(GALILEO_E5A_CODE_PERIOD_MS);
d_samples_per_symbol = Galileo_E1_B_SAMPLES_PER_SYMBOL; d_samples_per_symbol = GALILEO_E1_B_SAMPLES_PER_SYMBOL;
d_bits_per_preamble = GALILEO_INAV_PREAMBLE_LENGTH_BITS; d_bits_per_preamble = GALILEO_INAV_PREAMBLE_LENGTH_BITS;
// set the preamble // set the preamble
d_samples_per_preamble = GALILEO_INAV_PREAMBLE_LENGTH_BITS * d_samples_per_symbol; d_samples_per_preamble = GALILEO_INAV_PREAMBLE_LENGTH_BITS * d_samples_per_symbol;
@ -105,7 +105,7 @@ galileo_telemetry_decoder_cc::galileo_telemetry_decoder_cc(
} }
case 2: // FNAV case 2: // FNAV
{ {
d_PRN_code_period_ms = static_cast<uint32_t>(GALILEO_E5a_CODE_PERIOD_MS); d_PRN_code_period_ms = static_cast<uint32_t>(GALILEO_E5A_CODE_PERIOD_MS);
d_samples_per_symbol = GALILEO_FNAV_CODES_PER_SYMBOL; d_samples_per_symbol = GALILEO_FNAV_CODES_PER_SYMBOL;
d_bits_per_preamble = GALILEO_FNAV_PREAMBLE_LENGTH_BITS; d_bits_per_preamble = GALILEO_FNAV_PREAMBLE_LENGTH_BITS;
// set the preamble // set the preamble
@ -114,13 +114,13 @@ galileo_telemetry_decoder_cc::galileo_telemetry_decoder_cc(
d_required_symbols = static_cast<uint32_t>(GALILEO_FNAV_SYMBOLS_PER_PAGE) * d_samples_per_symbol + d_samples_per_preamble; d_required_symbols = static_cast<uint32_t>(GALILEO_FNAV_SYMBOLS_PER_PAGE) * d_samples_per_symbol + d_samples_per_preamble;
// preamble bits to sampled symbols // preamble bits to sampled symbols
d_preamble_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment())); d_preamble_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(d_samples_per_preamble * sizeof(int32_t), volk_gnsssdr_get_alignment()));
d_secondary_code_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(Galileo_E5a_I_SECONDARY_CODE_LENGTH * sizeof(int32_t), volk_gnsssdr_get_alignment())); d_secondary_code_samples = static_cast<int32_t *>(volk_gnsssdr_malloc(GALILEO_E5A_I_SECONDARY_CODE_LENGTH * sizeof(int32_t), volk_gnsssdr_get_alignment()));
d_frame_length_symbols = GALILEO_FNAV_SYMBOLS_PER_PAGE - GALILEO_FNAV_PREAMBLE_LENGTH_BITS; d_frame_length_symbols = GALILEO_FNAV_SYMBOLS_PER_PAGE - GALILEO_FNAV_PREAMBLE_LENGTH_BITS;
CodeLength = GALILEO_FNAV_SYMBOLS_PER_PAGE - GALILEO_FNAV_PREAMBLE_LENGTH_BITS; CodeLength = GALILEO_FNAV_SYMBOLS_PER_PAGE - GALILEO_FNAV_PREAMBLE_LENGTH_BITS;
DataLength = (CodeLength / nn) - mm; DataLength = (CodeLength / nn) - mm;
for (int32_t i = 0; i < Galileo_E5a_I_SECONDARY_CODE_LENGTH; i++) for (int32_t i = 0; i < GALILEO_E5A_I_SECONDARY_CODE_LENGTH; i++)
{ {
if (Galileo_E5a_I_SECONDARY_CODE.at(i) == '1') if (GALILEO_E5A_I_SECONDARY_CODE.at(i) == '1')
{ {
d_secondary_code_samples[i] = 1; d_secondary_code_samples[i] = 1;
} }
@ -183,7 +183,7 @@ galileo_telemetry_decoder_cc::galileo_telemetry_decoder_cc(
d_preamble_samples[n] = d_secondary_code_samples[m]; d_preamble_samples[n] = d_secondary_code_samples[m];
n++; n++;
m++; m++;
m = m % Galileo_E5a_I_SECONDARY_CODE_LENGTH; m = m % GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
} }
} }
else else
@ -193,7 +193,7 @@ galileo_telemetry_decoder_cc::galileo_telemetry_decoder_cc(
d_preamble_samples[n] = -d_secondary_code_samples[m]; d_preamble_samples[n] = -d_secondary_code_samples[m];
n++; n++;
m++; m++;
m = m % Galileo_E5a_I_SECONDARY_CODE_LENGTH; m = m % GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
} }
} }
break; break;
@ -563,7 +563,7 @@ int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
{ {
d_page_part_symbols[i] += static_cast<float>(d_secondary_code_samples[k]) * d_symbol_history.at(i * d_samples_per_symbol + d_samples_per_preamble + m); // because last symbol of the preamble is just received now! d_page_part_symbols[i] += static_cast<float>(d_secondary_code_samples[k]) * d_symbol_history.at(i * d_samples_per_symbol + d_samples_per_preamble + m); // because last symbol of the preamble is just received now!
k++; k++;
k = k % Galileo_E5a_I_SECONDARY_CODE_LENGTH; k = k % GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
} }
} }
} }
@ -577,7 +577,7 @@ int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
{ {
d_page_part_symbols[i] -= static_cast<float>(d_secondary_code_samples[k]) * d_symbol_history.at(i * d_samples_per_symbol + d_samples_per_preamble + m); // because last symbol of the preamble is just received now! d_page_part_symbols[i] -= static_cast<float>(d_secondary_code_samples[k]) * d_symbol_history.at(i * d_samples_per_symbol + d_samples_per_preamble + m); // because last symbol of the preamble is just received now!
k++; k++;
k = k % Galileo_E5a_I_SECONDARY_CODE_LENGTH; k = k % GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
} }
} }
} }
@ -634,7 +634,7 @@ int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
{ {
// TOW_5 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later plus the decoding delay // TOW_5 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later plus the decoding delay
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_inav_nav.TOW_5 * 1000.0); d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_inav_nav.TOW_5 * 1000.0);
d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>(GALILEO_INAV_PAGE_PART_MS + (d_required_symbols + 1) * GALILEO_E1_CODE_PERIOD_MS); d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>(GALILEO_INAV_PAGE_PART_MS + (d_required_symbols + 1) * GALILEO_E5A_CODE_PERIOD_MS);
d_inav_nav.flag_TOW_5 = false; d_inav_nav.flag_TOW_5 = false;
} }
@ -642,13 +642,13 @@ int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
{ {
// TOW_6 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later plus the decoding delay // TOW_6 refers to the even preamble, but when we decode it we are in the odd part, so 1 second later plus the decoding delay
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_inav_nav.TOW_6 * 1000.0); d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_inav_nav.TOW_6 * 1000.0);
d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>(GALILEO_INAV_PAGE_PART_MS + (d_required_symbols + 1) * GALILEO_E1_CODE_PERIOD_MS); d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>(GALILEO_INAV_PAGE_PART_MS + (d_required_symbols + 1) * GALILEO_E5A_CODE_PERIOD_MS);
d_inav_nav.flag_TOW_6 = false; d_inav_nav.flag_TOW_6 = false;
} }
else else
{ {
// this page has no timing information // this page has no timing information
d_TOW_at_current_symbol_ms += static_cast<uint32_t>(GALILEO_E1_CODE_PERIOD_MS); // + GALILEO_INAV_PAGE_PART_SYMBOLS*GALILEO_E1_CODE_PERIOD; d_TOW_at_current_symbol_ms += static_cast<uint32_t>(GALILEO_E5A_CODE_PERIOD_MS); // + GALILEO_INAV_PAGE_PART_SYMBOLS*GALILEO_E1_CODE_PERIOD;
} }
} }
break; break;
@ -660,7 +660,7 @@ int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
if (d_fnav_nav.flag_TOW_1 == true) if (d_fnav_nav.flag_TOW_1 == true)
{ {
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_fnav_nav.FNAV_TOW_1 * 1000.0); d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_fnav_nav.FNAV_TOW_1 * 1000.0);
d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) * GALILEO_E5a_CODE_PERIOD_MS); d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) * GALILEO_E5A_CODE_PERIOD_MS);
//d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((GALILEO_FNAV_CODES_PER_PAGE + GALILEO_FNAV_CODES_PER_PREAMBLE) * GALILEO_E5a_CODE_PERIOD_MS); //d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((GALILEO_FNAV_CODES_PER_PAGE + GALILEO_FNAV_CODES_PER_PREAMBLE) * GALILEO_E5a_CODE_PERIOD_MS);
d_fnav_nav.flag_TOW_1 = false; d_fnav_nav.flag_TOW_1 = false;
} }
@ -668,26 +668,26 @@ int galileo_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
{ {
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_fnav_nav.FNAV_TOW_2 * 1000.0); d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_fnav_nav.FNAV_TOW_2 * 1000.0);
//d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((GALILEO_FNAV_CODES_PER_PAGE + GALILEO_FNAV_CODES_PER_PREAMBLE) * GALILEO_E5a_CODE_PERIOD_MS); //d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((GALILEO_FNAV_CODES_PER_PAGE + GALILEO_FNAV_CODES_PER_PREAMBLE) * GALILEO_E5a_CODE_PERIOD_MS);
d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) * GALILEO_E5a_CODE_PERIOD_MS); d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) * GALILEO_E5A_CODE_PERIOD_MS);
d_fnav_nav.flag_TOW_2 = false; d_fnav_nav.flag_TOW_2 = false;
} }
else if (d_fnav_nav.flag_TOW_3 == true) else if (d_fnav_nav.flag_TOW_3 == true)
{ {
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_fnav_nav.FNAV_TOW_3 * 1000.0); d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_fnav_nav.FNAV_TOW_3 * 1000.0);
//d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((GALILEO_FNAV_CODES_PER_PAGE + GALILEO_FNAV_CODES_PER_PREAMBLE) * GALILEO_E5a_CODE_PERIOD_MS); //d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((GALILEO_FNAV_CODES_PER_PAGE + GALILEO_FNAV_CODES_PER_PREAMBLE) * GALILEO_E5a_CODE_PERIOD_MS);
d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) * GALILEO_E5a_CODE_PERIOD_MS); d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) * GALILEO_E5A_CODE_PERIOD_MS);
d_fnav_nav.flag_TOW_3 = false; d_fnav_nav.flag_TOW_3 = false;
} }
else if (d_fnav_nav.flag_TOW_4 == true) else if (d_fnav_nav.flag_TOW_4 == true)
{ {
d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_fnav_nav.FNAV_TOW_4 * 1000.0); d_TOW_at_Preamble_ms = static_cast<uint32_t>(d_fnav_nav.FNAV_TOW_4 * 1000.0);
//d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((GALILEO_FNAV_CODES_PER_PAGE + GALILEO_FNAV_CODES_PER_PREAMBLE) * GALILEO_E5a_CODE_PERIOD_MS); //d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((GALILEO_FNAV_CODES_PER_PAGE + GALILEO_FNAV_CODES_PER_PREAMBLE) * GALILEO_E5a_CODE_PERIOD_MS);
d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) * GALILEO_E5a_CODE_PERIOD_MS); d_TOW_at_current_symbol_ms = d_TOW_at_Preamble_ms + static_cast<uint32_t>((d_required_symbols + 1) * GALILEO_E5A_CODE_PERIOD_MS);
d_fnav_nav.flag_TOW_4 = false; d_fnav_nav.flag_TOW_4 = false;
} }
else else
{ {
d_TOW_at_current_symbol_ms += static_cast<uint32_t>(GALILEO_E5a_CODE_PERIOD_MS); d_TOW_at_current_symbol_ms += static_cast<uint32_t>(GALILEO_E5A_CODE_PERIOD_MS);
} }
break; break;
} }

View File

@ -68,9 +68,9 @@ gps_l5_telemetry_decoder_cc::gps_l5_telemetry_decoder_cc(
d_TOW_at_Preamble_ms = 0U; d_TOW_at_Preamble_ms = 0U;
// initialize the CNAV frame decoder (libswiftcnav) // initialize the CNAV frame decoder (libswiftcnav)
cnav_msg_decoder_init(&d_cnav_decoder); cnav_msg_decoder_init(&d_cnav_decoder);
for (int32_t aux = 0; aux < GPS_L5i_NH_CODE_LENGTH; aux++) for (int32_t aux = 0; aux < GPS_L5I_NH_CODE_LENGTH; aux++)
{ {
if (GPS_L5i_NH_CODE[aux] == 0) if (GPS_L5I_NH_CODE[aux] == 0)
{ {
bits_NH[aux] = -1.0; bits_NH[aux] = -1.0;
} }
@ -154,9 +154,9 @@ int gps_l5_telemetry_decoder_cc::general_work(int noutput_items __attribute__((u
int32_t symbol_value = 0; int32_t symbol_value = 0;
// Search correlation with Neuman-Hofman Code (see IS-GPS-705D) // Search correlation with Neuman-Hofman Code (see IS-GPS-705D)
if (sym_hist.size() == GPS_L5i_NH_CODE_LENGTH) if (sym_hist.size() == GPS_L5I_NH_CODE_LENGTH)
{ {
for (int32_t i = 0; i < GPS_L5i_NH_CODE_LENGTH; i++) for (int32_t i = 0; i < GPS_L5I_NH_CODE_LENGTH; i++)
{ {
if ((bits_NH[i] * sym_hist.at(i)) > 0.0) if ((bits_NH[i] * sym_hist.at(i)) > 0.0)
{ {
@ -167,7 +167,7 @@ int gps_l5_telemetry_decoder_cc::general_work(int noutput_items __attribute__((u
corr_NH -= 1; corr_NH -= 1;
} }
} }
if (abs(corr_NH) == GPS_L5i_NH_CODE_LENGTH) if (abs(corr_NH) == GPS_L5I_NH_CODE_LENGTH)
{ {
sync_NH = true; sync_NH = true;
if (corr_NH > 0) if (corr_NH > 0)
@ -241,12 +241,12 @@ int gps_l5_telemetry_decoder_cc::general_work(int noutput_items __attribute__((u
// delay by the formulae: // delay by the formulae:
// \code // \code
// symbolTime_ms = msg->tow * 6000 + *pdelay * 10 + (12 * 10); 12 symbols of the encoder's transitory // symbolTime_ms = msg->tow * 6000 + *pdelay * 10 + (12 * 10); 12 symbols of the encoder's transitory
d_TOW_at_current_symbol_ms = msg.tow * 6000 + (delay + 12) * GPS_L5i_SYMBOL_PERIOD_MS; d_TOW_at_current_symbol_ms = msg.tow * 6000 + (delay + 12) * GPS_L5I_SYMBOL_PERIOD_MS;
d_flag_valid_word = true; d_flag_valid_word = true;
} }
else else
{ {
d_TOW_at_current_symbol_ms += GPS_L5i_PERIOD_MS; d_TOW_at_current_symbol_ms += GPS_L5I_PERIOD_MS;
if (current_synchro_data.Flag_valid_symbol_output == false) if (current_synchro_data.Flag_valid_symbol_output == false)
{ {
d_flag_valid_word = false; d_flag_valid_word = false;

View File

@ -90,7 +90,7 @@ private:
bool d_flag_valid_word; bool d_flag_valid_word;
Gps_CNAV_Navigation_Message d_CNAV_Message; Gps_CNAV_Navigation_Message d_CNAV_Message;
double bits_NH[GPS_L5i_NH_CODE_LENGTH]{}; double bits_NH[GPS_L5I_NH_CODE_LENGTH]{};
std::deque<double> sym_hist; std::deque<double> sym_hist;
bool sync_NH; bool sync_NH;
bool new_sym; bool new_sym;

View File

@ -64,7 +64,7 @@ sbas_l1_telemetry_decoder_cc::sbas_l1_telemetry_decoder_cc(
d_dump = dump; d_dump = dump;
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN()); d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
LOG(INFO) << "SBAS L1 TELEMETRY PROCESSING: satellite " << d_satellite; LOG(INFO) << "SBAS L1 TELEMETRY PROCESSING: satellite " << d_satellite;
d_block_size = d_samples_per_symbol * d_symbols_per_bit * d_block_size_in_bits; d_block_size = D_SAMPLES_PER_SYMBOL * D_SYMBOLS_PER_BIT * D_BLOCK_SIZE_IN_BITS;
d_channel = 0; d_channel = 0;
set_output_multiple(1); set_output_multiple(1);
} }
@ -101,7 +101,7 @@ void sbas_l1_telemetry_decoder_cc::set_channel(int32_t channel)
// ### helper class for sample alignment ### // ### helper class for sample alignment ###
sbas_l1_telemetry_decoder_cc::sample_aligner::sample_aligner() sbas_l1_telemetry_decoder_cc::Sample_Aligner::Sample_Aligner()
{ {
d_n_smpls_in_history = 3; d_n_smpls_in_history = 3;
d_iir_par = 0.05; d_iir_par = 0.05;
@ -109,10 +109,10 @@ sbas_l1_telemetry_decoder_cc::sample_aligner::sample_aligner()
} }
sbas_l1_telemetry_decoder_cc::sample_aligner::~sample_aligner() = default; sbas_l1_telemetry_decoder_cc::Sample_Aligner::~Sample_Aligner() = default;
void sbas_l1_telemetry_decoder_cc::sample_aligner::reset() void sbas_l1_telemetry_decoder_cc::Sample_Aligner::reset()
{ {
d_past_sample = 0; d_past_sample = 0;
d_corr_paired = 0; d_corr_paired = 0;
@ -124,7 +124,7 @@ void sbas_l1_telemetry_decoder_cc::sample_aligner::reset()
/* /*
* samples length must be a multiple of two * samples length must be a multiple of two
*/ */
bool sbas_l1_telemetry_decoder_cc::sample_aligner::get_symbols(const std::vector<double> &samples, std::vector<double> &symbols) bool sbas_l1_telemetry_decoder_cc::Sample_Aligner::get_symbols(const std::vector<double> &samples, std::vector<double> &symbols)
{ {
double smpls[3] = {}; double smpls[3] = {};
double corr_diff; double corr_diff;
@ -134,12 +134,12 @@ bool sbas_l1_telemetry_decoder_cc::sample_aligner::get_symbols(const std::vector
VLOG(FLOW) << "get_symbols(): " VLOG(FLOW) << "get_symbols(): "
<< "d_past_sample=" << d_past_sample << "\tsamples size=" << samples.size(); << "d_past_sample=" << d_past_sample << "\tsamples size=" << samples.size();
for (uint32_t i_sym = 0; i_sym < samples.size() / sbas_l1_telemetry_decoder_cc::d_samples_per_symbol; i_sym++) for (uint32_t i_sym = 0; i_sym < samples.size() / sbas_l1_telemetry_decoder_cc::D_SAMPLES_PER_SYMBOL; i_sym++)
{ {
// get the next samples // get the next samples
for (int32_t i = 0; i < d_n_smpls_in_history; i++) for (int32_t i = 0; i < d_n_smpls_in_history; i++)
{ {
smpls[i] = static_cast<int32_t>(i_sym) * sbas_l1_telemetry_decoder_cc::d_samples_per_symbol + i - 1 == -1 ? d_past_sample : samples[i_sym * sbas_l1_telemetry_decoder_cc::d_samples_per_symbol + i - 1]; smpls[i] = static_cast<int32_t>(i_sym) * sbas_l1_telemetry_decoder_cc::D_SAMPLES_PER_SYMBOL + i - 1 == -1 ? d_past_sample : samples[i_sym * sbas_l1_telemetry_decoder_cc::D_SAMPLES_PER_SYMBOL + i - 1];
} }
// update the pseudo correlations (IIR method) of the two possible alignments // update the pseudo correlations (IIR method) of the two possible alignments
@ -182,7 +182,7 @@ bool sbas_l1_telemetry_decoder_cc::sample_aligner::get_symbols(const std::vector
// ### helper class for symbol alignment and viterbi decoding ### // ### helper class for symbol alignment and viterbi decoding ###
sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::symbol_aligner_and_decoder() sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::Symbol_Aligner_And_Decoder()
{ {
// convolutional code properties // convolutional code properties
d_KK = 7; d_KK = 7;
@ -197,14 +197,14 @@ sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::symbol_aligner_and_dec
} }
sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::~symbol_aligner_and_decoder() sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::~Symbol_Aligner_And_Decoder()
{ {
delete d_vd1; delete d_vd1;
delete d_vd2; delete d_vd2;
} }
void sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::reset() void sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::reset()
{ {
d_past_symbol = 0; d_past_symbol = 0;
d_vd1->reset(); d_vd1->reset();
@ -212,10 +212,10 @@ void sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::reset()
} }
bool sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::get_bits(const std::vector<double> &symbols, std::vector<int32_t> &bits) bool sbas_l1_telemetry_decoder_cc::Symbol_Aligner_And_Decoder::get_bits(const std::vector<double> &symbols, std::vector<int32_t> &bits)
{ {
const int32_t traceback_depth = 5 * d_KK; const int32_t traceback_depth = 5 * d_KK;
int32_t nbits_requested = symbols.size() / d_symbols_per_bit; int32_t nbits_requested = symbols.size() / D_SYMBOLS_PER_BIT;
int32_t nbits_decoded; int32_t nbits_decoded;
// fill two vectors with the two possible symbol alignments // fill two vectors with the two possible symbol alignments
std::vector<double> symbols_vd1(symbols); // aligned symbol vector -> copy input symbol vector std::vector<double> symbols_vd1(symbols); // aligned symbol vector -> copy input symbol vector
@ -251,13 +251,13 @@ bool sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::get_bits(const st
// ### helper class for detecting the preamble and collect the corresponding message candidates ### // ### helper class for detecting the preamble and collect the corresponding message candidates ###
void sbas_l1_telemetry_decoder_cc::frame_detector::reset() void sbas_l1_telemetry_decoder_cc::Frame_Detector::reset()
{ {
d_buffer.clear(); d_buffer.clear();
} }
void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const std::vector<int32_t> &bits, std::vector<std::pair<int32_t, std::vector<int32_t>>> &msg_candidates) void sbas_l1_telemetry_decoder_cc::Frame_Detector::get_frame_candidates(const std::vector<int32_t> &bits, std::vector<std::pair<int32_t, std::vector<int32_t>>> &msg_candidates)
{ {
std::stringstream ss; std::stringstream ss;
uint32_t sbas_msg_length = 250; uint32_t sbas_msg_length = 250;
@ -321,12 +321,12 @@ void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const st
// ### helper class for checking the CRC of the message candidates ### // ### helper class for checking the CRC of the message candidates ###
void sbas_l1_telemetry_decoder_cc::crc_verifier::reset() void sbas_l1_telemetry_decoder_cc::Crc_Verifier::reset()
{ {
} }
void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs) void sbas_l1_telemetry_decoder_cc::Crc_Verifier::get_valid_frames(const std::vector<msg_candiate_int_t> &msg_candidates, std::vector<msg_candiate_char_t> &valid_msgs)
{ {
std::stringstream ss; std::stringstream ss;
VLOG(FLOW) << "get_valid_frames(): " VLOG(FLOW) << "get_valid_frames(): "
@ -364,7 +364,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vec
} }
void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_bytes(const std::vector<int> &msg_candidate, std::vector<uint8_t> &bytes) void sbas_l1_telemetry_decoder_cc::Crc_Verifier::zerropad_back_and_convert_to_bytes(const std::vector<int> &msg_candidate, std::vector<uint8_t> &bytes)
{ {
std::stringstream ss; std::stringstream ss;
const size_t bits_per_byte = 8; const size_t bits_per_byte = 8;
@ -391,7 +391,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_by
} }
void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_bytes(const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes) void sbas_l1_telemetry_decoder_cc::Crc_Verifier::zerropad_front_and_convert_to_bytes(const std::vector<int32_t> &msg_candidate, std::vector<uint8_t> &bytes)
{ {
std::stringstream ss; std::stringstream ss;
const size_t bits_per_byte = 8; const size_t bits_per_byte = 8;
@ -466,7 +466,7 @@ int sbas_l1_telemetry_decoder_cc::general_work(int noutput_items __attribute__((
for (const auto &valid_msg : valid_msgs) for (const auto &valid_msg : valid_msgs)
{ {
int32_t message_sample_offset = int32_t message_sample_offset =
(sample_alignment ? 0 : -1) + d_samples_per_symbol * (symbol_alignment ? -1 : 0) + d_samples_per_symbol * d_symbols_per_bit * valid_msg.first; (sample_alignment ? 0 : -1) + D_SAMPLES_PER_SYMBOL * (symbol_alignment ? -1 : 0) + D_SAMPLES_PER_SYMBOL * D_SYMBOLS_PER_BIT * valid_msg.first;
double message_sample_stamp = sample_stamp + static_cast<double>(message_sample_offset) / 1000.0; double message_sample_stamp = sample_stamp + static_cast<double>(message_sample_offset) / 1000.0;
VLOG(EVENT) << "message_sample_stamp=" << message_sample_stamp VLOG(EVENT) << "message_sample_stamp=" << message_sample_stamp
<< " (sample_stamp=" << sample_stamp << " (sample_stamp=" << sample_stamp

View File

@ -76,9 +76,9 @@ private:
void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits); void viterbi_decoder(double *page_part_symbols, int32_t *page_part_bits);
void align_samples(); void align_samples();
static const int32_t d_samples_per_symbol = 2; static const int32_t D_SAMPLES_PER_SYMBOL = 2;
static const int32_t d_symbols_per_bit = 2; static const int32_t D_SYMBOLS_PER_BIT = 2;
static const int32_t d_block_size_in_bits = 30; static const int32_t D_BLOCK_SIZE_IN_BITS = 30;
bool d_dump; bool d_dump;
Gnss_Satellite d_satellite; Gnss_Satellite d_satellite;
@ -94,11 +94,11 @@ private:
typedef std::pair<int32_t, std::vector<uint8_t>> msg_candiate_char_t; typedef std::pair<int32_t, std::vector<uint8_t>> msg_candiate_char_t;
// helper class for sample alignment // helper class for sample alignment
class sample_aligner class Sample_Aligner
{ {
public: public:
sample_aligner(); Sample_Aligner();
~sample_aligner(); ~Sample_Aligner();
void reset(); void reset();
/* /*
* samples length must be a multiple of two * samples length must be a multiple of two
@ -116,11 +116,11 @@ private:
} d_sample_aligner; } d_sample_aligner;
// helper class for symbol alignment and Viterbi decoding // helper class for symbol alignment and Viterbi decoding
class symbol_aligner_and_decoder class Symbol_Aligner_And_Decoder
{ {
public: public:
symbol_aligner_and_decoder(); Symbol_Aligner_And_Decoder();
~symbol_aligner_and_decoder(); ~Symbol_Aligner_And_Decoder();
void reset(); void reset();
bool get_bits(const std::vector<double> &symbols, std::vector<int32_t> &bits); bool get_bits(const std::vector<double> &symbols, std::vector<int32_t> &bits);
@ -133,7 +133,7 @@ private:
// helper class for detecting the preamble and collect the corresponding message candidates // helper class for detecting the preamble and collect the corresponding message candidates
class frame_detector class Frame_Detector
{ {
public: public:
void reset(); void reset();
@ -145,7 +145,7 @@ private:
// helper class for checking the CRC of the message candidates // helper class for checking the CRC of the message candidates
class crc_verifier class Crc_Verifier
{ {
public: public:
void reset(); void reset();

View File

@ -34,7 +34,7 @@
#include <string.h> #include <string.h>
static const u8 bitn[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; static const u8 BITN[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
/** \defgroup bits Bit Utils /** \defgroup bits Bit Utils
* Bit field packing, unpacking and utility functions. * Bit field packing, unpacking and utility functions.
@ -249,7 +249,7 @@ u8 count_bits_u64(u64 v, u8 bv)
int i = 0; int i = 0;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
{ {
r += bitn[(v >> (i * 4)) & 0xf]; r += BITN[(v >> (i * 4)) & 0xf];
} }
return bv == 1 ? r : 64 - r; return bv == 1 ? r : 64 - r;
} }
@ -268,7 +268,7 @@ u8 count_bits_u32(u32 v, u8 bv)
int i = 0; int i = 0;
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
{ {
r += bitn[(v >> (i * 4)) & 0xf]; r += BITN[(v >> (i * 4)) & 0xf];
} }
return bv == 1 ? r : 32 - r; return bv == 1 ? r : 32 - r;
} }
@ -287,7 +287,7 @@ u8 count_bits_u16(u16 v, u8 bv)
int i = 0; int i = 0;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
r += bitn[(v >> (i * 4)) & 0xf]; r += BITN[(v >> (i * 4)) & 0xf];
} }
return bv == 1 ? r : 16 - r; return bv == 1 ? r : 16 - r;
} }
@ -306,7 +306,7 @@ u8 count_bits_u8(u8 v, u8 bv)
int i = 0; int i = 0;
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
{ {
r += bitn[(v >> (i * 4)) & 0xf]; r += BITN[(v >> (i * 4)) & 0xf];
} }
return bv == 1 ? r : 8 - r; return bv == 1 ? r : 8 - r;
} }

View File

@ -39,7 +39,7 @@
* Cyclic redundancy checks. * Cyclic redundancy checks.
* \{ */ * \{ */
static const u32 crc24qtab[256] = { static const u32 CRC24QTAB[256] = {
0x000000, 0x864CFB, 0x8AD50D, 0x0C99F6, 0x93E6E1, 0x15AA1A, 0x1933EC, 0x9F7F17, 0x000000, 0x864CFB, 0x8AD50D, 0x0C99F6, 0x93E6E1, 0x15AA1A, 0x1933EC, 0x9F7F17,
0xA18139, 0x27CDC2, 0x2B5434, 0xAD18CF, 0x3267D8, 0xB42B23, 0xB8B2D5, 0x3EFE2E, 0xA18139, 0x27CDC2, 0x2B5434, 0xAD18CF, 0x3267D8, 0xB42B23, 0xB8B2D5, 0x3EFE2E,
0xC54E89, 0x430272, 0x4F9B84, 0xC9D77F, 0x56A868, 0xD0E493, 0xDC7D65, 0x5A319E, 0xC54E89, 0x430272, 0x4F9B84, 0xC9D77F, 0x56A868, 0xD0E493, 0xDC7D65, 0x5A319E,
@ -93,7 +93,7 @@ u32 crc24q(const u8 *buf, u32 len, u32 crc)
u32 i = 0; u32 i = 0;
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
crc = ((crc << 8) & 0xFFFFFF) ^ crc24qtab[((crc >> 16) ^ buf[i]) & 0xff]; crc = ((crc << 8) & 0xFFFFFF) ^ CRC24QTAB[((crc >> 16) ^ buf[i]) & 0xff];
} }
return crc; return crc;
} }
@ -128,7 +128,7 @@ u32 crc24q_bits(u32 crc, const u8 *buf, u32 n_bits, bool invert)
acc ^= 0xFFu; acc ^= 0xFFu;
} }
b = (acc >> shift) & 0xFFu; b = (acc >> shift) & 0xFFu;
crc = ((crc << 8) & 0xFFFFFFu) ^ crc24qtab[((crc >> 16) ^ b) & 0xFFu]; crc = ((crc << 8) & 0xFFFFFFu) ^ CRC24QTAB[((crc >> 16) ^ b) & 0xFFu];
} }
acc = (acc << 8) | *buf; acc = (acc << 8) | *buf;
if (invert) if (invert)
@ -136,7 +136,7 @@ u32 crc24q_bits(u32 crc, const u8 *buf, u32 n_bits, bool invert)
acc ^= 0xFFu; acc ^= 0xFFu;
} }
b = (acc >> shift) & 0xFFu; b = (acc >> shift) & 0xFFu;
crc = ((crc << 8) & 0xFFFFFFu) ^ crc24qtab[((crc >> 16) ^ b) & 0xFFu]; crc = ((crc << 8) & 0xFFFFFFu) ^ CRC24QTAB[((crc >> 16) ^ b) & 0xFFu];
return crc; return crc;
} }

View File

@ -117,7 +117,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking(
} }
trk_param.track_pilot = track_pilot; trk_param.track_pilot = track_pilot;
trk_param.extend_correlation_symbols = extend_correlation_symbols; trk_param.extend_correlation_symbols = extend_correlation_symbols;
int vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); int vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
trk_param.vector_length = vector_length; trk_param.vector_length = vector_length;
trk_param.system = 'E'; trk_param.system = 'E';
char sig_[3] = "1B"; char sig_[3] = "1B";

View File

@ -82,7 +82,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking(
port_ch0 = configuration->property(role + ".port_ch0", 2060); port_ch0 = configuration->property(role + ".port_ch0", 2060);
std::string default_dump_filename = "./track_ch"; std::string default_dump_filename = "./track_ch";
dump_filename = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); vector_length = std::round(fs_in / (GALILEO_E1_CODE_CHIP_RATE_HZ / GALILEO_E1_B_CODE_LENGTH_CHIPS));
//################# MAKE TRACKING GNURadio object ################### //################# MAKE TRACKING GNURadio object ###################
if (item_type == "gr_complex") if (item_type == "gr_complex")

View File

@ -93,7 +93,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz; trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
trk_param.early_late_space_chips = early_late_space_chips; trk_param.early_late_space_chips = early_late_space_chips;
int vector_length = std::round(fs_in / (Galileo_E5a_CODE_CHIP_RATE_HZ / Galileo_E5a_CODE_LENGTH_CHIPS)); int vector_length = std::round(fs_in / (GALILEO_E5A_CODE_CHIP_RATE_HZ / GALILEO_E5A_CODE_LENGTH_CHIPS));
trk_param.vector_length = vector_length; trk_param.vector_length = vector_length;
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15); float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
@ -104,9 +104,9 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking(
extend_correlation_symbols = 1; extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
} }
else if (!track_pilot and extend_correlation_symbols > Galileo_E5a_I_SECONDARY_CODE_LENGTH) else if (!track_pilot and extend_correlation_symbols > GALILEO_E5A_I_SECONDARY_CODE_LENGTH)
{ {
extend_correlation_symbols = Galileo_E5a_I_SECONDARY_CODE_LENGTH; extend_correlation_symbols = GALILEO_E5A_I_SECONDARY_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: Galileo E5a. extend_correlation_symbols must be lower than 21 when tracking the data component. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
} }
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))

View File

@ -93,7 +93,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz; trk_param.dll_bw_narrow_hz = dll_bw_narrow_hz;
float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5); float early_late_space_chips = configuration->property(role + ".early_late_space_chips", 0.5);
trk_param.early_late_space_chips = early_late_space_chips; trk_param.early_late_space_chips = early_late_space_chips;
int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5i_CODE_RATE_HZ) / static_cast<double>(GPS_L5i_CODE_LENGTH_CHIPS))); int vector_length = std::round(static_cast<double>(fs_in) / (static_cast<double>(GPS_L5I_CODE_RATE_HZ) / static_cast<double>(GPS_L5I_CODE_LENGTH_CHIPS)));
trk_param.vector_length = vector_length; trk_param.vector_length = vector_length;
int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1); int extend_correlation_symbols = configuration->property(role + ".extend_correlation_symbols", 1);
float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15); float early_late_space_narrow_chips = configuration->property(role + ".early_late_space_narrow_chips", 0.15);
@ -104,9 +104,9 @@ GpsL5DllPllTracking::GpsL5DllPllTracking(
extend_correlation_symbols = 1; extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
} }
else if (!track_pilot and extend_correlation_symbols > GPS_L5i_NH_CODE_LENGTH) else if (!track_pilot and extend_correlation_symbols > GPS_L5I_NH_CODE_LENGTH)
{ {
extend_correlation_symbols = GPS_L5i_NH_CODE_LENGTH; extend_correlation_symbols = GPS_L5I_NH_CODE_LENGTH;
std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl; std::cout << TEXT_RED << "WARNING: GPS L5. extend_correlation_symbols must be lower than 11 when tracking the data component. Coherent integration has been set to 10 symbols (10 ms)" << TEXT_RESET << std::endl;
} }
if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz)) if ((extend_correlation_symbols > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))

View File

@ -173,24 +173,24 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
else if (signal_type == "L5") else if (signal_type == "L5")
{ {
d_signal_carrier_freq = GPS_L5_FREQ_HZ; d_signal_carrier_freq = GPS_L5_FREQ_HZ;
d_code_period = GPS_L5i_PERIOD; d_code_period = GPS_L5I_PERIOD;
d_code_chip_rate = GPS_L5i_CODE_RATE_HZ; d_code_chip_rate = GPS_L5I_CODE_RATE_HZ;
d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL; d_symbols_per_bit = GPS_L5_SAMPLES_PER_SYMBOL;
d_correlation_length_ms = 1; d_correlation_length_ms = 1;
d_code_samples_per_chip = 1; d_code_samples_per_chip = 1;
d_code_length_chips = static_cast<uint32_t>(GPS_L5i_CODE_LENGTH_CHIPS); d_code_length_chips = static_cast<uint32_t>(GPS_L5I_CODE_LENGTH_CHIPS);
d_secondary = true; d_secondary = true;
if (trk_parameters.track_pilot) if (trk_parameters.track_pilot)
{ {
d_secondary_code_length = static_cast<uint32_t>(GPS_L5q_NH_CODE_LENGTH); d_secondary_code_length = static_cast<uint32_t>(GPS_L5Q_NH_CODE_LENGTH);
d_secondary_code_string = const_cast<std::string *>(&GPS_L5q_NH_CODE_STR); d_secondary_code_string = const_cast<std::string *>(&GPS_L5Q_NH_CODE_STR);
signal_pretty_name = signal_pretty_name + "Q"; signal_pretty_name = signal_pretty_name + "Q";
interchange_iq = true; interchange_iq = true;
} }
else else
{ {
d_secondary_code_length = static_cast<uint32_t>(GPS_L5i_NH_CODE_LENGTH); d_secondary_code_length = static_cast<uint32_t>(GPS_L5I_NH_CODE_LENGTH);
d_secondary_code_string = const_cast<std::string *>(&GPS_L5i_NH_CODE_STR); d_secondary_code_string = const_cast<std::string *>(&GPS_L5I_NH_CODE_STR);
signal_pretty_name = signal_pretty_name + "I"; signal_pretty_name = signal_pretty_name + "I";
interchange_iq = false; interchange_iq = false;
} }
@ -214,10 +214,10 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
systemName = "Galileo"; systemName = "Galileo";
if (signal_type == "1B") if (signal_type == "1B")
{ {
d_signal_carrier_freq = Galileo_E1_FREQ_HZ; d_signal_carrier_freq = GALILEO_E1_FREQ_HZ;
d_code_period = Galileo_E1_CODE_PERIOD; d_code_period = GALILEO_E1_CODE_PERIOD;
d_code_chip_rate = Galileo_E1_CODE_CHIP_RATE_HZ; d_code_chip_rate = GALILEO_E1_CODE_CHIP_RATE_HZ;
d_code_length_chips = static_cast<uint32_t>(Galileo_E1_B_CODE_LENGTH_CHIPS); d_code_length_chips = static_cast<uint32_t>(GALILEO_E1_B_CODE_LENGTH_CHIPS);
d_symbols_per_bit = 1; d_symbols_per_bit = 1;
d_correlation_length_ms = 4; d_correlation_length_ms = 4;
d_code_samples_per_chip = 2; // CBOC disabled: 2 samples per chip. CBOC enabled: 12 samples per chip d_code_samples_per_chip = 2; // CBOC disabled: 2 samples per chip. CBOC enabled: 12 samples per chip
@ -225,8 +225,8 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
if (trk_parameters.track_pilot) if (trk_parameters.track_pilot)
{ {
d_secondary = true; d_secondary = true;
d_secondary_code_length = static_cast<uint32_t>(Galileo_E1_C_SECONDARY_CODE_LENGTH); d_secondary_code_length = static_cast<uint32_t>(GALILEO_E1_C_SECONDARY_CODE_LENGTH);
d_secondary_code_string = const_cast<std::string *>(&Galileo_E1_C_SECONDARY_CODE); d_secondary_code_string = const_cast<std::string *>(&GALILEO_E1_C_SECONDARY_CODE);
signal_pretty_name = signal_pretty_name + "C"; signal_pretty_name = signal_pretty_name + "C";
} }
else else
@ -238,18 +238,18 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
} }
else if (signal_type == "5X") else if (signal_type == "5X")
{ {
d_signal_carrier_freq = Galileo_E5a_FREQ_HZ; d_signal_carrier_freq = GALILEO_E5A_FREQ_HZ;
d_code_period = GALILEO_E5a_CODE_PERIOD; d_code_period = GALILEO_E5A_CODE_PERIOD;
d_code_chip_rate = Galileo_E5a_CODE_CHIP_RATE_HZ; d_code_chip_rate = GALILEO_E5A_CODE_CHIP_RATE_HZ;
d_symbols_per_bit = 20; d_symbols_per_bit = 20;
d_correlation_length_ms = 1; d_correlation_length_ms = 1;
d_code_samples_per_chip = 1; d_code_samples_per_chip = 1;
d_code_length_chips = static_cast<uint32_t>(Galileo_E5a_CODE_LENGTH_CHIPS); d_code_length_chips = static_cast<uint32_t>(GALILEO_E5A_CODE_LENGTH_CHIPS);
if (trk_parameters.track_pilot) if (trk_parameters.track_pilot)
{ {
d_secondary = true; d_secondary = true;
d_secondary_code_length = static_cast<uint32_t>(Galileo_E5a_Q_SECONDARY_CODE_LENGTH); d_secondary_code_length = static_cast<uint32_t>(GALILEO_E5A_Q_SECONDARY_CODE_LENGTH);
signal_pretty_name = signal_pretty_name + "Q"; signal_pretty_name = signal_pretty_name + "Q";
interchange_iq = true; interchange_iq = true;
} }
@ -554,7 +554,7 @@ void dll_pll_veml_tracking::start_tracking()
galileo_e5_a_code_gen_complex_primary(aux_code, d_acquisition_gnss_synchro->PRN, const_cast<char *>(signal_type.c_str())); galileo_e5_a_code_gen_complex_primary(aux_code, d_acquisition_gnss_synchro->PRN, const_cast<char *>(signal_type.c_str()));
if (trk_parameters.track_pilot) if (trk_parameters.track_pilot)
{ {
d_secondary_code_string = const_cast<std::string *>(&Galileo_E5a_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]); d_secondary_code_string = const_cast<std::string *>(&GALILEO_E5A_Q_SECONDARY_CODE[d_acquisition_gnss_synchro->PRN - 1]);
for (uint32_t i = 0; i < d_code_length_chips; i++) for (uint32_t i = 0; i < d_code_length_chips; i++)
{ {
d_tracking_code[i] = aux_code[i].imag(); d_tracking_code[i] = aux_code[i].imag();

View File

@ -121,8 +121,8 @@ private:
float *d_data_code; float *d_data_code;
float *d_local_code_shift_chips; float *d_local_code_shift_chips;
float *d_prompt_data_shift; float *d_prompt_data_shift;
cpu_multicorrelator_real_codes multicorrelator_cpu; Cpu_Multicorrelator_Real_Codes multicorrelator_cpu;
cpu_multicorrelator_real_codes correlator_data_cpu; //for data channel Cpu_Multicorrelator_Real_Codes correlator_data_cpu; //for data channel
/* TODO: currently the multicorrelator does not support adding extra correlator /* TODO: currently the multicorrelator does not support adding extra correlator
with different local code, thus we need extra multicorrelator instance. with different local code, thus we need extra multicorrelator instance.
Implement this functionality inside multicorrelator class Implement this functionality inside multicorrelator class

View File

@ -116,7 +116,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
// Initialization of local code replica // Initialization of local code replica
// Get space for a vector with the sinboc(1,1) replica sampled 2x/chip // Get space for a vector with the sinboc(1,1) replica sampled 2x/chip
d_ca_code = static_cast<gr_complex *>(volk_gnsssdr_malloc((2 * Galileo_E1_B_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_gnsssdr_get_alignment())); d_ca_code = static_cast<gr_complex *>(volk_gnsssdr_malloc((2 * GALILEO_E1_B_CODE_LENGTH_CHIPS) * sizeof(gr_complex), volk_gnsssdr_get_alignment()));
// correlator outputs (scalar) // correlator outputs (scalar)
d_n_correlator_taps = 5; // Very-Early, Early, Prompt, Late, Very-Late d_n_correlator_taps = 5; // Very-Early, Early, Prompt, Late, Very-Late
@ -146,7 +146,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc(
//--- Perform initializations ------------------------------ //--- Perform initializations ------------------------------
// define initial code frequency basis of NCO // define initial code frequency basis of NCO
d_code_freq_chips = Galileo_E1_CODE_CHIP_RATE_HZ; d_code_freq_chips = GALILEO_E1_CODE_CHIP_RATE_HZ;
// define residual code phase (in chips) // define residual code phase (in chips)
d_rem_code_phase_samples = 0.0; d_rem_code_phase_samples = 0.0;
// define residual carrier phase // define residual carrier phase
@ -194,10 +194,10 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
d_acquisition_gnss_synchro->Signal, d_acquisition_gnss_synchro->Signal,
false, false,
d_acquisition_gnss_synchro->PRN, d_acquisition_gnss_synchro->PRN,
2 * Galileo_E1_CODE_CHIP_RATE_HZ, 2 * GALILEO_E1_CODE_CHIP_RATE_HZ,
0); 0);
multicorrelator_cpu.set_local_code_and_taps(static_cast<int32_t>(2 * Galileo_E1_B_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips); multicorrelator_cpu.set_local_code_and_taps(static_cast<int32_t>(2 * GALILEO_E1_B_CODE_LENGTH_CHIPS), d_ca_code, d_local_code_shift_chips);
for (int32_t n = 0; n < d_n_correlator_taps; n++) for (int32_t n = 0; n < d_n_correlator_taps; n++)
{ {
d_correlator_outs[n] = gr_complex(0, 0); d_correlator_outs[n] = gr_complex(0, 0);
@ -302,7 +302,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
float carr_error_filt_hz = 0.0; float carr_error_filt_hz = 0.0;
float code_error_filt_chips = 0.0; float code_error_filt_chips = 0.0;
tcp_packet_data tcp_data; Tcp_Packet_Data tcp_data;
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
Gnss_Synchro current_synchro_data = Gnss_Synchro(); Gnss_Synchro current_synchro_data = Gnss_Synchro();
// Block input data and block output stream pointers // Block input data and block output stream pointers
@ -372,11 +372,11 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
// New carrier Doppler frequency estimation // New carrier Doppler frequency estimation
d_carrier_doppler_hz = d_acq_carrier_doppler_hz + carr_error_filt_hz; d_carrier_doppler_hz = d_acq_carrier_doppler_hz + carr_error_filt_hz;
// New code Doppler frequency estimation // New code Doppler frequency estimation
d_code_freq_chips = Galileo_E1_CODE_CHIP_RATE_HZ + ((d_carrier_doppler_hz * Galileo_E1_CODE_CHIP_RATE_HZ) / Galileo_E1_FREQ_HZ); d_code_freq_chips = GALILEO_E1_CODE_CHIP_RATE_HZ + ((d_carrier_doppler_hz * GALILEO_E1_CODE_CHIP_RATE_HZ) / GALILEO_E1_FREQ_HZ);
//carrier phase accumulator for (K) doppler estimation //carrier phase accumulator for (K) doppler estimation
d_acc_carrier_phase_rad -= GPS_TWO_PI * d_carrier_doppler_hz * Galileo_E1_CODE_PERIOD; d_acc_carrier_phase_rad -= GPS_TWO_PI * d_carrier_doppler_hz * GALILEO_E1_CODE_PERIOD;
//remnant carrier phase to prevent overflow in the code NCO //remnant carrier phase to prevent overflow in the code NCO
d_rem_carr_phase_rad = d_rem_carr_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * Galileo_E1_CODE_PERIOD; d_rem_carr_phase_rad = d_rem_carr_phase_rad + GPS_TWO_PI * d_carrier_doppler_hz * GALILEO_E1_CODE_PERIOD;
d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GPS_TWO_PI); d_rem_carr_phase_rad = fmod(d_rem_carr_phase_rad, GPS_TWO_PI);
// ################## DLL ########################################################## // ################## DLL ##########################################################
@ -384,7 +384,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
code_error_filt_chips = tcp_data.proc_pack_code_error; code_error_filt_chips = tcp_data.proc_pack_code_error;
//Code phase accumulator //Code phase accumulator
float code_error_filt_secs; float code_error_filt_secs;
code_error_filt_secs = (Galileo_E1_CODE_PERIOD * code_error_filt_chips) / Galileo_E1_CODE_CHIP_RATE_HZ; //[seconds] code_error_filt_secs = (GALILEO_E1_CODE_PERIOD * code_error_filt_chips) / GALILEO_E1_CODE_CHIP_RATE_HZ; //[seconds]
d_acc_code_phase_secs = d_acc_code_phase_secs + code_error_filt_secs; d_acc_code_phase_secs = d_acc_code_phase_secs + code_error_filt_secs;
// ################## CARRIER AND CODE NCO BUFFER ALIGNMENT ####################### // ################## CARRIER AND CODE NCO BUFFER ALIGNMENT #######################
@ -395,7 +395,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
double K_blk_samples; double K_blk_samples;
// Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation // Compute the next buffer length based in the new period of the PRN sequence and the code phase error estimation
T_chip_seconds = 1 / static_cast<double>(d_code_freq_chips); T_chip_seconds = 1 / static_cast<double>(d_code_freq_chips);
T_prn_seconds = T_chip_seconds * Galileo_E1_B_CODE_LENGTH_CHIPS; T_prn_seconds = T_chip_seconds * GALILEO_E1_B_CODE_LENGTH_CHIPS;
T_prn_samples = T_prn_seconds * static_cast<double>(d_fs_in); T_prn_samples = T_prn_seconds * static_cast<double>(d_fs_in);
K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * static_cast<double>(d_fs_in); K_blk_samples = T_prn_samples + d_rem_code_phase_samples + code_error_filt_secs * static_cast<double>(d_fs_in);
d_current_prn_length_samples = round(K_blk_samples); //round to a discrete samples d_current_prn_length_samples = round(K_blk_samples); //round to a discrete samples
@ -413,7 +413,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
d_cn0_estimation_counter = 0; d_cn0_estimation_counter = 0;
// Code lock indicator // Code lock indicator
d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, Galileo_E1_CODE_PERIOD); d_CN0_SNV_dB_Hz = cn0_svn_estimator(d_Prompt_buffer, FLAGS_cn0_samples, GALILEO_E1_CODE_PERIOD);
// Carrier lock indicator // Carrier lock indicator
d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples); d_carrier_lock_test = carrier_lock_detector(d_Prompt_buffer, FLAGS_cn0_samples);

View File

@ -142,7 +142,7 @@ private:
// correlator // correlator
float *d_local_code_shift_chips; float *d_local_code_shift_chips;
gr_complex *d_correlator_outs; gr_complex *d_correlator_outs;
cpu_multicorrelator multicorrelator_cpu; Cpu_Multicorrelator multicorrelator_cpu;
// tracking vars // tracking vars
double d_code_freq_chips; double d_code_freq_chips;
@ -154,7 +154,7 @@ private:
size_t d_port; size_t d_port;
int32_t d_listen_connection; int32_t d_listen_connection;
float d_control_id; float d_control_id;
tcp_communication d_tcp_com; Tcp_Communication d_tcp_com;
//PRN period in samples //PRN period in samples
int32_t d_current_prn_length_samples; int32_t d_current_prn_length_samples;

View File

@ -125,7 +125,7 @@ private:
gr_complex* d_ca_code; gr_complex* d_ca_code;
float* d_local_code_shift_chips; float* d_local_code_shift_chips;
gr_complex* d_correlator_outs; gr_complex* d_correlator_outs;
cpu_multicorrelator multicorrelator_cpu; Cpu_Multicorrelator multicorrelator_cpu;
// remaining code phase and carrier phase between tracking loops // remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples; double d_rem_code_phase_samples;

View File

@ -129,7 +129,7 @@ private:
//gr_complex* d_correlator_outs; //gr_complex* d_correlator_outs;
lv_16sc_t* d_correlator_outs_16sc; lv_16sc_t* d_correlator_outs_16sc;
//cpu_multicorrelator multicorrelator_cpu; //cpu_multicorrelator multicorrelator_cpu;
cpu_multicorrelator_16sc multicorrelator_cpu_16sc; Cpu_Multicorrelator_16sc multicorrelator_cpu_16sc;
// remaining code phase and carrier phase between tracking loops // remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples; double d_rem_code_phase_samples;

View File

@ -126,7 +126,7 @@ private:
gr_complex* d_ca_code; gr_complex* d_ca_code;
float* d_local_code_shift_chips; float* d_local_code_shift_chips;
gr_complex* d_correlator_outs; gr_complex* d_correlator_outs;
cpu_multicorrelator multicorrelator_cpu; Cpu_Multicorrelator multicorrelator_cpu;
// tracking vars // tracking vars

View File

@ -123,7 +123,7 @@ private:
gr_complex* d_ca_code; gr_complex* d_ca_code;
float* d_local_code_shift_chips; float* d_local_code_shift_chips;
gr_complex* d_correlator_outs; gr_complex* d_correlator_outs;
cpu_multicorrelator multicorrelator_cpu; Cpu_Multicorrelator multicorrelator_cpu;
// remaining code phase and carrier phase between tracking loops // remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples; double d_rem_code_phase_samples;

View File

@ -127,7 +127,7 @@ private:
//gr_complex* d_correlator_outs; //gr_complex* d_correlator_outs;
lv_16sc_t* d_correlator_outs_16sc; lv_16sc_t* d_correlator_outs_16sc;
//cpu_multicorrelator multicorrelator_cpu; //cpu_multicorrelator multicorrelator_cpu;
cpu_multicorrelator_16sc multicorrelator_cpu_16sc; Cpu_Multicorrelator_16sc multicorrelator_cpu_16sc;
// remaining code phase and carrier phase between tracking loops // remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples; double d_rem_code_phase_samples;

View File

@ -124,7 +124,7 @@ private:
gr_complex* d_ca_code; gr_complex* d_ca_code;
float* d_local_code_shift_chips; float* d_local_code_shift_chips;
gr_complex* d_correlator_outs; gr_complex* d_correlator_outs;
cpu_multicorrelator multicorrelator_cpu; Cpu_Multicorrelator multicorrelator_cpu;
// tracking vars // tracking vars

View File

@ -121,7 +121,7 @@ private:
gr_complex* d_ca_code; gr_complex* d_ca_code;
float* d_local_code_shift_chips; float* d_local_code_shift_chips;
gr_complex* d_correlator_outs; gr_complex* d_correlator_outs;
cpu_multicorrelator multicorrelator_cpu; Cpu_Multicorrelator multicorrelator_cpu;
// remaining code phase and carrier phase between tracking loops // remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples; double d_rem_code_phase_samples;

View File

@ -126,7 +126,7 @@ private:
//gr_complex* d_correlator_outs; //gr_complex* d_correlator_outs;
lv_16sc_t* d_correlator_outs_16sc; lv_16sc_t* d_correlator_outs_16sc;
//cpu_multicorrelator multicorrelator_cpu; //cpu_multicorrelator multicorrelator_cpu;
cpu_multicorrelator_16sc multicorrelator_cpu_16sc; Cpu_Multicorrelator_16sc multicorrelator_cpu_16sc;
// remaining code phase and carrier phase between tracking loops // remaining code phase and carrier phase between tracking loops
double d_rem_code_phase_samples; double d_rem_code_phase_samples;

View File

@ -173,7 +173,7 @@ private:
float* d_ca_code; float* d_ca_code;
float* d_local_code_shift_chips; float* d_local_code_shift_chips;
gr_complex* d_correlator_outs; gr_complex* d_correlator_outs;
cpu_multicorrelator_real_codes multicorrelator_cpu; Cpu_Multicorrelator_Real_Codes multicorrelator_cpu;
// tracking vars // tracking vars
double d_code_freq_chips; double d_code_freq_chips;

View File

@ -334,7 +334,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
float code_error = 0.0; float code_error = 0.0;
float code_nco = 0.0; float code_nco = 0.0;
tcp_packet_data tcp_data; Tcp_Packet_Data tcp_data;
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
Gnss_Synchro current_synchro_data = Gnss_Synchro(); Gnss_Synchro current_synchro_data = Gnss_Synchro();

View File

@ -128,7 +128,7 @@ private:
// correlator // correlator
float *d_local_code_shift_chips; float *d_local_code_shift_chips;
gr_complex *d_correlator_outs; gr_complex *d_correlator_outs;
cpu_multicorrelator multicorrelator_cpu; Cpu_Multicorrelator multicorrelator_cpu;
// tracking vars // tracking vars
double d_code_freq_hz; double d_code_freq_hz;
@ -139,7 +139,7 @@ private:
size_t d_port; size_t d_port;
int32_t d_listen_connection; int32_t d_listen_connection;
float d_control_id; float d_control_id;
tcp_communication d_tcp_com; Tcp_Communication d_tcp_com;
//PRN period in samples //PRN period in samples
int32_t d_current_prn_length_samples; int32_t d_current_prn_length_samples;

View File

@ -37,7 +37,7 @@
#include <cmath> #include <cmath>
cpu_multicorrelator::cpu_multicorrelator() Cpu_Multicorrelator::Cpu_Multicorrelator()
{ {
d_sig_in = nullptr; d_sig_in = nullptr;
d_local_code_in = nullptr; d_local_code_in = nullptr;
@ -49,16 +49,16 @@ cpu_multicorrelator::cpu_multicorrelator()
} }
cpu_multicorrelator::~cpu_multicorrelator() Cpu_Multicorrelator::~Cpu_Multicorrelator()
{ {
if (d_local_codes_resampled != nullptr) if (d_local_codes_resampled != nullptr)
{ {
cpu_multicorrelator::free(); Cpu_Multicorrelator::free();
} }
} }
bool cpu_multicorrelator::init( bool Cpu_Multicorrelator::init(
int max_signal_length_samples, int max_signal_length_samples,
int n_correlators) int n_correlators)
{ {
@ -75,7 +75,7 @@ bool cpu_multicorrelator::init(
} }
bool cpu_multicorrelator::set_local_code_and_taps( bool Cpu_Multicorrelator::set_local_code_and_taps(
int code_length_chips, int code_length_chips,
const std::complex<float>* local_code_in, const std::complex<float>* local_code_in,
float* shifts_chips) float* shifts_chips)
@ -87,7 +87,7 @@ bool cpu_multicorrelator::set_local_code_and_taps(
} }
bool cpu_multicorrelator::set_input_output_vectors(std::complex<float>* corr_out, const std::complex<float>* sig_in) bool Cpu_Multicorrelator::set_input_output_vectors(std::complex<float>* corr_out, const std::complex<float>* sig_in)
{ {
// Save CPU pointers // Save CPU pointers
d_sig_in = sig_in; d_sig_in = sig_in;
@ -96,7 +96,7 @@ bool cpu_multicorrelator::set_input_output_vectors(std::complex<float>* corr_out
} }
void cpu_multicorrelator::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips) void Cpu_Multicorrelator::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips)
{ {
volk_gnsssdr_32fc_xn_resampler_32fc_xn(d_local_codes_resampled, volk_gnsssdr_32fc_xn_resampler_32fc_xn(d_local_codes_resampled,
d_local_code_in, d_local_code_in,
@ -109,7 +109,7 @@ void cpu_multicorrelator::update_local_code(int correlator_length_samples, float
} }
bool cpu_multicorrelator::Carrier_wipeoff_multicorrelator_resampler( bool Cpu_Multicorrelator::Carrier_wipeoff_multicorrelator_resampler(
float rem_carrier_phase_in_rad, float rem_carrier_phase_in_rad,
float phase_step_rad, float phase_step_rad,
float rem_code_phase_chips, float rem_code_phase_chips,
@ -126,7 +126,7 @@ bool cpu_multicorrelator::Carrier_wipeoff_multicorrelator_resampler(
} }
bool cpu_multicorrelator::free() bool Cpu_Multicorrelator::free()
{ {
// Free memory // Free memory
if (d_local_codes_resampled != nullptr) if (d_local_codes_resampled != nullptr)

View File

@ -41,11 +41,11 @@
/*! /*!
* \brief Class that implements carrier wipe-off and correlators. * \brief Class that implements carrier wipe-off and correlators.
*/ */
class cpu_multicorrelator class Cpu_Multicorrelator
{ {
public: public:
cpu_multicorrelator(); Cpu_Multicorrelator();
~cpu_multicorrelator(); ~Cpu_Multicorrelator();
bool init(int max_signal_length_samples, int n_correlators); bool init(int max_signal_length_samples, int n_correlators);
bool set_local_code_and_taps(int code_length_chips, const std::complex<float> *local_code_in, float *shifts_chips); bool set_local_code_and_taps(int code_length_chips, const std::complex<float> *local_code_in, float *shifts_chips);
bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in); bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in);

View File

@ -36,7 +36,7 @@
#include <cmath> #include <cmath>
bool cpu_multicorrelator_16sc::init( bool Cpu_Multicorrelator_16sc::init(
int max_signal_length_samples, int max_signal_length_samples,
int n_correlators) int n_correlators)
{ {
@ -54,7 +54,7 @@ bool cpu_multicorrelator_16sc::init(
} }
bool cpu_multicorrelator_16sc::set_local_code_and_taps( bool Cpu_Multicorrelator_16sc::set_local_code_and_taps(
int code_length_chips, int code_length_chips,
const lv_16sc_t* local_code_in, const lv_16sc_t* local_code_in,
float* shifts_chips) float* shifts_chips)
@ -66,7 +66,7 @@ bool cpu_multicorrelator_16sc::set_local_code_and_taps(
} }
bool cpu_multicorrelator_16sc::set_input_output_vectors(lv_16sc_t* corr_out, const lv_16sc_t* sig_in) bool Cpu_Multicorrelator_16sc::set_input_output_vectors(lv_16sc_t* corr_out, const lv_16sc_t* sig_in)
{ {
// Save CPU pointers // Save CPU pointers
d_sig_in = sig_in; d_sig_in = sig_in;
@ -75,7 +75,7 @@ bool cpu_multicorrelator_16sc::set_input_output_vectors(lv_16sc_t* corr_out, con
} }
void cpu_multicorrelator_16sc::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips) void Cpu_Multicorrelator_16sc::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips)
{ {
volk_gnsssdr_16ic_xn_resampler_16ic_xn(d_local_codes_resampled, volk_gnsssdr_16ic_xn_resampler_16ic_xn(d_local_codes_resampled,
d_local_code_in, d_local_code_in,
@ -88,7 +88,7 @@ void cpu_multicorrelator_16sc::update_local_code(int correlator_length_samples,
} }
bool cpu_multicorrelator_16sc::Carrier_wipeoff_multicorrelator_resampler( bool Cpu_Multicorrelator_16sc::Carrier_wipeoff_multicorrelator_resampler(
float rem_carrier_phase_in_rad, float rem_carrier_phase_in_rad,
float phase_step_rad, float phase_step_rad,
float rem_code_phase_chips, float rem_code_phase_chips,
@ -105,7 +105,7 @@ bool cpu_multicorrelator_16sc::Carrier_wipeoff_multicorrelator_resampler(
} }
cpu_multicorrelator_16sc::cpu_multicorrelator_16sc() Cpu_Multicorrelator_16sc::Cpu_Multicorrelator_16sc()
{ {
d_sig_in = nullptr; d_sig_in = nullptr;
d_local_code_in = nullptr; d_local_code_in = nullptr;
@ -117,16 +117,16 @@ cpu_multicorrelator_16sc::cpu_multicorrelator_16sc()
} }
cpu_multicorrelator_16sc::~cpu_multicorrelator_16sc() Cpu_Multicorrelator_16sc::~Cpu_Multicorrelator_16sc()
{ {
if (d_local_codes_resampled != nullptr) if (d_local_codes_resampled != nullptr)
{ {
cpu_multicorrelator_16sc::free(); Cpu_Multicorrelator_16sc::free();
} }
} }
bool cpu_multicorrelator_16sc::free() bool Cpu_Multicorrelator_16sc::free()
{ {
// Free memory // Free memory
if (d_local_codes_resampled != nullptr) if (d_local_codes_resampled != nullptr)

View File

@ -41,11 +41,11 @@
/*! /*!
* \brief Class that implements carrier wipe-off and correlators. * \brief Class that implements carrier wipe-off and correlators.
*/ */
class cpu_multicorrelator_16sc class Cpu_Multicorrelator_16sc
{ {
public: public:
cpu_multicorrelator_16sc(); Cpu_Multicorrelator_16sc();
~cpu_multicorrelator_16sc(); ~Cpu_Multicorrelator_16sc();
bool init(int max_signal_length_samples, int n_correlators); bool init(int max_signal_length_samples, int n_correlators);
bool set_local_code_and_taps(int code_length_chips, const lv_16sc_t *local_code_in, float *shifts_chips); bool set_local_code_and_taps(int code_length_chips, const lv_16sc_t *local_code_in, float *shifts_chips);
bool set_input_output_vectors(lv_16sc_t *corr_out, const lv_16sc_t *sig_in); bool set_input_output_vectors(lv_16sc_t *corr_out, const lv_16sc_t *sig_in);

View File

@ -37,7 +37,7 @@
#include <volk_gnsssdr/volk_gnsssdr.h> #include <volk_gnsssdr/volk_gnsssdr.h>
#include <cmath> #include <cmath>
cpu_multicorrelator_real_codes::cpu_multicorrelator_real_codes() Cpu_Multicorrelator_Real_Codes::Cpu_Multicorrelator_Real_Codes()
{ {
d_sig_in = nullptr; d_sig_in = nullptr;
d_local_code_in = nullptr; d_local_code_in = nullptr;
@ -50,16 +50,16 @@ cpu_multicorrelator_real_codes::cpu_multicorrelator_real_codes()
} }
cpu_multicorrelator_real_codes::~cpu_multicorrelator_real_codes() Cpu_Multicorrelator_Real_Codes::~Cpu_Multicorrelator_Real_Codes()
{ {
if (d_local_codes_resampled != nullptr) if (d_local_codes_resampled != nullptr)
{ {
cpu_multicorrelator_real_codes::free(); Cpu_Multicorrelator_Real_Codes::free();
} }
} }
bool cpu_multicorrelator_real_codes::init( bool Cpu_Multicorrelator_Real_Codes::init(
int max_signal_length_samples, int max_signal_length_samples,
int n_correlators) int n_correlators)
{ {
@ -76,7 +76,7 @@ bool cpu_multicorrelator_real_codes::init(
} }
bool cpu_multicorrelator_real_codes::set_local_code_and_taps( bool Cpu_Multicorrelator_Real_Codes::set_local_code_and_taps(
int code_length_chips, int code_length_chips,
const float* local_code_in, const float* local_code_in,
float* shifts_chips) float* shifts_chips)
@ -89,7 +89,7 @@ bool cpu_multicorrelator_real_codes::set_local_code_and_taps(
} }
bool cpu_multicorrelator_real_codes::set_input_output_vectors(std::complex<float>* corr_out, const std::complex<float>* sig_in) bool Cpu_Multicorrelator_Real_Codes::set_input_output_vectors(std::complex<float>* corr_out, const std::complex<float>* sig_in)
{ {
// Save CPU pointers // Save CPU pointers
d_sig_in = sig_in; d_sig_in = sig_in;
@ -98,7 +98,7 @@ bool cpu_multicorrelator_real_codes::set_input_output_vectors(std::complex<float
} }
void cpu_multicorrelator_real_codes::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips, float code_phase_rate_step_chips) void Cpu_Multicorrelator_Real_Codes::update_local_code(int correlator_length_samples, float rem_code_phase_chips, float code_phase_step_chips, float code_phase_rate_step_chips)
{ {
if (d_use_high_dynamics_resampler) if (d_use_high_dynamics_resampler)
{ {
@ -126,7 +126,7 @@ void cpu_multicorrelator_real_codes::update_local_code(int correlator_length_sam
} }
// Overload Carrier_wipeoff_multicorrelator_resampler to ensure back compatibility // Overload Carrier_wipeoff_multicorrelator_resampler to ensure back compatibility
bool cpu_multicorrelator_real_codes::Carrier_wipeoff_multicorrelator_resampler( bool Cpu_Multicorrelator_Real_Codes::Carrier_wipeoff_multicorrelator_resampler(
float rem_carrier_phase_in_rad, float rem_carrier_phase_in_rad,
float phase_step_rad, float phase_step_rad,
float phase_rate_step_rad, float phase_rate_step_rad,
@ -151,7 +151,7 @@ bool cpu_multicorrelator_real_codes::Carrier_wipeoff_multicorrelator_resampler(
return true; return true;
} }
// Overload Carrier_wipeoff_multicorrelator_resampler to ensure back compatibility // Overload Carrier_wipeoff_multicorrelator_resampler to ensure back compatibility
bool cpu_multicorrelator_real_codes::Carrier_wipeoff_multicorrelator_resampler( bool Cpu_Multicorrelator_Real_Codes::Carrier_wipeoff_multicorrelator_resampler(
float rem_carrier_phase_in_rad, float rem_carrier_phase_in_rad,
float phase_step_rad, float phase_step_rad,
float rem_code_phase_chips, float rem_code_phase_chips,
@ -169,7 +169,7 @@ bool cpu_multicorrelator_real_codes::Carrier_wipeoff_multicorrelator_resampler(
} }
bool cpu_multicorrelator_real_codes::free() bool Cpu_Multicorrelator_Real_Codes::free()
{ {
// Free memory // Free memory
if (d_local_codes_resampled != nullptr) if (d_local_codes_resampled != nullptr)
@ -185,7 +185,7 @@ bool cpu_multicorrelator_real_codes::free()
} }
void cpu_multicorrelator_real_codes::set_high_dynamics_resampler( void Cpu_Multicorrelator_Real_Codes::set_high_dynamics_resampler(
bool use_high_dynamics_resampler) bool use_high_dynamics_resampler)
{ {
d_use_high_dynamics_resampler = use_high_dynamics_resampler; d_use_high_dynamics_resampler = use_high_dynamics_resampler;

View File

@ -42,12 +42,12 @@
/*! /*!
* \brief Class that implements carrier wipe-off and correlators. * \brief Class that implements carrier wipe-off and correlators.
*/ */
class cpu_multicorrelator_real_codes class Cpu_Multicorrelator_Real_Codes
{ {
public: public:
cpu_multicorrelator_real_codes(); Cpu_Multicorrelator_Real_Codes();
void set_high_dynamics_resampler(bool use_high_dynamics_resampler); void set_high_dynamics_resampler(bool use_high_dynamics_resampler);
~cpu_multicorrelator_real_codes(); ~Cpu_Multicorrelator_Real_Codes();
bool init(int max_signal_length_samples, int n_correlators); bool init(int max_signal_length_samples, int n_correlators);
bool set_local_code_and_taps(int code_length_chips, const float *local_code_in, float *shifts_chips); bool set_local_code_and_taps(int code_length_chips, const float *local_code_in, float *shifts_chips);
bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in); bool set_input_output_vectors(std::complex<float> *corr_out, const std::complex<float> *sig_in);

View File

@ -35,13 +35,13 @@
#include <string> #include <string>
tcp_communication::tcp_communication() : tcp_socket_(io_service_) {} // NOLINT Tcp_Communication::Tcp_Communication() : tcp_socket_(io_service_) {} // NOLINT
tcp_communication::~tcp_communication() = default; Tcp_Communication::~Tcp_Communication() = default;
int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_) int Tcp_Communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
{ {
try try
{ {
@ -73,7 +73,7 @@ int tcp_communication::listen_tcp_connection(size_t d_port_, size_t d_port_ch0_)
} }
void tcp_communication::send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, tcp_packet_data* tcp_data_) void Tcp_Communication::send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, Tcp_Packet_Data* tcp_data_)
{ {
int controlc = 0; int controlc = 0;
boost::array<float, NUM_RX_VARIABLES> readbuf; boost::array<float, NUM_RX_VARIABLES> readbuf;
@ -108,7 +108,7 @@ void tcp_communication::send_receive_tcp_packet_galileo_e1(boost::array<float, N
} }
void tcp_communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, tcp_packet_data* tcp_data_) void Tcp_Communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, Tcp_Packet_Data* tcp_data_)
{ {
int controlc = 0; int controlc = 0;
boost::array<float, NUM_RX_VARIABLES> readbuf; boost::array<float, NUM_RX_VARIABLES> readbuf;
@ -143,7 +143,7 @@ void tcp_communication::send_receive_tcp_packet_gps_l1_ca(boost::array<float, NU
} }
void tcp_communication::close_tcp_connection(size_t d_port_) void Tcp_Communication::close_tcp_connection(size_t d_port_)
{ {
// Close the TCP connection // Close the TCP connection
tcp_socket_.close(); tcp_socket_.close();

View File

@ -43,15 +43,15 @@
/*! /*!
* \brief TCP communication class * \brief TCP communication class
*/ */
class tcp_communication class Tcp_Communication
{ {
public: public:
tcp_communication(); Tcp_Communication();
~tcp_communication(); ~Tcp_Communication();
int listen_tcp_connection(size_t d_port_, size_t d_port_ch0_); int listen_tcp_connection(size_t d_port_, size_t d_port_ch0_);
void send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, tcp_packet_data *tcp_data_); void send_receive_tcp_packet_galileo_e1(boost::array<float, NUM_TX_VARIABLES_GALILEO_E1> buf, Tcp_Packet_Data *tcp_data_);
void send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, tcp_packet_data *tcp_data_); void send_receive_tcp_packet_gps_l1_ca(boost::array<float, NUM_TX_VARIABLES_GPS_L1_CA> buf, Tcp_Packet_Data *tcp_data_);
void close_tcp_connection(size_t d_port_); void close_tcp_connection(size_t d_port_);
private: private:

View File

@ -30,11 +30,11 @@
*/ */
#include "tcp_packet_data.h" #include "tcp_packet_data.h"
tcp_packet_data::tcp_packet_data() Tcp_Packet_Data::Tcp_Packet_Data()
{ {
proc_pack_code_error = 0; proc_pack_code_error = 0;
proc_pack_carr_error = 0; proc_pack_carr_error = 0;
proc_pack_carrier_doppler_hz = 0; proc_pack_carrier_doppler_hz = 0;
} }
tcp_packet_data::~tcp_packet_data() = default; Tcp_Packet_Data::~Tcp_Packet_Data() = default;

View File

@ -35,11 +35,11 @@
/*! /*!
* \brief Class that implements a TCP data packet * \brief Class that implements a TCP data packet
*/ */
class tcp_packet_data class Tcp_Packet_Data
{ {
public: public:
tcp_packet_data(); Tcp_Packet_Data();
~tcp_packet_data(); ~Tcp_Packet_Data();
float proc_pack_code_error; float proc_pack_code_error;
float proc_pack_carr_error; float proc_pack_carr_error;
float proc_pack_carrier_doppler_hz; float proc_pack_carrier_doppler_hz;

View File

@ -42,7 +42,7 @@
#include "gnss_synchro.h" #include "gnss_synchro.h"
template <typename Data> template <typename Data>
class concurrent_queue; class Concurrent_Queue;
/*! \brief This abstract class represents an interface to an acquisition GNSS block. /*! \brief This abstract class represents an interface to an acquisition GNSS block.
* *

View File

@ -41,7 +41,7 @@
#include "gnss_synchro.h" #include "gnss_synchro.h"
template <typename Data> template <typename Data>
class concurrent_queue; class Concurrent_Queue;
/*! /*!
* \brief This abstract class represents an interface to a tracking block. * \brief This abstract class represents an interface to a tracking block.

View File

@ -37,7 +37,7 @@
#include <cmath> #include <cmath>
#include <utility> #include <utility>
gnss_sdr_supl_client::gnss_sdr_supl_client() Gnss_Sdr_Supl_Client::Gnss_Sdr_Supl_Client()
{ {
mcc = 0; mcc = 0;
mns = 0; mns = 0;
@ -50,10 +50,10 @@ gnss_sdr_supl_client::gnss_sdr_supl_client()
} }
gnss_sdr_supl_client::~gnss_sdr_supl_client() = default; Gnss_Sdr_Supl_Client::~Gnss_Sdr_Supl_Client() = default;
void gnss_sdr_supl_client::print_assistance() void Gnss_Sdr_Supl_Client::print_assistance()
{ {
if (assist.set & SUPL_RRLP_ASSIST_REFTIME) if (assist.set & SUPL_RRLP_ASSIST_REFTIME)
{ {
@ -152,7 +152,7 @@ void gnss_sdr_supl_client::print_assistance()
} }
int gnss_sdr_supl_client::get_assistance(int i_mcc, int i_mns, int i_lac, int i_ci) int Gnss_Sdr_Supl_Client::get_assistance(int i_mcc, int i_mns, int i_lac, int i_ci)
{ {
// SET SUPL CLIENT INFORMATION // SET SUPL CLIENT INFORMATION
// GSM CELL PARAMETERS // GSM CELL PARAMETERS
@ -194,7 +194,7 @@ int gnss_sdr_supl_client::get_assistance(int i_mcc, int i_mns, int i_lac, int i_
} }
void gnss_sdr_supl_client::read_supl_data() void Gnss_Sdr_Supl_Client::read_supl_data()
{ {
// READ REFERENCE LOCATION // READ REFERENCE LOCATION
if (assist.set & SUPL_RRLP_ASSIST_REFLOC) if (assist.set & SUPL_RRLP_ASSIST_REFLOC)
@ -370,7 +370,7 @@ void gnss_sdr_supl_client::read_supl_data()
} }
bool gnss_sdr_supl_client::load_ephemeris_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_ephemeris_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -390,7 +390,7 @@ bool gnss_sdr_supl_client::load_ephemeris_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string& file_name, std::map<int, Gps_Ephemeris> eph_map) bool Gnss_Sdr_Supl_Client::save_ephemeris_map_xml(const std::string& file_name, std::map<int, Gps_Ephemeris> eph_map)
{ {
if (eph_map.empty() == false) if (eph_map.empty() == false)
{ {
@ -417,7 +417,7 @@ bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string& file_name,
} }
bool gnss_sdr_supl_client::load_gal_ephemeris_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_gal_ephemeris_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -464,7 +464,7 @@ bool save_gal_ephemeris_map_xml(const std::string& file_name, std::map<int, Gali
} }
bool gnss_sdr_supl_client::load_cnav_ephemeris_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_cnav_ephemeris_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -511,7 +511,7 @@ bool save_cnav_ephemeris_map_xml(const std::string& file_name, std::map<int, Gps
} }
bool gnss_sdr_supl_client::load_gnav_ephemeris_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_gnav_ephemeris_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -558,7 +558,7 @@ bool save_gnav_ephemeris_map_xml(const std::string& file_name, std::map<int, Glo
} }
bool gnss_sdr_supl_client::load_utc_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_utc_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -577,7 +577,7 @@ bool gnss_sdr_supl_client::load_utc_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_utc_xml(const std::string& file_name, Gps_Utc_Model& utc) bool Gnss_Sdr_Supl_Client::save_utc_xml(const std::string& file_name, Gps_Utc_Model& utc)
{ {
if (utc.valid) if (utc.valid)
{ {
@ -604,7 +604,7 @@ bool gnss_sdr_supl_client::save_utc_xml(const std::string& file_name, Gps_Utc_Mo
} }
bool gnss_sdr_supl_client::load_cnav_utc_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_cnav_utc_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -623,7 +623,7 @@ bool gnss_sdr_supl_client::load_cnav_utc_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_cnav_utc_xml(const std::string& file_name, Gps_CNAV_Utc_Model& utc) bool Gnss_Sdr_Supl_Client::save_cnav_utc_xml(const std::string& file_name, Gps_CNAV_Utc_Model& utc)
{ {
if (utc.valid) if (utc.valid)
{ {
@ -650,7 +650,7 @@ bool gnss_sdr_supl_client::save_cnav_utc_xml(const std::string& file_name, Gps_C
} }
bool gnss_sdr_supl_client::load_gal_utc_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_gal_utc_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -669,7 +669,7 @@ bool gnss_sdr_supl_client::load_gal_utc_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_gal_utc_xml(const std::string& file_name, Galileo_Utc_Model& utc) bool Gnss_Sdr_Supl_Client::save_gal_utc_xml(const std::string& file_name, Galileo_Utc_Model& utc)
{ {
if (utc.flag_utc_model) if (utc.flag_utc_model)
{ {
@ -696,7 +696,7 @@ bool gnss_sdr_supl_client::save_gal_utc_xml(const std::string& file_name, Galile
} }
bool gnss_sdr_supl_client::load_iono_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_iono_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -715,7 +715,7 @@ bool gnss_sdr_supl_client::load_iono_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_iono_xml(const std::string& file_name, Gps_Iono& iono) bool Gnss_Sdr_Supl_Client::save_iono_xml(const std::string& file_name, Gps_Iono& iono)
{ {
if (iono.valid) if (iono.valid)
{ {
@ -742,7 +742,7 @@ bool gnss_sdr_supl_client::save_iono_xml(const std::string& file_name, Gps_Iono&
} }
bool gnss_sdr_supl_client::load_gal_iono_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_gal_iono_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -761,7 +761,7 @@ bool gnss_sdr_supl_client::load_gal_iono_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_gal_iono_xml(const std::string& file_name, Galileo_Iono& iono) bool Gnss_Sdr_Supl_Client::save_gal_iono_xml(const std::string& file_name, Galileo_Iono& iono)
{ {
if (iono.ai0_5 != 0.0) if (iono.ai0_5 != 0.0)
{ {
@ -788,7 +788,7 @@ bool gnss_sdr_supl_client::save_gal_iono_xml(const std::string& file_name, Galil
} }
bool gnss_sdr_supl_client::load_gps_almanac_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_gps_almanac_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -808,7 +808,7 @@ bool gnss_sdr_supl_client::load_gps_almanac_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_gps_almanac_xml(const std::string& file_name, std::map<int, Gps_Almanac> gps_almanac_map) bool Gnss_Sdr_Supl_Client::save_gps_almanac_xml(const std::string& file_name, std::map<int, Gps_Almanac> gps_almanac_map)
{ {
if (gps_almanac_map.empty() == false) if (gps_almanac_map.empty() == false)
{ {
@ -835,7 +835,7 @@ bool gnss_sdr_supl_client::save_gps_almanac_xml(const std::string& file_name, st
} }
bool gnss_sdr_supl_client::load_gal_almanac_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_gal_almanac_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -855,7 +855,7 @@ bool gnss_sdr_supl_client::load_gal_almanac_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::read_gal_almanac_from_gsa(const std::string& file_name) bool Gnss_Sdr_Supl_Client::read_gal_almanac_from_gsa(const std::string& file_name)
{ {
pugi::xml_document doc; pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file(file_name.c_str()); pugi::xml_parse_result result = doc.load_file(file_name.c_str());
@ -905,7 +905,7 @@ bool gnss_sdr_supl_client::read_gal_almanac_from_gsa(const std::string& file_nam
} }
bool gnss_sdr_supl_client::save_gal_almanac_xml(const std::string& file_name, std::map<int, Galileo_Almanac> gal_almanac_map) bool Gnss_Sdr_Supl_Client::save_gal_almanac_xml(const std::string& file_name, std::map<int, Galileo_Almanac> gal_almanac_map)
{ {
if (gal_almanac_map.empty() == false) if (gal_almanac_map.empty() == false)
{ {
@ -932,7 +932,7 @@ bool gnss_sdr_supl_client::save_gal_almanac_xml(const std::string& file_name, st
} }
bool gnss_sdr_supl_client::load_glo_utc_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_glo_utc_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -951,7 +951,7 @@ bool gnss_sdr_supl_client::load_glo_utc_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_glo_utc_xml(const std::string& file_name, Glonass_Gnav_Utc_Model& utc) bool Gnss_Sdr_Supl_Client::save_glo_utc_xml(const std::string& file_name, Glonass_Gnav_Utc_Model& utc)
{ {
if (utc.valid) if (utc.valid)
{ {
@ -978,7 +978,7 @@ bool gnss_sdr_supl_client::save_glo_utc_xml(const std::string& file_name, Glonas
} }
bool gnss_sdr_supl_client::load_ref_time_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_ref_time_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -997,7 +997,7 @@ bool gnss_sdr_supl_client::load_ref_time_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_ref_time_xml(const std::string& file_name, Agnss_Ref_Time& ref_time) bool Gnss_Sdr_Supl_Client::save_ref_time_xml(const std::string& file_name, Agnss_Ref_Time& ref_time)
{ {
if (ref_time.valid == true) if (ref_time.valid == true)
{ {
@ -1024,7 +1024,7 @@ bool gnss_sdr_supl_client::save_ref_time_xml(const std::string& file_name, Agnss
} }
bool gnss_sdr_supl_client::load_ref_location_xml(const std::string& file_name) bool Gnss_Sdr_Supl_Client::load_ref_location_xml(const std::string& file_name)
{ {
std::ifstream ifs; std::ifstream ifs;
try try
@ -1043,7 +1043,7 @@ bool gnss_sdr_supl_client::load_ref_location_xml(const std::string& file_name)
} }
bool gnss_sdr_supl_client::save_ref_location_xml(const std::string& file_name, Agnss_Ref_Location& ref_location) bool Gnss_Sdr_Supl_Client::save_ref_location_xml(const std::string& file_name, Agnss_Ref_Location& ref_location)
{ {
if (ref_location.valid == true) if (ref_location.valid == true)
{ {

View File

@ -64,7 +64,7 @@ extern "C"
/*! /*!
* \brief class that implements a C++ interface to external Secure User Location Protocol (SUPL) client library.. * \brief class that implements a C++ interface to external Secure User Location Protocol (SUPL) client library..
*/ */
class gnss_sdr_supl_client class Gnss_Sdr_Supl_Client
{ {
private: private:
// GSM CELL INFO // GSM CELL INFO
@ -274,8 +274,8 @@ public:
*/ */
void print_assistance(); void print_assistance();
gnss_sdr_supl_client(); Gnss_Sdr_Supl_Client();
~gnss_sdr_supl_client(); ~Gnss_Sdr_Supl_Client();
}; };
#endif #endif

View File

@ -111,7 +111,7 @@ Accuracy_encode_uper(asn_TYPE_descriptor_t *td,
return td->uper_encoder(td, constraints, structure, per_out); return td->uper_encoder(td, constraints, structure, per_out);
} }
static asn_per_constraints_t asn_PER_type_Accuracy_constr_1 = { static asn_per_constraints_t ASN_PER_TYPE_ACCURACY_CONSTR_1 = {
{ APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */, { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -138,7 +138,7 @@ asn_TYPE_descriptor_t asn_DEF_Accuracy = {
asn_DEF_Accuracy_tags_1, /* Same as above */ asn_DEF_Accuracy_tags_1, /* Same as above */
sizeof(asn_DEF_Accuracy_tags_1) sizeof(asn_DEF_Accuracy_tags_1)
/sizeof(asn_DEF_Accuracy_tags_1[0]), /* 1 */ /sizeof(asn_DEF_Accuracy_tags_1[0]), /* 1 */
&asn_PER_type_Accuracy_constr_1, &ASN_PER_TYPE_ACCURACY_CONSTR_1,
0, 0, /* No members */ 0, 0, /* No members */
0 /* No specifics */ 0 /* No specifics */
}; };

View File

@ -131,27 +131,27 @@ memb_codePhaseSearchWindow_constraint_1(asn_TYPE_descriptor_t *td, const void *s
} }
} }
static asn_per_constraints_t asn_PER_memb_doppler0_constr_3 = { static asn_per_constraints_t ASN_PER_MEMB_DOPPLER0_CONSTR_3 = {
{ APC_CONSTRAINED, 12, 12, -2048, 2047 } /* (-2048..2047) */, { APC_CONSTRAINED, 12, 12, -2048, 2047 } /* (-2048..2047) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_codePhase_constr_5 = { static asn_per_constraints_t ASN_PER_MEMB_CODE_PHASE_CONSTR_5 = {
{ APC_CONSTRAINED, 10, 10, 0, 1022 } /* (0..1022) */, { APC_CONSTRAINED, 10, 10, 0, 1022 } /* (0..1022) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_intCodePhase_constr_6 = { static asn_per_constraints_t ASN_PER_MEMB_INT_CODE_PHASE_CONSTR_6 = {
{ APC_CONSTRAINED, 5, 5, 0, 19 } /* (0..19) */, { APC_CONSTRAINED, 5, 5, 0, 19 } /* (0..19) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_gpsBitNumber_constr_7 = { static asn_per_constraints_t ASN_PER_MEMB_GPS_BIT_NUMBER_CONSTR_7 = {
{ APC_CONSTRAINED, 2, 2, 0, 3 } /* (0..3) */, { APC_CONSTRAINED, 2, 2, 0, 3 } /* (0..3) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_codePhaseSearchWindow_constr_8 = { static asn_per_constraints_t ASN_PER_MEMB_CODE_PHASE_SEARCH_WINDOW_CONSTR_8 = {
{ APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */, { APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -171,7 +171,7 @@ static asn_TYPE_member_t asn_MBR_AcquisElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_doppler0_constraint_1, memb_doppler0_constraint_1,
&asn_PER_memb_doppler0_constr_3, &ASN_PER_MEMB_DOPPLER0_CONSTR_3,
0, 0,
"doppler0" "doppler0"
}, },
@ -189,7 +189,7 @@ static asn_TYPE_member_t asn_MBR_AcquisElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_codePhase_constraint_1, memb_codePhase_constraint_1,
&asn_PER_memb_codePhase_constr_5, &ASN_PER_MEMB_CODE_PHASE_CONSTR_5,
0, 0,
"codePhase" "codePhase"
}, },
@ -198,7 +198,7 @@ static asn_TYPE_member_t asn_MBR_AcquisElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_intCodePhase_constraint_1, memb_intCodePhase_constraint_1,
&asn_PER_memb_intCodePhase_constr_6, &ASN_PER_MEMB_INT_CODE_PHASE_CONSTR_6,
0, 0,
"intCodePhase" "intCodePhase"
}, },
@ -207,7 +207,7 @@ static asn_TYPE_member_t asn_MBR_AcquisElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_gpsBitNumber_constraint_1, memb_gpsBitNumber_constraint_1,
&asn_PER_memb_gpsBitNumber_constr_7, &ASN_PER_MEMB_GPS_BIT_NUMBER_CONSTR_7,
0, 0,
"gpsBitNumber" "gpsBitNumber"
}, },
@ -216,7 +216,7 @@ static asn_TYPE_member_t asn_MBR_AcquisElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_codePhaseSearchWindow_constraint_1, memb_codePhaseSearchWindow_constraint_1,
&asn_PER_memb_codePhaseSearchWindow_constr_8, &ASN_PER_MEMB_CODE_PHASE_SEARCH_WINDOW_CONSTR_8,
0, 0,
"codePhaseSearchWindow" "codePhaseSearchWindow"
}, },

View File

@ -56,12 +56,12 @@ memb_elevation_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
} }
} }
static asn_per_constraints_t asn_PER_memb_azimuth_constr_2 = { static asn_per_constraints_t ASN_PER_MEMB_AZIMUTH_CONSTR_2 = {
{ APC_CONSTRAINED, 5, 5, 0, 31 } /* (0..31) */, { APC_CONSTRAINED, 5, 5, 0, 31 } /* (0..31) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_elevation_constr_3 = { static asn_per_constraints_t ASN_PER_MEMB_ELEVATION_CONSTR_3 = {
{ APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */, { APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -72,7 +72,7 @@ static asn_TYPE_member_t asn_MBR_AddionalAngleFields_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_azimuth_constraint_1, memb_azimuth_constraint_1,
&asn_PER_memb_azimuth_constr_2, &ASN_PER_MEMB_AZIMUTH_CONSTR_2,
0, 0,
"azimuth" "azimuth"
}, },
@ -81,7 +81,7 @@ static asn_TYPE_member_t asn_MBR_AddionalAngleFields_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_elevation_constraint_1, memb_elevation_constraint_1,
&asn_PER_memb_elevation_constr_3, &ASN_PER_MEMB_ELEVATION_CONSTR_3,
0, 0,
"elevation" "elevation"
}, },

View File

@ -56,12 +56,12 @@ memb_dopplerUncertainty_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr
} }
} }
static asn_per_constraints_t asn_PER_memb_doppler1_constr_2 = { static asn_per_constraints_t ASN_PER_MEMB_DOPPLER1_CONSTR_2 = {
{ APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */, { APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_dopplerUncertainty_constr_3 = { static asn_per_constraints_t ASN_PER_MEMB_DOPPLER_UNCERTAINTY_CONSTR_3 = {
{ APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */, { APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -72,7 +72,7 @@ static asn_TYPE_member_t asn_MBR_AddionalDopplerFields_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_doppler1_constraint_1, memb_doppler1_constraint_1,
&asn_PER_memb_doppler1_constr_2, &ASN_PER_MEMB_DOPPLER1_CONSTR_2,
0, 0,
"doppler1" "doppler1"
}, },
@ -81,7 +81,7 @@ static asn_TYPE_member_t asn_MBR_AddionalDopplerFields_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_dopplerUncertainty_constraint_1, memb_dopplerUncertainty_constraint_1,
&asn_PER_memb_dopplerUncertainty_constr_3, &ASN_PER_MEMB_DOPPLER_UNCERTAINTY_CONSTR_3,
0, 0,
"dopplerUncertainty" "dopplerUncertainty"
}, },

View File

@ -56,12 +56,12 @@ memb_dopplerUncertainty_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr
} }
} }
static asn_per_constraints_t asn_PER_memb_doppler1_constr_2 = { static asn_per_constraints_t ASN_PER_MEMB_DOPPLER1_CONSTR_2 = {
{ APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */, { APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_dopplerUncertainty_constr_3 = { static asn_per_constraints_t ASN_PER_MEMB_DOPPLER_UNCERTAINTY_CONSTR_3 = {
{ APC_CONSTRAINED, 3, 3, 0, 4 } /* (0..4) */, { APC_CONSTRAINED, 3, 3, 0, 4 } /* (0..4) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -72,7 +72,7 @@ static asn_TYPE_member_t asn_MBR_AdditionalDopplerFields_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_doppler1_constraint_1, memb_doppler1_constraint_1,
&asn_PER_memb_doppler1_constr_2, &ASN_PER_MEMB_DOPPLER1_CONSTR_2,
0, 0,
"doppler1" "doppler1"
}, },
@ -81,7 +81,7 @@ static asn_TYPE_member_t asn_MBR_AdditionalDopplerFields_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_dopplerUncertainty_constraint_1, memb_dopplerUncertainty_constraint_1,
&asn_PER_memb_dopplerUncertainty_constr_3, &ASN_PER_MEMB_DOPPLER_UNCERTAINTY_CONSTR_3,
0, 0,
"dopplerUncertainty" "dopplerUncertainty"
}, },

View File

@ -111,7 +111,7 @@ AlertFlag_encode_uper(asn_TYPE_descriptor_t *td,
return td->uper_encoder(td, constraints, structure, per_out); return td->uper_encoder(td, constraints, structure, per_out);
} }
static asn_per_constraints_t asn_PER_type_AlertFlag_constr_1 = { static asn_per_constraints_t ASN_PER_TYPE_ALERT_FLAG_CONSTR_1 = {
{ APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -138,7 +138,7 @@ asn_TYPE_descriptor_t asn_DEF_AlertFlag = {
asn_DEF_AlertFlag_tags_1, /* Same as above */ asn_DEF_AlertFlag_tags_1, /* Same as above */
sizeof(asn_DEF_AlertFlag_tags_1) sizeof(asn_DEF_AlertFlag_tags_1)
/sizeof(asn_DEF_AlertFlag_tags_1[0]), /* 1 */ /sizeof(asn_DEF_AlertFlag_tags_1[0]), /* 1 */
&asn_PER_type_AlertFlag_constr_1, &ASN_PER_TYPE_ALERT_FLAG_CONSTR_1,
0, 0, /* No members */ 0, 0, /* No members */
0 /* No specifics */ 0 /* No specifics */
}; };

View File

@ -256,52 +256,52 @@ memb_kepAlmanacAF1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
} }
} }
static asn_per_constraints_t asn_PER_memb_kepAlmanacE_constr_2 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_E_CONSTR_2 = {
{ APC_CONSTRAINED, 11, 11, 0, 2047 } /* (0..2047) */, { APC_CONSTRAINED, 11, 11, 0, 2047 } /* (0..2047) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepAlmanacDeltaI_constr_3 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_DELTA_I_CONSTR_3 = {
{ APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */, { APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepAlmanacOmegaDot_constr_4 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_OMEGA_DOT_CONSTR_4 = {
{ APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */, { APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepSVHealth_constr_5 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_SV_HEALTH_CONSTR_5 = {
{ APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */, { APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepAlmanacAPowerHalf_constr_6 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_A_POWER_HALF_CONSTR_6 = {
{ APC_CONSTRAINED, 17, -1, -65536, 65535 } /* (-65536..65535) */, { APC_CONSTRAINED, 17, -1, -65536, 65535 } /* (-65536..65535) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepAlmanacOmega0_constr_7 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_OMEGA0_CONSTR_7 = {
{ APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */, { APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepAlmanacW_constr_8 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_W_CONSTR_8 = {
{ APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */, { APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepAlmanacM0_constr_9 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_M0_CONSTR_9 = {
{ APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */, { APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepAlmanacAF0_constr_10 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_A_F0_CONSTR_10 = {
{ APC_CONSTRAINED, 14, 14, -8192, 8191 } /* (-8192..8191) */, { APC_CONSTRAINED, 14, 14, -8192, 8191 } /* (-8192..8191) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_kepAlmanacAF1_constr_11 = { static asn_per_constraints_t ASN_PER_MEMB_KEP_ALMANAC_A_F1_CONSTR_11 = {
{ APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */, { APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -312,7 +312,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacE_constraint_1, memb_kepAlmanacE_constraint_1,
&asn_PER_memb_kepAlmanacE_constr_2, &ASN_PER_MEMB_KEP_ALMANAC_E_CONSTR_2,
0, 0,
"kepAlmanacE" "kepAlmanacE"
}, },
@ -321,7 +321,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacDeltaI_constraint_1, memb_kepAlmanacDeltaI_constraint_1,
&asn_PER_memb_kepAlmanacDeltaI_constr_3, &ASN_PER_MEMB_KEP_ALMANAC_DELTA_I_CONSTR_3,
0, 0,
"kepAlmanacDeltaI" "kepAlmanacDeltaI"
}, },
@ -330,7 +330,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacOmegaDot_constraint_1, memb_kepAlmanacOmegaDot_constraint_1,
&asn_PER_memb_kepAlmanacOmegaDot_constr_4, &ASN_PER_MEMB_KEP_ALMANAC_OMEGA_DOT_CONSTR_4,
0, 0,
"kepAlmanacOmegaDot" "kepAlmanacOmegaDot"
}, },
@ -339,7 +339,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepSVHealth_constraint_1, memb_kepSVHealth_constraint_1,
&asn_PER_memb_kepSVHealth_constr_5, &ASN_PER_MEMB_KEP_SV_HEALTH_CONSTR_5,
0, 0,
"kepSVHealth" "kepSVHealth"
}, },
@ -348,7 +348,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacAPowerHalf_constraint_1, memb_kepAlmanacAPowerHalf_constraint_1,
&asn_PER_memb_kepAlmanacAPowerHalf_constr_6, &ASN_PER_MEMB_KEP_ALMANAC_A_POWER_HALF_CONSTR_6,
0, 0,
"kepAlmanacAPowerHalf" "kepAlmanacAPowerHalf"
}, },
@ -357,7 +357,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacOmega0_constraint_1, memb_kepAlmanacOmega0_constraint_1,
&asn_PER_memb_kepAlmanacOmega0_constr_7, &ASN_PER_MEMB_KEP_ALMANAC_OMEGA0_CONSTR_7,
0, 0,
"kepAlmanacOmega0" "kepAlmanacOmega0"
}, },
@ -366,7 +366,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacW_constraint_1, memb_kepAlmanacW_constraint_1,
&asn_PER_memb_kepAlmanacW_constr_8, &ASN_PER_MEMB_KEP_ALMANAC_W_CONSTR_8,
0, 0,
"kepAlmanacW" "kepAlmanacW"
}, },
@ -375,7 +375,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacM0_constraint_1, memb_kepAlmanacM0_constraint_1,
&asn_PER_memb_kepAlmanacM0_constr_9, &ASN_PER_MEMB_KEP_ALMANAC_M0_CONSTR_9,
0, 0,
"kepAlmanacM0" "kepAlmanacM0"
}, },
@ -384,7 +384,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacAF0_constraint_1, memb_kepAlmanacAF0_constraint_1,
&asn_PER_memb_kepAlmanacAF0_constr_10, &ASN_PER_MEMB_KEP_ALMANAC_A_F0_CONSTR_10,
0, 0,
"kepAlmanacAF0" "kepAlmanacAF0"
}, },
@ -393,7 +393,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_KeplerianSet_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_kepAlmanacAF1_constraint_1, memb_kepAlmanacAF1_constraint_1,
&asn_PER_memb_kepAlmanacAF1_constr_11, &ASN_PER_MEMB_KEP_ALMANAC_A_F1_CONSTR_11,
0, 0,
"kepAlmanacAF1" "kepAlmanacAF1"
}, },

View File

@ -31,7 +31,7 @@ memb_alamanacWNa_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
} }
} }
static asn_per_constraints_t asn_PER_memb_alamanacWNa_constr_2 = { static asn_per_constraints_t ASN_PER_MEMB_ALAMANAC_W_NA_CONSTR_2 = {
{ APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -42,7 +42,7 @@ static asn_TYPE_member_t asn_MBR_Almanac_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_alamanacWNa_constraint_1, memb_alamanacWNa_constraint_1,
&asn_PER_memb_alamanacWNa_constr_2, &ASN_PER_MEMB_ALAMANAC_W_NA_CONSTR_2,
0, 0,
"alamanacWNa" "alamanacWNa"
}, },

View File

@ -281,57 +281,57 @@ memb_almanacAF1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
} }
} }
static asn_per_constraints_t asn_PER_memb_almanacE_constr_3 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_E_CONSTR_3 = {
{ APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_alamanacToa_constr_4 = { static asn_per_constraints_t ASN_PER_MEMB_ALAMANAC_TOA_CONSTR_4 = {
{ APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacKsii_constr_5 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_KSII_CONSTR_5 = {
{ APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */, { APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacOmegaDot_constr_6 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_OMEGA_DOT_CONSTR_6 = {
{ APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */, { APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacSVhealth_constr_7 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_S_VHEALTH_CONSTR_7 = {
{ APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacAPowerHalf_constr_8 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_A_POWER_HALF_CONSTR_8 = {
{ APC_CONSTRAINED, 24, -1, 0, 16777215 } /* (0..16777215) */, { APC_CONSTRAINED, 24, -1, 0, 16777215 } /* (0..16777215) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacOmega0_constr_9 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_OMEGA0_CONSTR_9 = {
{ APC_CONSTRAINED, 24, -1, -8388608, 8388607 } /* (-8388608..8388607) */, { APC_CONSTRAINED, 24, -1, -8388608, 8388607 } /* (-8388608..8388607) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacW_constr_10 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_W_CONSTR_10 = {
{ APC_CONSTRAINED, 24, -1, -8388608, 8388607 } /* (-8388608..8388607) */, { APC_CONSTRAINED, 24, -1, -8388608, 8388607 } /* (-8388608..8388607) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacM0_constr_11 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_M0_CONSTR_11 = {
{ APC_CONSTRAINED, 24, -1, -8388608, 8388607 } /* (-8388608..8388607) */, { APC_CONSTRAINED, 24, -1, -8388608, 8388607 } /* (-8388608..8388607) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacAF0_constr_12 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_A_F0_CONSTR_12 = {
{ APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */, { APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
}; };
static asn_per_constraints_t asn_PER_memb_almanacAF1_constr_13 = { static asn_per_constraints_t ASN_PER_MEMB_ALMANAC_A_F1_CONSTR_13 = {
{ APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */, { APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -351,7 +351,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacE_constraint_1, memb_almanacE_constraint_1,
&asn_PER_memb_almanacE_constr_3, &ASN_PER_MEMB_ALMANAC_E_CONSTR_3,
0, 0,
"almanacE" "almanacE"
}, },
@ -360,7 +360,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_alamanacToa_constraint_1, memb_alamanacToa_constraint_1,
&asn_PER_memb_alamanacToa_constr_4, &ASN_PER_MEMB_ALAMANAC_TOA_CONSTR_4,
0, 0,
"alamanacToa" "alamanacToa"
}, },
@ -369,7 +369,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacKsii_constraint_1, memb_almanacKsii_constraint_1,
&asn_PER_memb_almanacKsii_constr_5, &ASN_PER_MEMB_ALMANAC_KSII_CONSTR_5,
0, 0,
"almanacKsii" "almanacKsii"
}, },
@ -378,7 +378,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacOmegaDot_constraint_1, memb_almanacOmegaDot_constraint_1,
&asn_PER_memb_almanacOmegaDot_constr_6, &ASN_PER_MEMB_ALMANAC_OMEGA_DOT_CONSTR_6,
0, 0,
"almanacOmegaDot" "almanacOmegaDot"
}, },
@ -387,7 +387,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacSVhealth_constraint_1, memb_almanacSVhealth_constraint_1,
&asn_PER_memb_almanacSVhealth_constr_7, &ASN_PER_MEMB_ALMANAC_S_VHEALTH_CONSTR_7,
0, 0,
"almanacSVhealth" "almanacSVhealth"
}, },
@ -396,7 +396,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacAPowerHalf_constraint_1, memb_almanacAPowerHalf_constraint_1,
&asn_PER_memb_almanacAPowerHalf_constr_8, &ASN_PER_MEMB_ALMANAC_A_POWER_HALF_CONSTR_8,
0, 0,
"almanacAPowerHalf" "almanacAPowerHalf"
}, },
@ -405,7 +405,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacOmega0_constraint_1, memb_almanacOmega0_constraint_1,
&asn_PER_memb_almanacOmega0_constr_9, &ASN_PER_MEMB_ALMANAC_OMEGA0_CONSTR_9,
0, 0,
"almanacOmega0" "almanacOmega0"
}, },
@ -414,7 +414,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacW_constraint_1, memb_almanacW_constraint_1,
&asn_PER_memb_almanacW_constr_10, &ASN_PER_MEMB_ALMANAC_W_CONSTR_10,
0, 0,
"almanacW" "almanacW"
}, },
@ -423,7 +423,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacM0_constraint_1, memb_almanacM0_constraint_1,
&asn_PER_memb_almanacM0_constr_11, &ASN_PER_MEMB_ALMANAC_M0_CONSTR_11,
0, 0,
"almanacM0" "almanacM0"
}, },
@ -432,7 +432,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacAF0_constraint_1, memb_almanacAF0_constraint_1,
&asn_PER_memb_almanacAF0_constr_12, &ASN_PER_MEMB_ALMANAC_A_F0_CONSTR_12,
0, 0,
"almanacAF0" "almanacAF0"
}, },
@ -441,7 +441,7 @@ static asn_TYPE_member_t asn_MBR_AlmanacElement_1[] = {
-1, /* IMPLICIT tag at current level */ -1, /* IMPLICIT tag at current level */
&asn_DEF_NativeInteger, &asn_DEF_NativeInteger,
memb_almanacAF1_constraint_1, memb_almanacAF1_constraint_1,
&asn_PER_memb_almanacAF1_constr_13, &ASN_PER_MEMB_ALMANAC_A_F1_CONSTR_13,
0, 0,
"almanacAF1" "almanacAF1"
}, },

View File

@ -111,7 +111,7 @@ AntiSpoofFlag_encode_uper(asn_TYPE_descriptor_t *td,
return td->uper_encoder(td, constraints, structure, per_out); return td->uper_encoder(td, constraints, structure, per_out);
} }
static asn_per_constraints_t asn_PER_type_AntiSpoofFlag_constr_1 = { static asn_per_constraints_t ASN_PER_TYPE_ANTI_SPOOF_FLAG_CONSTR_1 = {
{ APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -138,7 +138,7 @@ asn_TYPE_descriptor_t asn_DEF_AntiSpoofFlag = {
asn_DEF_AntiSpoofFlag_tags_1, /* Same as above */ asn_DEF_AntiSpoofFlag_tags_1, /* Same as above */
sizeof(asn_DEF_AntiSpoofFlag_tags_1) sizeof(asn_DEF_AntiSpoofFlag_tags_1)
/sizeof(asn_DEF_AntiSpoofFlag_tags_1[0]), /* 1 */ /sizeof(asn_DEF_AntiSpoofFlag_tags_1[0]), /* 1 */
&asn_PER_type_AntiSpoofFlag_constr_1, &ASN_PER_TYPE_ANTI_SPOOF_FLAG_CONSTR_1,
0, 0, /* No members */ 0, 0, /* No members */
0 /* No specifics */ 0 /* No specifics */
}; };

View File

@ -111,7 +111,7 @@ BCCHCarrier_encode_uper(asn_TYPE_descriptor_t *td,
return td->uper_encoder(td, constraints, structure, per_out); return td->uper_encoder(td, constraints, structure, per_out);
} }
static asn_per_constraints_t asn_PER_type_BCCHCarrier_constr_1 = { static asn_per_constraints_t ASN_PER_TYPE_BCCH_CARRIER_CONSTR_1 = {
{ APC_CONSTRAINED, 10, 10, 0, 1023 } /* (0..1023) */, { APC_CONSTRAINED, 10, 10, 0, 1023 } /* (0..1023) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */ 0, 0 /* No PER value map */
@ -138,7 +138,7 @@ asn_TYPE_descriptor_t asn_DEF_BCCHCarrier = {
asn_DEF_BCCHCarrier_tags_1, /* Same as above */ asn_DEF_BCCHCarrier_tags_1, /* Same as above */
sizeof(asn_DEF_BCCHCarrier_tags_1) sizeof(asn_DEF_BCCHCarrier_tags_1)
/sizeof(asn_DEF_BCCHCarrier_tags_1[0]), /* 1 */ /sizeof(asn_DEF_BCCHCarrier_tags_1[0]), /* 1 */
&asn_PER_type_BCCHCarrier_constr_1, &ASN_PER_TYPE_BCCH_CARRIER_CONSTR_1,
0, 0, /* No members */ 0, 0, /* No members */
0 /* No specifics */ 0 /* No specifics */
}; };

Some files were not shown because too many files have changed in this diff Show More