mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-16 14:54:59 +00:00
Code cleaning
This commit is contained in:
parent
bb9346441c
commit
25bb7ae54d
@ -47,7 +47,9 @@
|
|||||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* -----------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "rtklib_solver.h"
|
#include "rtklib_solver.h"
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
@ -68,8 +70,7 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag
|
|||||||
d_flag_averaging = false;
|
d_flag_averaging = false;
|
||||||
rtk_ = rtk;
|
rtk_ = rtk;
|
||||||
|
|
||||||
pvt_sol = {{0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0},
|
pvt_sol = {{0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, '0', '0', '0', 0, 0, 0 };
|
||||||
'0', '0', '0', 0, 0, 0 };
|
|
||||||
|
|
||||||
// ############# ENABLE DATA FILE LOG #################
|
// ############# ENABLE DATA FILE LOG #################
|
||||||
if (d_flag_dump_enabled == true)
|
if (d_flag_dump_enabled == true)
|
||||||
@ -96,6 +97,7 @@ rtklib_solver::~rtklib_solver()
|
|||||||
d_dump_file.close();
|
d_dump_file.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool rtklib_solver::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, double Rx_time, bool flag_averaging)
|
bool rtklib_solver::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, double Rx_time, bool flag_averaging)
|
||||||
{
|
{
|
||||||
std::map<int,Gnss_Synchro>::iterator gnss_observables_iter;
|
std::map<int,Gnss_Synchro>::iterator gnss_observables_iter;
|
||||||
@ -188,7 +190,9 @@ bool rtklib_solver::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, dou
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// 3. If not found, insert the GPS L2 ephemeris and the observation
|
// 3. If not found, insert the GPS L2 ephemeris and the observation
|
||||||
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
//convert ephemeris from GNSS-SDR class to RTKLIB structure
|
||||||
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
eph_data[valid_obs] = eph_to_rtklib(gps_cnav_ephemeris_iter->second);
|
||||||
@ -238,7 +242,9 @@ bool rtklib_solver::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, dou
|
|||||||
LOG(INFO) << "RTKLIB rtkpos error message: " << rtk_.errbuf;
|
LOG(INFO) << "RTKLIB rtkpos error message: " << rtk_.errbuf;
|
||||||
d_rx_dt_s = 0; //reset rx time estimation
|
d_rx_dt_s = 0; //reset rx time estimation
|
||||||
d_valid_observations = 0;
|
d_valid_observations = 0;
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
d_valid_observations = rtk_.sol.ns; //record the number of valid satellites used by the PVT solver
|
d_valid_observations = rtk_.sol.ns; //record the number of valid satellites used by the PVT solver
|
||||||
pvt_sol = rtk_.sol;
|
pvt_sol = rtk_.sol;
|
||||||
b_valid_position = true;
|
b_valid_position = true;
|
||||||
|
@ -47,7 +47,10 @@
|
|||||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* -------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_RTKLIB_SOLVER_H_
|
#ifndef GNSS_SDR_RTKLIB_SOLVER_H_
|
||||||
#define GNSS_SDR_RTKLIB_SOLVER_H_
|
#define GNSS_SDR_RTKLIB_SOLVER_H_
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user