[hamradio-commits] [gnss-sdr] 134/236: Adding RX clock offset [s] storage in LS PVT class member
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Tue Apr 26 16:02:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch next
in repository gnss-sdr.
commit e37824787e5fc2d00460ae302886949cdc614816
Author: Javier Arribas <javiarribas at gmail.com>
Date: Tue Mar 29 18:12:59 2016 +0200
Adding RX clock offset [s] storage in LS PVT class member
---
src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc | 11 ++++++-----
src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc | 17 +++++++++--------
src/algorithms/PVT/libs/hybrid_ls_pvt.cc | 16 ++++++----------
src/algorithms/PVT/libs/pvt_solution.h | 7 ++++---
4 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc b/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc
index 23ff0ef..5a7bb82 100644
--- a/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc
+++ b/src/algorithms/PVT/libs/galileo_e1_ls_pvt.cc
@@ -57,7 +57,7 @@ galileo_e1_ls_pvt::galileo_e1_ls_pvt(int nchannels, std::string dump_filename, b
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "PVT lib dump enabled Log file: " << d_dump_filename.c_str();
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "Exception opening PVT lib dump file " << e.what();
}
@@ -164,7 +164,7 @@ bool galileo_e1_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map
DLOG(INFO) << "obs="<< obs;
DLOG(INFO) << "W=" << W;
- mypos = galileo_e1_ls_pvt::leastSquarePos(satpos, obs, W);
+ mypos = leastSquarePos(satpos, obs, W);
// Compute Gregorian time
utc = galileo_utc_model.GST_to_UTC_time(GST, Galileo_week_number);
@@ -176,7 +176,8 @@ bool galileo_e1_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map
DLOG(INFO) << "Galileo Position at TOW=" << galileo_current_time << " in ECEF (X,Y,Z) = " << mypos;
- galileo_e1_ls_pvt::cart2geo(static_cast<double>(mypos(0)), static_cast<double>(mypos(1)), static_cast<double>(mypos(2)), 4);
+ cart2geo(static_cast<double>(mypos(0)), static_cast<double>(mypos(1)), static_cast<double>(mypos(2)), 4);
+ d_rx_dt_m = mypos(3)/GALILEO_C_m_s; // Convert RX time offset from meters to seconds
//ToDo: Find an Observables/PVT random bug with some satellite configurations that gives an erratic PVT solution (i.e. height>50 km)
if (d_height_m > 50000)
{
@@ -185,10 +186,10 @@ bool galileo_e1_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map
}
DLOG(INFO) << "Galileo Position at " << boost::posix_time::to_simple_string(p_time)
<< " is Lat = " << d_latitude_d << " [deg], Long = " << d_longitude_d
- << " [deg], Height= " << d_height_m << " [m]";
+ << " [deg], Height= " << d_height_m << " [m]" << " RX time offset= " << d_rx_dt_m << " [s]";
// ###### Compute DOPs ########
- galileo_e1_ls_pvt::compute_DOP();
+ compute_DOP();
// ######## LOG FILE #########
if(d_flag_dump_enabled == true)
diff --git a/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc b/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc
index 6b1ba45..67dac54 100644
--- a/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc
+++ b/src/algorithms/PVT/libs/gps_l1_ca_ls_pvt.cc
@@ -58,7 +58,7 @@ gps_l1_ca_ls_pvt::gps_l1_ca_ls_pvt(int nchannels, std::string dump_filename, boo
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
LOG(INFO) << "PVT lib dump enabled Log file: " << d_dump_filename.c_str();
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "Exception opening PVT lib dump file " << e.what();
}
@@ -167,11 +167,12 @@ bool gps_l1_ca_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map,
DLOG(INFO) << "obs=" << obs;
DLOG(INFO) << "W=" << W;
- mypos = gps_l1_ca_ls_pvt::leastSquarePos(satpos, obs, W);
-
+ mypos = leastSquarePos(satpos, obs, W);
DLOG(INFO) << "(new)Position at TOW=" << GPS_current_time << " in ECEF (X,Y,Z) = " << mypos;
- gps_l1_ca_ls_pvt::cart2geo(mypos(0), mypos(1), mypos(2), 4);
+ cart2geo(static_cast<double>(mypos(0)), static_cast<double>(mypos(1)), static_cast<double>(mypos(2)), 4);
+
+ d_rx_dt_m = mypos(3)/GPS_C_m_s; // Convert RX time offset from meters to seconds
//ToDo: Find an Observables/PVT random bug with some satellite configurations that gives an erratic PVT solution (i.e. height>50 km)
if (d_height_m > 50000)
@@ -188,10 +189,10 @@ bool gps_l1_ca_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map,
LOG(INFO) << "(new)Position at " << boost::posix_time::to_simple_string(p_time)
<< " is Lat = " << d_latitude_d << " [deg], Long = " << d_longitude_d
- << " [deg], Height= " << d_height_m << " [m]";
+ << " [deg], Height= " << d_height_m << " [m]" << " RX time offset= " << d_rx_dt_m << " [s]";
// ###### Compute DOPs ########
- gps_l1_ca_ls_pvt::compute_DOP();
+ compute_DOP();
// ######## LOG FILE #########
if(d_flag_dump_enabled == true)
@@ -225,14 +226,14 @@ bool gps_l1_ca_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map,
tmp_double = d_height_m;
d_dump_file.write((char*)&tmp_double, sizeof(double));
}
- catch (std::ifstream::failure e)
+ catch (const std::ifstream::failure &e)
{
LOG(WARNING) << "Exception writing PVT LS dump file " << e.what();
}
}
// MOVING AVERAGE PVT
- gps_l1_ca_ls_pvt::pos_averaging(flag_averaging);
+ pos_averaging(flag_averaging);
}
else
{
diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc
index e5e332a..f3892bc 100644
--- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc
+++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc
@@ -239,8 +239,8 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
DLOG(INFO) << "obs="<< obs;
DLOG(INFO) << "W=" << W;
- mypos = hybrid_ls_pvt::leastSquarePos(satpos, obs, W);
-
+ mypos = leastSquarePos(satpos, obs, W);
+ d_rx_dt_m = mypos(3)/GPS_C_m_s; // Convert RX time offset from meters to seconds
// Compute GST and Gregorian time
if( GST != 0.0)
{
@@ -257,24 +257,20 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
d_position_UTC_time = p_time;
DLOG(INFO) << "HYBRID Position at TOW=" << hybrid_current_time << " in ECEF (X,Y,Z) = " << mypos;
- hybrid_ls_pvt::cart2geo(static_cast<double>(mypos(0)), static_cast<double>(mypos(1)), static_cast<double>(mypos(2)), 4);
+ cart2geo(static_cast<double>(mypos(0)), static_cast<double>(mypos(1)), static_cast<double>(mypos(2)), 4);
//ToDo: Find an Observables/PVT random bug with some satellite configurations that gives an erratic PVT solution (i.e. height>50 km)
if (d_height_m > 50000)
{
b_valid_position = false;
LOG(INFO) << "Hybrid Position at " << boost::posix_time::to_simple_string(p_time)
<< " is Lat = " << d_latitude_d << " [deg], Long = " << d_longitude_d
- << " [deg], Height= " << d_height_m << " [m]";
-
- //std::cout << "Hybrid Position at " << boost::posix_time::to_simple_string(p_time)
- // << " is Lat = " << d_latitude_d << " [deg], Long = " << d_longitude_d
- // << " [deg], Height= " << d_height_m << " [m]" << std::endl;
+ << " [deg], Height= " << d_height_m << " [m]" << " RX time offset= " << mypos(3) << " [s]";
return false;
}
LOG(INFO) << "Hybrid Position at " << boost::posix_time::to_simple_string(p_time)
<< " is Lat = " << d_latitude_d << " [deg], Long = " << d_longitude_d
- << " [deg], Height= " << d_height_m << " [m]";
+ << " [deg], Height= " << d_height_m << " [m]" << " RX time offset= " << d_rx_dt_m << " [s]";
// ###### Compute DOPs ########
hybrid_ls_pvt::compute_DOP();
@@ -318,7 +314,7 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_pseudoranges_map, do
}
// MOVING AVERAGE PVT
- hybrid_ls_pvt::pos_averaging(flag_averaging);
+ pos_averaging(flag_averaging);
}
else
{
diff --git a/src/algorithms/PVT/libs/pvt_solution.h b/src/algorithms/PVT/libs/pvt_solution.h
index 456f7da..1825e6d 100644
--- a/src/algorithms/PVT/libs/pvt_solution.h
+++ b/src/algorithms/PVT/libs/pvt_solution.h
@@ -48,9 +48,10 @@ class Pvt_Solution
public:
Pvt_Solution();
- double d_latitude_d;
- double d_longitude_d;
- double d_height_m;
+ double d_latitude_d; //!< RX position Latitude WGS84 [deg]
+ double d_longitude_d; //!< RX position Longitude WGS84 [deg]
+ double d_height_m; //!< RX position height WGS84 [m]
+ double d_rx_dt_m; //!< RX time offset [s]
boost::posix_time::ptime d_position_UTC_time;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list