1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-07-13 07:04:25 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next

This commit is contained in:
Carles Fernandez 2018-09-04 08:28:03 +02:00
commit d235e0836a
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
5 changed files with 48 additions and 28 deletions

View File

@ -239,10 +239,10 @@ $ make
Please **DO NOT install** Google Test (do *not* type ```sudo make install```). Every user needs to compile his tests using the same compiler flags used to compile the installed Google Test libraries; otherwise he may run into undefined behaviors (i.e. the tests can behave strangely and may even crash for no obvious reasons). The reason is that C++ has this thing called the One-Definition Rule: if two C++ source files contain different definitions of the same class/function/variable, and you link them together, you violate the rule. The linker may or may not catch the error (in many cases it is not required by the C++ standard to catch the violation). If it does not, you get strange run-time behaviors that are unexpected and hard to debug. If you compile Google Test and your test code using different compiler flags, they may see different definitions of the same class/function/variable (e.g. due to the use of ```#if``` in Google Test). Therefore, for your sanity, we recommend to avoid installing pre-compiled Google Test libraries. Instead, each project should compile Google Test itself such that it can be sure that the same flags are used for both Google Test and the tests. The building system of GNSS-SDR does the compilation and linking of googletest to its own tests; it is only required that you tell the system where the googletest folder that you downloaded resides. Just add to your ```$HOME/.bashrc``` file the following line:
~~~~~~
export GTEST_DIR=/home/username/googletest-release-1.8.0/googletest
export GTEST_DIR=/home/username/googletest-release-1.8.1/googletest
~~~~~~
changing `/home/username/googletest-release-1.8.0/googletest` by the actual directory where you built googletest.
changing `/home/username/googletest-release-1.8.1/googletest` by the actual directory where you built googletest.

View File

@ -135,6 +135,14 @@
/usr/lib/sparc64-linux-gnu
/usr/lib/x86_64-linux-gnux32
/usr/lib/alpha-linux-gnu
/usr/lib/gcc/x86_64-linux-gnu/8 # libgfortran8
/usr/lib/gcc/aarch64-linux-gnu/8
/usr/lib/gcc/arm-linux-gnueabihf/8
/usr/lib/gcc/i686-linux-gnu/8
/usr/lib/gcc/powerpc64le-linux-gnu/8
/usr/lib/gcc/s390x-linux-gnu/8
/usr/lib/gcc/alpha-linux-gnu/8
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GFORTRAN DEFAULT_MSG GFORTRAN)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GFORTRAN DEFAULT_MSG GFORTRAN)

View File

