mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-13 19:00:35 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
5571e14f56
@ -164,7 +164,7 @@ bool galileo_e1_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map
|
||||
DLOG(INFO) << "satpos=" << satpos;
|
||||
DLOG(INFO) << "obs="<< obs;
|
||||
DLOG(INFO) << "W=" << W;
|
||||
|
||||
try{
|
||||
// check if this is the initial position computation
|
||||
if (d_rx_dt_s == 0)
|
||||
{
|
||||
@ -239,6 +239,12 @@ bool galileo_e1_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map
|
||||
|
||||
// MOVING AVERAGE PVT
|
||||
galileo_e1_ls_pvt::pos_averaging(flag_averaging);
|
||||
}catch(const std::exception & e)
|
||||
{
|
||||
d_rx_dt_s=0;//reset rx time estimation
|
||||
LOG(WARNING)<<"Problem with the solver, invalid solution!"<< e.what();
|
||||
b_valid_position = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -165,6 +165,7 @@ bool gps_l1_ca_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map,
|
||||
DLOG(INFO) << "obs=" << obs;
|
||||
DLOG(INFO) << "W=" << W;
|
||||
|
||||
try{
|
||||
// check if this is the initial position computation
|
||||
if (d_rx_dt_s == 0)
|
||||
{
|
||||
@ -239,6 +240,13 @@ bool gps_l1_ca_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map,
|
||||
|
||||
// MOVING AVERAGE PVT
|
||||
pos_averaging(flag_averaging);
|
||||
|
||||
}catch(const std::exception & e)
|
||||
{
|
||||
d_rx_dt_s=0;//reset rx time estimation
|
||||
LOG(WARNING)<<"Problem with the solver, invalid solution!"<< e.what();
|
||||
b_valid_position = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -288,7 +288,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, dou
|
||||
DLOG(INFO) << "satpos=" << satpos;
|
||||
DLOG(INFO) << "obs=" << obs;
|
||||
DLOG(INFO) << "W=" << W;
|
||||
|
||||
try{
|
||||
// check if this is the initial position computation
|
||||
if (d_rx_dt_s == 0)
|
||||
{
|
||||
@ -374,6 +374,12 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, dou
|
||||
|
||||
// MOVING AVERAGE PVT
|
||||
pos_averaging(flag_averaging);
|
||||
}catch(const std::exception & e)
|
||||
{
|
||||
d_rx_dt_s=0;//reset rx time estimation
|
||||
LOG(WARNING)<<"Problem with the solver, invalid solution!"<< e.what();
|
||||
b_valid_position = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
#include "ls_pvt.h"
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include "GPS_L1_CA.h"
|
||||
#include <gflags/gflags.h>
|
||||
#include <glog/logging.h>
|
||||
@ -284,16 +285,15 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat & satpos, const arma::vec & obs
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
//-- compute the Dilution Of Precision values
|
||||
d_Q = arma::inv(arma::htrans(A) * A);
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
d_Q = arma::zeros(4,4);
|
||||
}
|
||||
|
||||
// check the consistency of the PVT solution
|
||||
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;
|
||||
throw std::runtime_error("Receiver time offset out of range!");
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user