@ -35,21 +35,34 @@ bool rtklib_solver_dump_reader::read_binary_obs()
{
try
{
d_dump_file.read(reinterpret_cast<char *>(&TOW_at_current_symbol_ms), sizeof(TOW_at_current_symbol_ms));
d_dump_file.read(reinterpret_cast<char *>(&week), sizeof(week));
d_dump_file.read(reinterpret_cast<char *>(&RX_time), sizeof(RX_time));
d_dump_file.read(reinterpret_cast<char *>(&clk_offset_s), sizeof(clk_offset_s));
d_dump_file.read(reinterpret_cast<char *>(&rr[0]), sizeof(rr));
d_dump_file.read(reinterpret_cast<char *>(&qr[0]), sizeof(qr));
d_dump_file.read(reinterpret_cast<char *>(&latitude), sizeof(latitude));
d_dump_file.read(reinterpret_cast<char *>(&longitude), sizeof(longitude));
d_dump_file.read(reinterpret_cast<char *>(&height), sizeof(height));
d_dump_file.read(reinterpret_cast<char *>(&ns), sizeof(ns));
d_dump_file.read(reinterpret_cast<char *>(&status), sizeof(status));
d_dump_file.read(reinterpret_cast<char *>(&type), sizeof(type));
d_dump_file.read(reinterpret_cast<char *>(&AR_ratio), sizeof(AR_ratio));
d_dump_file.read(reinterpret_cast<char *>(&AR_thres), sizeof(AR_thres));
d_dump_file.read(reinterpret_cast<char *>(&dop[0]), sizeof(dop));
d_dump_file.read(reinterpret_cast<char *>(&TOW_at_current_symbol_ms), sizeof(uint32_t));
d_dump_file.read(reinterpret_cast<char *>(&week), sizeof(uint32_t));
d_dump_file.read(reinterpret_cast<char *>(&RX_time), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&clk_offset_s), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&rr[0]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&rr[1]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&rr[2]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&rr[3]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&rr[4]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&rr[5]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&qr[0]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&qr[1]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&qr[2]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&qr[3]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&qr[4]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&qr[5]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&latitude), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&longitude), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&height), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&ns), sizeof(uint8_t));
d_dump_file.read(reinterpret_cast<char *>(&status), sizeof(uint8_t));
d_dump_file.read(reinterpret_cast<char *>(&type), sizeof(uint8_t));
d_dump_file.read(reinterpret_cast<char *>(&AR_ratio), sizeof(float));
d_dump_file.read(reinterpret_cast<char *>(&AR_thres), sizeof(float));
d_dump_file.read(reinterpret_cast<char *>(&dop[0]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&dop[1]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&dop[2]), sizeof(double));
d_dump_file.read(reinterpret_cast<char *>(&dop[3]), sizeof(double));
}
catch (const std::ifstream::failure &e)
{
@ -77,8 +90,7 @@ bool rtklib_solver_dump_reader::restart()
int64_t rtklib_solver_dump_reader::num_epochs()
{
std::ifstream::pos_type size;
int epoch_size_bytes = sizeof(TOW_at_current_symbol_ms) + sizeof(week) + sizeof(RX_time) + sizeof(clk_offset_s) + sizeof(rr) + sizeof(qr) + sizeof(latitude) + sizeof(longitude) + sizeof(height) + sizeof(ns) + sizeof(status) + sizeof(type) + sizeof(AR_ratio) + sizeof(AR_thres) + sizeof(dop);
int epoch_size_bytes = 2 * sizeof(uint32_t) + 21 * sizeof(double) + 3 * sizeof(uint8_t) + 2 * sizeof(float);
std::ifstream tmpfile(d_dump_filename.c_str(), std::ios::binary | std::ios::ate);
if (tmpfile.is_open())
{

View File

@ -45,7 +45,7 @@ public:
int64_t num_epochs();
bool open_obs_file(std::string out_file);
//rtklib_solver dump variables
// rtklib_solver dump variables
// TOW
uint32_t TOW_at_current_symbol_ms;
// WEEK
@ -57,7 +57,7 @@ public:
// ECEF POS X,Y,X [m] + ECEF VEL X,Y,X [m/s] (6 x double)
double rr[6];
// position variance/covariance (m^2) {c_xx,c_yy,c_zz,c_xy,c_yz,c_zx} (6 x double)
float qr[6];
double qr[6];
// GEO user position Latitude [deg]
double latitude;
@ -72,12 +72,12 @@ public:
uint8_t status;
// RTKLIB solution type (0:xyz-ecef,1:enu-baseline)
uint8_t type;
//AR ratio factor for validation
// AR ratio factor for validation
float AR_ratio;
//AR ratio threshold for validation
// AR ratio threshold for validation
float AR_thres;
//GDOP//PDOP//HDOP//VDOP
// GDOP / PDOP / HDOP / VDOP
double dop[4];
private:

View File

@ -614,13 +614,13 @@ void StaticPositionSystemTest::check_results()
stm << "---- ACCURACY ----" << std::endl;
stm << "2DRMS = " << 2 * sqrt(sigma_E_2_accuracy + sigma_N_2_accuracy) << " [m]" << std::endl;
stm << "DRMS = " << sqrt(sigma_E_2_accuracy + sigma_N_2_accuracy) << " [m]" << std::endl;
stm << "CEP = " << 0.62 * compute_stdev_accuracy(pos_n, 0.0) + 0.56 * compute_stdev_accuracy(pos_e, 0.0) << " [m]" << std::endl;
stm << "CEP = " << 0.62 * compute_stdev_accuracy(pos_n, ref_n) + 0.56 * compute_stdev_accuracy(pos_e, ref_e) << " [m]" << std::endl;
stm << "99% SAS = " << 1.122 * (sigma_E_2_accuracy + sigma_N_2_accuracy + sigma_U_2_accuracy) << " [m]" << std::endl;
stm << "90% SAS = " << 0.833 * (sigma_E_2_accuracy + sigma_N_2_accuracy + sigma_U_2_accuracy) << " [m]" << std::endl;
stm << "MRSE = " << sqrt(sigma_E_2_accuracy + sigma_N_2_accuracy + sigma_U_2_accuracy) << " [m]" << std::endl;
stm << "SEP = " << 0.51 * (sigma_E_2_accuracy + sigma_N_2_accuracy + sigma_U_2_accuracy) << " [m]" << std::endl;
stm << "Bias 2D = " << sqrt(std::pow(mean__e, 2.0) + std::pow(mean__n, 2.0)) << " [m]" << std::endl;
stm << "Bias 3D = " << sqrt(std::pow(mean__e, 2.0) + std::pow(mean__n, 2.0) + std::pow(mean__u, 2.0)) << " [m]" << std::endl;
stm << "Bias 2D = " << sqrt(std::pow(abs(mean__e - ref_e), 2.0) + std::pow(abs(mean__n - ref_n), 2.0)) << " [m]" << std::endl;
stm << "Bias 3D = " << sqrt(std::pow(abs(mean__e - ref_e), 2.0) + std::pow(abs(mean__n - ref_n), 2.0) + std::pow(abs(mean__u - ref_u), 2.0)) << " [m]" << std::endl;
stm << std::endl;
}