mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-04 13:19:19 +00:00
Applying code formatting rules
This commit is contained in:
parent
fa19b2e6a4
commit
c561d7e799
@ -2,13 +2,13 @@
|
||||
|
||||
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
|
||||
|
||||
link to website: https://gnsssdrbeidoub1igsoc2018.wordpress.com/
|
||||
|
||||
**Welcome to GNSS-SDR!**
|
||||
|
||||
This program is a software-defined receiver which is able to process (that is, to perform detection, synchronization, demodulation and decoding of the navigation message, computation of observables and, finally, computation of position fixes) the following Global Navigation Satellite System's signals:
|
||||
|
||||
In the L1 band:
|
||||
- 🛰 BeiDou B1I (centered at 1561.098 MHz) :white_check_mark:
|
||||
- 🛰 GPS L1 C/A (centered at 1575.42 MHz) :white_check_mark:
|
||||
- 🛰 Galileo E1b/c (centered at 1575.42 MHz) :white_check_mark:
|
||||
- 🛰 GLONASS L1 C/A (centered at 1601.72 MHz) :white_check_mark:
|
||||
|
@ -5,8 +5,8 @@
|
||||
[GNSS-SDR]
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_hz: Internal signal sampling frequency after the signal conditioning stage [Hz].
|
||||
GNSS-SDR.internal_fs_hz=6625000
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [Hz].
|
||||
GNSS-SDR.internal_fs_sps=6625000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
@ -54,7 +54,6 @@ Channel.signal=1R
|
||||
Acquisition_1R.dump=false
|
||||
Acquisition_1R.dump_filename=./acq_dump.dat
|
||||
Acquisition_1R.item_type=cshort
|
||||
Acquisition_1R.if=0
|
||||
Acquisition_1R.sampled_ms=1
|
||||
Acquisition_1R.implementation=GLONASS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1R.threshold=0.008
|
||||
@ -68,7 +67,6 @@ Acquisition_1R.tong_max_dwells=20
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_1R.implementation=GLONASS_L1_CA_DLL_PLL_C_Aid_Tracking
|
||||
Tracking_1R.item_type=cshort
|
||||
Tracking_1R.if=0
|
||||
Tracking_1R.dump=false
|
||||
Tracking_1R.dump_filename=../data/epl_tracking_ch_
|
||||
Tracking_1R.pll_bw_hz=40.0;
|
||||
@ -78,7 +76,6 @@ Tracking_1R.order=3;
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_1R.implementation=GLONASS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_1R.dump=false
|
||||
TelemetryDecoder_1R.decimation_factor=1;
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
|
@ -1,110 +0,0 @@
|
||||
; This is a GNSS-SDR configuration file
|
||||
; The configuration API is described at https://gnss-sdr.org/docs/sp-blocks/
|
||||
|
||||
; You can define your own receiver and invoke it by doing
|
||||
; gnss-sdr --config_file=my_GNSS_SDR_configuration.conf
|
||||
;
|
||||
|
||||
[GNSS-SDR]
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
;internal_fs_sps: Internal signal sampling frequency after the signal conditioning stage [samples per second].
|
||||
GNSS-SDR.internal_fs_sps=99375000
|
||||
|
||||
;######### CONTROL_THREAD CONFIG ############
|
||||
ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/media/dmiralles/Seagate Backup Plus Drive/GNSS Data/Beidou_B1_IF_signal.bin
|
||||
SignalSource.item_type=byte
|
||||
SignalSource.sampling_frequency=99375000
|
||||
SignalSource.samples=0
|
||||
SignalSource.repeat=false
|
||||
SignalSource.dump=false
|
||||
SignalSource.enable_throttle_control=false
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
DataTypeAdapter.implementation=Byte_To_Short
|
||||
InputFilter.implementation=Freq_Xlating_Fir_Filter
|
||||
InputFilter.input_item_type=short
|
||||
InputFilter.output_item_type=gr_complex
|
||||
InputFilter.taps_item_type=float
|
||||
InputFilter.number_of_taps=5
|
||||
InputFilter.number_of_bands=2
|
||||
InputFilter.band1_begin=0.0
|
||||
InputFilter.band1_end=0.70
|
||||
InputFilter.band2_begin=0.80
|
||||
InputFilter.band2_end=1.0
|
||||
InputFilter.ampl1_begin=1.0
|
||||
InputFilter.ampl1_end=1.0
|
||||
InputFilter.ampl2_begin=0.0
|
||||
InputFilter.ampl2_end=0.0
|
||||
InputFilter.band1_error=1.0
|
||||
InputFilter.band2_error=1.0
|
||||
InputFilter.filter_type=bandpass
|
||||
InputFilter.grid_density=16
|
||||
InputFilter.sampling_frequency=99375000
|
||||
InputFilter.IF=14580000
|
||||
Resampler.implementation=Direct_Resampler
|
||||
Resampler.sample_freq_in=99375000
|
||||
Resampler.sample_freq_out=99375000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=8
|
||||
Channels.in_acquisition=1
|
||||
Channel.signal=1C
|
||||
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.coherent_integration_time_ms=1
|
||||
Acquisition_1C.threshold=3.5
|
||||
;Acquisition_1C.pfa=0.000001;
|
||||
Acquisition_1C.doppler_max=14000
|
||||
Acquisition_1C.doppler_step=100
|
||||
Acquisition_1C.dump=true
|
||||
Acquisition_1C.dump_filename=./gps_acq
|
||||
Acquisition_1C.blocking=false;
|
||||
Acquisition_1C.use_CFAR_algorithm=false
|
||||
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.pll_bw_hz=30.0;
|
||||
Tracking_1C.dll_bw_hz=3.0;
|
||||
Tracking_1C.dump=true;
|
||||
Tracking_1C.dump_filename=./epl_tracking_ch_
|
||||
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
TelemetryDecoder_1C.dump=false
|
||||
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=Hybrid_Observables
|
||||
Observables.dump=true
|
||||
Observables.dump_filename=./observables.dat
|
||||
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=RTKLIB_PVT
|
||||
PVT.positioning_mode=Single ; options: Single, Static, Kinematic, PPP_Static, PPP_Kinematic
|
||||
PVT.iono_model=Broadcast ; options: OFF, Broadcast, SBAS, Iono-Free-LC, Estimate_STEC, IONEX
|
||||
PVT.trop_model=Saastamoinen ; options: OFF, Saastamoinen, SBAS, Estimate_ZTD, Estimate_ZTD_Grad
|
||||
PVT.output_rate_ms=100
|
||||
PVT.display_rate_ms=500
|
||||
PVT.dump_filename=./PVT
|
||||
PVT.nmea_dump_filename=./gnss_sdr_pvt.nmea;
|
||||
PVT.flag_nmea_tty_port=false;
|
||||
PVT.nmea_dump_devname=/dev/pts/4
|
||||
PVT.flag_rtcm_server=false
|
||||
PVT.flag_rtcm_tty_port=false
|
||||
PVT.rtcm_dump_devname=/dev/pts/1
|
||||
PVT.dump=false
|
@ -16,7 +16,7 @@ ControlThread.wait_for_flowgraph=false
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/home/sergi/gnss/gnss-sdr/data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE
|
||||
SignalSource.filename=/archive/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat ; <- PUT YOUR FILE HERE
|
||||
SignalSource.item_type=ishort
|
||||
SignalSource.sampling_frequency=4000000
|
||||
SignalSource.samples=0
|
||||
@ -29,14 +29,13 @@ SignalSource.enable_throttle_control=false
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
|
||||
DataTypeAdapter.implementation=Ishort_To_Complex
|
||||
DataTypeAdapter.implementation=Ishort_To_Cshort
|
||||
InputFilter.implementation=Pass_Through
|
||||
InputFilter.item_type=gr_complex
|
||||
InputFilter.item_type=cshort
|
||||
Resampler.implementation=Direct_Resampler
|
||||
Resampler.sample_freq_in=4000000
|
||||
Resampler.sample_freq_out=2000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
Resampler.item_type=cshort
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=8
|
||||
@ -46,19 +45,19 @@ Channel.signal=1C
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.item_type=cshort
|
||||
Acquisition_1C.coherent_integration_time_ms=1
|
||||
Acquisition_1C.threshold=0.008
|
||||
;Acquisition_1C.pfa=0.000001
|
||||
Acquisition_1C.doppler_max=10000
|
||||
Acquisition_1C.doppler_step=250
|
||||
Acquisition_1C.dump=true
|
||||
Acquisition_1C.dump=false
|
||||
Acquisition_1C.dump_filename=./acq_dump.dat
|
||||
Acquisition_1C.blocking=false;
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_C_Aid_Tracking
|
||||
Tracking_1C.item_type=cshort
|
||||
Tracking_1C.pll_bw_hz=40.0;
|
||||
Tracking_1C.dll_bw_hz=4.0;
|
||||
Tracking_1C.order=3;
|
||||
|
@ -1,56 +0,0 @@
|
||||
[GNSS-SDR]
|
||||
|
||||
|
||||
;######### GLOBAL OPTIONS ##################
|
||||
GNSS-SDR.internal_fs_hz=2000000
|
||||
|
||||
;######### SIGNAL_SOURCE CONFIG ############
|
||||
SignalSource.implementation=File_Signal_Source
|
||||
SignalSource.filename=/home/sergi/gnss/gnss-sdr/data/2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN.dat
|
||||
SignalSource.item_type=ishort
|
||||
SignalSource.sampling_frequency=4000000
|
||||
SignalSource.freq=1575420000
|
||||
SignalSource.samples=0
|
||||
|
||||
;######### SIGNAL_CONDITIONER CONFIG ############
|
||||
SignalConditioner.implementation=Signal_Conditioner
|
||||
DataTypeAdapter.implementation=Ishort_To_Complex
|
||||
InputFilter.implementation=Pass_Through
|
||||
InputFilter.item_type=gr_complex
|
||||
Resampler.implementation=Direct_Resampler
|
||||
Resampler.sample_freq_in=4000000
|
||||
Resampler.sample_freq_out=2000000
|
||||
Resampler.item_type=gr_complex
|
||||
|
||||
;######### CHANNELS GLOBAL CONFIG ############
|
||||
Channels_1C.count=8
|
||||
Channels.in_acquisition=1
|
||||
Channel.signal=1C
|
||||
|
||||
;######### ACQUISITION GLOBAL CONFIG ############
|
||||
Acquisition_1C.implementation=GPS_L1_CA_PCPS_Acquisition
|
||||
Acquisition_1C.item_type=gr_complex
|
||||
Acquisition_1C.threshold=0.008
|
||||
Acquisition_1C.doppler_max=10000
|
||||
Acquisition_1C.doppler_step=250
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_1C.implementation=GPS_L1_CA_DLL_PLL_Tracking
|
||||
Tracking_1C.item_type=gr_complex
|
||||
Tracking_1C.pll_bw_hz=40.0;
|
||||
Tracking_1C.dll_bw_hz=4.0;
|
||||
|
||||
;######### TELEMETRY DECODER GPS CONFIG ############
|
||||
TelemetryDecoder_1C.implementation=GPS_L1_CA_Telemetry_Decoder
|
||||
|
||||
;######### OBSERVABLES CONFIG ############
|
||||
Observables.implementation=GPS_L1_CA_Observables
|
||||
|
||||
;######### PVT CONFIG ############
|
||||
PVT.implementation=GPS_L1_CA_PVT
|
||||
PVT.averaging_depth=100
|
||||
PVT.flag_averaging=true
|
||||
PVT.output_rate_ms=10
|
||||
PVT.display_rate_ms=500
|
||||
|
||||
|
@ -1,561 +0,0 @@
|
||||
/*!
|
||||
* \file rtklib_pvt.cc
|
||||
* \brief Interface of a Position Velocity and Time computation block
|
||||
* \author Javier Arribas, 2017. jarribas(at)cttc.es
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
||||
*
|
||||
* GNSS-SDR is a software defined Global Navigation
|
||||
* Satellite Systems receiver
|
||||
*
|
||||
* This file is part of GNSS-SDR.
|
||||
*
|
||||
* GNSS-SDR is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNSS-SDR is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#include "rtklib_pvt.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <boost/archive/xml_oarchive.hpp>
|
||||
#include <boost/archive/xml_iarchive.hpp>
|
||||
#include <boost/math/common_factor_rt.hpp>
|
||||
#include <boost/serialization/map.hpp>
|
||||
#include <glog/logging.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams)
|
||||
{
|
||||
// dump parameters
|
||||
std::string default_dump_filename = "./pvt.dat";
|
||||
std::string default_nmea_dump_filename = "./nmea_pvt.nmea";
|
||||
std::string default_nmea_dump_devname = "/dev/tty1";
|
||||
std::string default_rtcm_dump_devname = "/dev/pts/1";
|
||||
DLOG(INFO) << "role " << role;
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
|
||||
// output rate
|
||||
int output_rate_ms = configuration->property(role + ".output_rate_ms", 500);
|
||||
|
||||
// display rate
|
||||
int display_rate_ms = configuration->property(role + ".display_rate_ms", 500);
|
||||
|
||||
// NMEA Printer settings
|
||||
bool flag_nmea_tty_port = configuration->property(role + ".flag_nmea_tty_port", false);
|
||||
std::string nmea_dump_filename = configuration->property(role + ".nmea_dump_filename", default_nmea_dump_filename);
|
||||
std::string nmea_dump_devname = configuration->property(role + ".nmea_dump_devname", default_nmea_dump_devname);
|
||||
|
||||
// RINEX version
|
||||
int rinex_version = configuration->property(role + ".rinex_version", 3);
|
||||
if (FLAGS_RINEX_version.compare("3.01") == 0)
|
||||
{
|
||||
rinex_version = 3;
|
||||
}
|
||||
else if (FLAGS_RINEX_version.compare("3.02") == 0)
|
||||
{
|
||||
rinex_version = 3;
|
||||
}
|
||||
else if (FLAGS_RINEX_version.compare("3") == 0)
|
||||
{
|
||||
rinex_version = 3;
|
||||
}
|
||||
else if (FLAGS_RINEX_version.compare("2.11") == 0)
|
||||
{
|
||||
rinex_version = 2;
|
||||
}
|
||||
else if (FLAGS_RINEX_version.compare("2.10") == 0)
|
||||
{
|
||||
rinex_version = 2;
|
||||
}
|
||||
else if (FLAGS_RINEX_version.compare("2") == 0)
|
||||
{
|
||||
rinex_version = 2;
|
||||
}
|
||||
int rinexobs_rate_ms = boost::math::lcm(configuration->property(role + ".rinexobs_rate_ms", 1000), output_rate_ms);
|
||||
int rinexnav_rate_ms = boost::math::lcm(configuration->property(role + ".rinexnav_rate_ms", 6000), output_rate_ms);
|
||||
|
||||
// RTCM Printer settings
|
||||
bool flag_rtcm_tty_port = configuration->property(role + ".flag_rtcm_tty_port", false);
|
||||
std::string rtcm_dump_devname = configuration->property(role + ".rtcm_dump_devname", default_rtcm_dump_devname);
|
||||
bool flag_rtcm_server = configuration->property(role + ".flag_rtcm_server", false);
|
||||
unsigned short rtcm_tcp_port = configuration->property(role + ".rtcm_tcp_port", 2101);
|
||||
unsigned short rtcm_station_id = configuration->property(role + ".rtcm_station_id", 1234);
|
||||
// RTCM message rates: least common multiple with output_rate_ms
|
||||
int rtcm_MT1019_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1019_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MT1020_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1020_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MT1045_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1045_rate_ms", 5000), output_rate_ms);
|
||||
int rtcm_MSM_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MSM_rate_ms", 1000), output_rate_ms);
|
||||
int rtcm_MT1077_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1077_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
int rtcm_MT1087_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1087_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
int rtcm_MT1097_rate_ms = boost::math::lcm(configuration->property(role + ".rtcm_MT1097_rate_ms", rtcm_MSM_rate_ms), output_rate_ms);
|
||||
std::map<int, int> rtcm_msg_rate_ms;
|
||||
rtcm_msg_rate_ms[1019] = rtcm_MT1019_rate_ms;
|
||||
rtcm_msg_rate_ms[1020] = rtcm_MT1020_rate_ms;
|
||||
rtcm_msg_rate_ms[1045] = rtcm_MT1045_rate_ms;
|
||||
for (int k = 1071; k < 1078; k++) // All GPS MSM
|
||||
{
|
||||
rtcm_msg_rate_ms[k] = rtcm_MT1077_rate_ms;
|
||||
}
|
||||
for (int k = 1081; k < 1088; k++) // All GLONASS MSM
|
||||
{
|
||||
rtcm_msg_rate_ms[k] = rtcm_MT1087_rate_ms;
|
||||
}
|
||||
for (int k = 1091; k < 1098; k++) // All Galileo MSM
|
||||
{
|
||||
rtcm_msg_rate_ms[k] = rtcm_MT1097_rate_ms;
|
||||
}
|
||||
// getting names from the config file, if available
|
||||
// default filename for assistance data
|
||||
const std::string eph_default_xml_filename = "./gps_ephemeris.xml";
|
||||
const std::string utc_default_xml_filename = "./gps_utc_model.xml";
|
||||
const std::string iono_default_xml_filename = "./gps_iono.xml";
|
||||
const std::string ref_time_default_xml_filename = "./gps_ref_time.xml";
|
||||
const std::string ref_location_default_xml_filename = "./gps_ref_location.xml";
|
||||
eph_xml_filename_ = configuration->property("GNSS-SDR.SUPL_gps_ephemeris_xml", eph_default_xml_filename);
|
||||
//std::string utc_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_utc_model.xml", utc_default_xml_filename);
|
||||
//std::string iono_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_iono_xml", iono_default_xml_filename);
|
||||
//std::string ref_time_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_time_xml", ref_time_default_xml_filename);
|
||||
//std::string ref_location_xml_filename = configuration_->property("GNSS-SDR.SUPL_gps_ref_location_xml", ref_location_default_xml_filename);
|
||||
|
||||
// Infer the type of receiver
|
||||
/*
|
||||
* TYPE | RECEIVER
|
||||
* 0 | Unknown
|
||||
* 1 | GPS L1 C/A
|
||||
* 2 | GPS L2C
|
||||
* 3 | GPS L5
|
||||
* 4 | Galileo E1B
|
||||
* 5 | Galileo E5a
|
||||
* 6 | Galileo E5b
|
||||
* 7 | GPS L1 C/A + GPS L2C
|
||||
* 8 | GPS L1 C/A + GPS L5
|
||||
* 9 | GPS L1 C/A + Galileo E1B
|
||||
* 10 | GPS L1 C/A + Galileo E5a
|
||||
* 11 | GPS L1 C/A + Galileo E5b
|
||||
* 12 | Galileo E1B + GPS L2C
|
||||
* 13 | Galileo E1B + GPS L5
|
||||
* 14 | Galileo E1B + Galileo E5a
|
||||
* 15 | Galileo E1B + Galileo E5b
|
||||
* 16 | GPS L2C + GPS L5
|
||||
* 17 | GPS L2C + Galileo E5a
|
||||
* 18 | GPS L2C + Galileo E5b
|
||||
* 19 | GPS L5 + Galileo E5a
|
||||
* 20 | GPS L5 + Galileo E5b
|
||||
* 21 | GPS L1 C/A + Galileo E1B + GPS L2C
|
||||
* 22 | GPS L1 C/A + Galileo E1B + GPS L5
|
||||
* 23 | GLONASS L1 C/A
|
||||
* 24 | GLONASS L2 C/A
|
||||
* 25 | GLONASS L1 C/A + GLONASS L2 C/A
|
||||
* 26 | GPS L1 C/A + GLONASS L1 C/A
|
||||
* 27 | Galileo E1B + GLONASS L1 C/A
|
||||
* 28 | GPS L2C + GLONASS L1 C/A
|
||||
*/
|
||||
int gps_1C_count = configuration->property("Channels_1C.count", 0);
|
||||
int gps_2S_count = configuration->property("Channels_2S.count", 0);
|
||||
int gps_L5_count = configuration->property("Channels_L5.count", 0);
|
||||
int gal_1B_count = configuration->property("Channels_1B.count", 0);
|
||||
int gal_E5a_count = configuration->property("Channels_5X.count", 0);
|
||||
int gal_E5b_count = configuration->property("Channels_7X.count", 0);
|
||||
int glo_1G_count = configuration->property("Channels_1G.count", 0);
|
||||
int glo_2G_count = configuration->property("Channels_2G.count", 0);
|
||||
|
||||
unsigned int type_of_receiver = 0;
|
||||
|
||||
// *******************WARNING!!!!!!!***********
|
||||
// GPS L5 only configurable for single frequency, single system at the moment!!!!!!
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 1;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 2;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 3;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 4;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 5;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 6;
|
||||
|
||||
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 7;
|
||||
//if( (gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 8;
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 9;
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 10;
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 11;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 12;
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 13;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 14;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 15;
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 16;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 17;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 18;
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 19;
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0)) type_of_receiver = 20;
|
||||
if ((gps_1C_count != 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0)) type_of_receiver = 21;
|
||||
//if( (gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count = 0)) type_of_receiver = 22;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0)) type_of_receiver = 23;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 24;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0)) type_of_receiver = 25;
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 26;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 27;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0)) type_of_receiver = 28;
|
||||
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 29;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count != 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 30;
|
||||
if ((gps_1C_count == 0) && (gps_2S_count != 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0)) type_of_receiver = 31;
|
||||
//RTKLIB PVT solver options
|
||||
// Settings 1
|
||||
int positioning_mode = -1;
|
||||
std::string default_pos_mode("Single");
|
||||
std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode); /* (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
if (positioning_mode_str.compare("Single") == 0) positioning_mode = PMODE_SINGLE;
|
||||
if (positioning_mode_str.compare("Static") == 0) positioning_mode = PMODE_STATIC;
|
||||
if (positioning_mode_str.compare("Kinematic") == 0) positioning_mode = PMODE_KINEMA;
|
||||
if (positioning_mode_str.compare("PPP_Static") == 0) positioning_mode = PMODE_PPP_STATIC;
|
||||
if (positioning_mode_str.compare("PPP_Kinematic") == 0) positioning_mode = PMODE_PPP_KINEMA;
|
||||
|
||||
if (positioning_mode == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
std::cout << "WARNING: Bad specification of positioning mode." << std::endl;
|
||||
std::cout << "positioning_mode possible values: Single / Static / Kinematic / PPP_Static / PPP_Kinematic" << std::endl;
|
||||
std::cout << "positioning_mode specified value: " << positioning_mode_str << std::endl;
|
||||
std::cout << "Setting positioning_mode to Single" << std::endl;
|
||||
positioning_mode = PMODE_SINGLE;
|
||||
}
|
||||
|
||||
int num_bands = 0;
|
||||
|
||||
if ((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0)) num_bands = 1;
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0))) num_bands = 2;
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0))) num_bands = 2;
|
||||
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0))) num_bands = 3;
|
||||
|
||||
int number_of_frequencies = configuration->property(role + ".num_bands", num_bands); /* (1:L1, 2:L1+L2, 3:L1+L2+L5) */
|
||||
if ((number_of_frequencies < 1) || (number_of_frequencies > 3))
|
||||
{
|
||||
//warn user and set the default
|
||||
number_of_frequencies = num_bands;
|
||||
}
|
||||
|
||||
double elevation_mask = configuration->property(role + ".elevation_mask", 15.0);
|
||||
if ((elevation_mask < 0.0) || (elevation_mask > 90.0))
|
||||
{
|
||||
//warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Elevation Mask. Setting to default value of 15.0 degrees";
|
||||
elevation_mask = 15.0;
|
||||
}
|
||||
|
||||
int dynamics_model = configuration->property(role + ".dynamics_model", 0); /* dynamics model (0:none, 1:velocity, 2:accel) */
|
||||
if ((dynamics_model < 0) || (dynamics_model > 2))
|
||||
{
|
||||
//warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Dynamics Model configuration. Setting to default value of (0:none)";
|
||||
dynamics_model = 0;
|
||||
}
|
||||
|
||||
std::string default_iono_model("OFF");
|
||||
std::string iono_model_str = configuration->property(role + ".iono_model", default_iono_model); /* (IONOOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
int iono_model = -1;
|
||||
if (iono_model_str.compare("OFF") == 0) iono_model = IONOOPT_OFF;
|
||||
if (iono_model_str.compare("Broadcast") == 0) iono_model = IONOOPT_BRDC;
|
||||
if (iono_model_str.compare("SBAS") == 0) iono_model = IONOOPT_SBAS;
|
||||
if (iono_model_str.compare("Iono-Free-LC") == 0) iono_model = IONOOPT_IFLC;
|
||||
if (iono_model_str.compare("Estimate_STEC") == 0) iono_model = IONOOPT_EST;
|
||||
if (iono_model_str.compare("IONEX") == 0) iono_model = IONOOPT_TEC;
|
||||
if (iono_model == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
std::cout << "WARNING: Bad specification of ionospheric model." << std::endl;
|
||||
std::cout << "iono_model possible values: OFF / Broadcast / SBAS / Iono-Free-LC / Estimate_STEC / IONEX" << std::endl;
|
||||
std::cout << "iono_model specified value: " << iono_model_str << std::endl;
|
||||
std::cout << "Setting iono_model to OFF" << std::endl;
|
||||
iono_model = IONOOPT_OFF; /* 0: ionosphere option: correction off */
|
||||
}
|
||||
|
||||
std::string default_trop_model("OFF");
|
||||
int trop_model = -1;
|
||||
std::string trop_model_str = configuration->property(role + ".trop_model", default_trop_model); /* (TROPOPT_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
if (trop_model_str.compare("OFF") == 0) trop_model = TROPOPT_OFF;
|
||||
if (trop_model_str.compare("Saastamoinen") == 0) trop_model = TROPOPT_SAAS;
|
||||
if (trop_model_str.compare("SBAS") == 0) trop_model = TROPOPT_SBAS;
|
||||
if (trop_model_str.compare("Estimate_ZTD") == 0) trop_model = TROPOPT_EST;
|
||||
if (trop_model_str.compare("Estimate_ZTD_Grad") == 0) trop_model = TROPOPT_ESTG;
|
||||
if (trop_model == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
std::cout << "WARNING: Bad specification of tropospheric model." << std::endl;
|
||||
std::cout << "trop_model possible values: OFF / Saastamoinen / SBAS / Estimate_ZTD / Estimate_ZTD_Grad" << std::endl;
|
||||
std::cout << "trop_model specified value: " << trop_model_str << std::endl;
|
||||
std::cout << "Setting trop_model to OFF" << std::endl;
|
||||
trop_model = TROPOPT_OFF;
|
||||
}
|
||||
|
||||
/* RTKLIB positioning options */
|
||||
int sat_PCV = 0; /* Set whether the satellite antenna PCV (phase center variation) model is used or not. This feature requires a Satellite Antenna PCV File. */
|
||||
int rec_PCV = 0; /* Set whether the receiver antenna PCV (phase center variation) model is used or not. This feature requires a Receiver Antenna PCV File. */
|
||||
|
||||
/* Set whether the phase windup correction for PPP modes is applied or not. Only applicable to PPP‐* modes.*/
|
||||
int phwindup = configuration->property(role + ".phwindup", 0);
|
||||
|
||||
/* Set whether the GPS Block IIA satellites in eclipse are excluded or not.
|
||||
The eclipsing Block IIA satellites often degrade the PPP solutions due to unpredicted behavior of yaw‐attitude. Only applicable to PPP‐* modes.*/
|
||||
int reject_GPS_IIA = configuration->property(role + ".reject_GPS_IIA", 0);
|
||||
|
||||
/* Set whether RAIM (receiver autonomous integrity monitoring) FDE (fault detection and exclusion) feature is enabled or not.
|
||||
In case of RAIM FDE enabled, a satellite is excluded if SSE (sum of squared errors) of residuals is over a threshold.
|
||||
The excluded satellite is selected to indicate the minimum SSE. */
|
||||
int raim_fde = configuration->property(role + ".raim_fde", 0);
|
||||
|
||||
int earth_tide = configuration->property(role + ".earth_tide", 0);
|
||||
|
||||
int nsys = 0;
|
||||
if ((gps_1C_count > 0) || (gps_2S_count > 0) || (gps_L5_count > 0)) nsys += SYS_GPS;
|
||||
if ((gal_1B_count > 0) || (gal_E5a_count > 0) || (gal_E5b_count > 0)) nsys += SYS_GAL;
|
||||
if ((glo_1G_count > 0) || (glo_2G_count > 0)) nsys += SYS_GLO;
|
||||
int navigation_system = configuration->property(role + ".navigation_system", nsys); /* (SYS_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
if ((navigation_system < 1) || (navigation_system > 255)) /* GPS: 1 SBAS: 2 GPS+SBAS: 3 Galileo: 8 Galileo+GPS: 9 GPS+SBAS+Galileo: 11 All: 255 */
|
||||
{
|
||||
//warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Navigation System. Setting to default value of (0:none)";
|
||||
navigation_system = nsys;
|
||||
}
|
||||
|
||||
// Settings 2
|
||||
std::string default_gps_ar("Continuous");
|
||||
std::string integer_ambiguity_resolution_gps_str = configuration->property(role + ".AR_GPS", default_gps_ar); /* Integer Ambiguity Resolution mode for GPS (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */
|
||||
int integer_ambiguity_resolution_gps = -1;
|
||||
if (integer_ambiguity_resolution_gps_str.compare("OFF") == 0) integer_ambiguity_resolution_gps = ARMODE_OFF;
|
||||
if (integer_ambiguity_resolution_gps_str.compare("Continuous") == 0) integer_ambiguity_resolution_gps = ARMODE_CONT;
|
||||
if (integer_ambiguity_resolution_gps_str.compare("Instantaneous") == 0) integer_ambiguity_resolution_gps = ARMODE_INST;
|
||||
if (integer_ambiguity_resolution_gps_str.compare("Fix-and-Hold") == 0) integer_ambiguity_resolution_gps = ARMODE_FIXHOLD;
|
||||
if (integer_ambiguity_resolution_gps_str.compare("PPP-AR") == 0) integer_ambiguity_resolution_gps = ARMODE_PPPAR;
|
||||
if (integer_ambiguity_resolution_gps == -1)
|
||||
{
|
||||
//warn user and set the default
|
||||
std::cout << "WARNING: Bad specification of GPS ambiguity resolution method." << std::endl;
|
||||
std::cout << "AR_GPS possible values: OFF / Continuous / Instantaneous / Fix-and-Hold / PPP-AR" << std::endl;
|
||||
std::cout << "AR_GPS specified value: " << integer_ambiguity_resolution_gps_str << std::endl;
|
||||
std::cout << "Setting AR_GPS to OFF" << std::endl;
|
||||
integer_ambiguity_resolution_gps = ARMODE_OFF;
|
||||
}
|
||||
|
||||
int integer_ambiguity_resolution_glo = configuration->property(role + ".AR_GLO", 1); /* Integer Ambiguity Resolution mode for GLONASS (0:off,1:on,2:auto cal,3:ext cal) */
|
||||
if ((integer_ambiguity_resolution_glo < 0) || (integer_ambiguity_resolution_glo > 3))
|
||||
{
|
||||
//warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Integer Ambiguity Resolution for GLONASS . Setting to default value of (1:on)";
|
||||
integer_ambiguity_resolution_glo = 1;
|
||||
}
|
||||
|
||||
int integer_ambiguity_resolution_bds = configuration->property(role + ".AR_DBS", 1); /* Integer Ambiguity Resolution mode for BEIDOU (0:off,1:on) */
|
||||
if ((integer_ambiguity_resolution_bds < 0) || (integer_ambiguity_resolution_bds > 1))
|
||||
{
|
||||
//warn user and set the default
|
||||
LOG(WARNING) << "Erroneous Integer Ambiguity Resolution for BEIDOU . Setting to default value of (1:on)";
|
||||
integer_ambiguity_resolution_bds = 1;
|
||||
}
|
||||
|
||||
double min_ratio_to_fix_ambiguity = configuration->property(role + ".min_ratio_to_fix_ambiguity", 3.0); /* Set the integer ambiguity validation threshold for ratio‐test,
|
||||
which uses the ratio of squared residuals of the best integer vector to the second‐best vector. */
|
||||
|
||||
int min_lock_to_fix_ambiguity = configuration->property(role + ".min_lock_to_fix_ambiguity", 0); /* Set the minimum lock count to fix integer ambiguity.
|
||||
If the lock count is less than the value, the ambiguity is excluded from the fixed integer vector. */
|
||||
|
||||
double min_elevation_to_fix_ambiguity = configuration->property(role + ".min_elevation_to_fix_ambiguity", 0.0); /* Set the minimum elevation (deg) to fix integer ambiguity.
|
||||
If the elevation of the satellite is less than the value, the ambiguity is excluded from the fixed integer vector. */
|
||||
|
||||
int outage_reset_ambiguity = configuration->property(role + ".outage_reset_ambiguity", 5); /* Set the outage count to reset ambiguity. If the data outage count is over the value, the estimated ambiguity is reset to the initial value. */
|
||||
|
||||
double slip_threshold = configuration->property(role + ".slip_threshold", 0.05); /* set the cycle‐slip threshold (m) of geometry‐free LC carrier‐phase difference between epochs */
|
||||
|
||||
double threshold_reject_gdop = configuration->property(role + ".threshold_reject_gdop", 30.0); /* reject threshold of GDOP. If the GDOP is over the value, the observable is excluded for the estimation process as an outlier. */
|
||||
|
||||
double threshold_reject_innovation = configuration->property(role + ".threshold_reject_innovation", 30.0); /* reject threshold of innovation (m). If the innovation is over the value, the observable is excluded for the estimation process as an outlier. */
|
||||
|
||||
int number_filter_iter = configuration->property(role + ".number_filter_iter", 1); /* Set the number of iteration in the measurement update of the estimation filter.
|
||||
If the baseline length is very short like 1 m, the iteration may be effective to handle
|
||||
the nonlinearity of measurement equation. */
|
||||
|
||||
/// Statistics
|
||||
double bias_0 = configuration->property(role + ".bias_0", 30.0);
|
||||
|
||||
double iono_0 = configuration->property(role + ".iono_0", 0.03);
|
||||
|
||||
double trop_0 = configuration->property(role + ".trop_0", 0.3);
|
||||
|
||||
double sigma_bias = configuration->property(role + ".sigma_bias", 1e-4); /* Set the process noise standard deviation of carrier‐phase
|
||||
bias (ambiguity) (cycle/sqrt(s)) */
|
||||
|
||||
double sigma_iono = configuration->property(role + ".sigma_iono", 1e-3); /* Set the process noise standard deviation of vertical ionospheric delay per 10 km baseline (m/sqrt(s)). */
|
||||
|
||||
double sigma_trop = configuration->property(role + ".sigma_trop", 1e-4); /* Set the process noise standard deviation of zenith tropospheric delay (m/sqrt(s)). */
|
||||
|
||||
double sigma_acch = configuration->property(role + ".sigma_acch", 1e-1); /* Set the process noise standard deviation of the receiver acceleration as
|
||||
the horizontal component. (m/s2/sqrt(s)). If Receiver Dynamics is set to OFF, they are not used. */
|
||||
|
||||
double sigma_accv = configuration->property(role + ".sigma_accv", 1e-2); /* Set the process noise standard deviation of the receiver acceleration as
|
||||
the vertical component. (m/s2/sqrt(s)). If Receiver Dynamics is set to OFF, they are not used. */
|
||||
|
||||
double sigma_pos = configuration->property(role + ".sigma_pos", 0.0);
|
||||
|
||||
double code_phase_error_ratio_l1 = configuration->property(role + ".code_phase_error_ratio_l1", 100.0);
|
||||
double code_phase_error_ratio_l2 = configuration->property(role + ".code_phase_error_ratio_l2", 100.0);
|
||||
double code_phase_error_ratio_l5 = configuration->property(role + ".code_phase_error_ratio_l5", 100.0);
|
||||
double carrier_phase_error_factor_a = configuration->property(role + ".carrier_phase_error_factor_a", 0.003);
|
||||
double carrier_phase_error_factor_b = configuration->property(role + ".carrier_phase_error_factor_b", 0.003);
|
||||
|
||||
snrmask_t snrmask = {{}, {{}, {}}};
|
||||
|
||||
prcopt_t rtklib_configuration_options = {
|
||||
positioning_mode, /* positioning mode (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h */
|
||||
0, /* solution type (0:forward,1:backward,2:combined) */
|
||||
number_of_frequencies, /* number of frequencies (1:L1, 2:L1+L2, 3:L1+L2+L5)*/
|
||||
navigation_system, /* navigation system */
|
||||
elevation_mask * D2R, /* elevation mask angle (degrees) */
|
||||
snrmask, /* snrmask_t snrmask SNR mask */
|
||||
0, /* satellite ephemeris/clock (EPHOPT_XXX) */
|
||||
integer_ambiguity_resolution_gps, /* AR mode (0:off,1:continuous,2:instantaneous,3:fix and hold,4:ppp-ar) */
|
||||
integer_ambiguity_resolution_glo, /* GLONASS AR mode (0:off,1:on,2:auto cal,3:ext cal) */
|
||||
integer_ambiguity_resolution_bds, /* BeiDou AR mode (0:off,1:on) */
|
||||
outage_reset_ambiguity, /* obs outage count to reset bias */
|
||||
min_lock_to_fix_ambiguity, /* min lock count to fix ambiguity */
|
||||
10, /* min fix count to hold ambiguity */
|
||||
1, /* max iteration to resolve ambiguity */
|
||||
iono_model, /* ionosphere option (IONOOPT_XXX) */
|
||||
trop_model, /* troposphere option (TROPOPT_XXX) */
|
||||
dynamics_model, /* dynamics model (0:none, 1:velocity, 2:accel) */
|
||||
earth_tide, /* earth tide correction (0:off,1:solid,2:solid+otl+pole) */
|
||||
number_filter_iter, /* number of filter iteration */
|
||||
0, /* code smoothing window size (0:none) */
|
||||
0, /* interpolate reference obs (for post mission) */
|
||||
0, /* sbssat_t sbssat SBAS correction options */
|
||||
0, /* sbsion_t sbsion[MAXBAND+1] SBAS satellite selection (0:all) */
|
||||
0, /* rover position for fixed mode */
|
||||
0, /* base position for relative mode */
|
||||
/* 0:pos in prcopt, 1:average of single pos, */
|
||||
/* 2:read from file, 3:rinex header, 4:rtcm pos */
|
||||
{code_phase_error_ratio_l1, code_phase_error_ratio_l2, code_phase_error_ratio_l5}, /* eratio[NFREQ] code/phase error ratio */
|
||||
{100.0, carrier_phase_error_factor_a, carrier_phase_error_factor_b, 0.0, 1.0}, /* err[5]: measurement error factor [0]:reserved, [1-3]:error factor a/b/c of phase (m) , [4]:doppler frequency (hz) */
|
||||
{bias_0, iono_0, trop_0}, /* std[3]: initial-state std [0]bias,[1]iono [2]trop*/
|
||||
{sigma_bias, sigma_iono, sigma_trop, sigma_acch, sigma_accv, sigma_pos}, /* prn[6] process-noise std */
|
||||
5e-12, /* sclkstab: satellite clock stability (sec/sec) */
|
||||
{min_ratio_to_fix_ambiguity, 0.9999, 0.25, 0.1, 0.05, 0.0, 0.0, 0.0}, /* thresar[8]: AR validation threshold */
|
||||
min_elevation_to_fix_ambiguity, /* elevation mask of AR for rising satellite (deg) */
|
||||
0.0, /* elevation mask to hold ambiguity (deg) */
|
||||
slip_threshold, /* slip threshold of geometry-free phase (m) */
|
||||
30.0, /* max difference of time (sec) */
|
||||
threshold_reject_innovation, /* reject threshold of innovation (m) */
|
||||
threshold_reject_gdop, /* reject threshold of gdop */
|
||||
{}, /* double baseline[2] baseline length constraint {const,sigma} (m) */
|
||||
{}, /* double ru[3] rover position for fixed mode {x,y,z} (ecef) (m) */
|
||||
{}, /* double rb[3] base position for relative mode {x,y,z} (ecef) (m) */
|
||||
{"", ""}, /* char anttype[2][MAXANT] antenna types {rover,base} */
|
||||
{{}, {}}, /* double antdel[2][3] antenna delta {{rov_e,rov_n,rov_u},{ref_e,ref_n,ref_u}} */
|
||||
{}, /* pcv_t pcvr[2] receiver antenna parameters {rov,base} */
|
||||
{}, /* unsigned char exsats[MAXSAT] excluded satellites (1:excluded, 2:included) */
|
||||
0, /* max averaging epoches */
|
||||
0, /* initialize by restart */
|
||||
1, /* output single by dgps/float/fix/ppp outage */
|
||||
{"", ""}, /* char rnxopt[2][256] rinex options {rover,base} */
|
||||
{sat_PCV, rec_PCV, phwindup, reject_GPS_IIA, raim_fde}, /* posopt[6] positioning options [0]: satellite and receiver antenna PCV model; [1]: interpolate antenna parameters; [2]: apply phase wind-up correction for PPP modes; [3]: exclude measurements of GPS Block IIA satellites satellite [4]: RAIM FDE (fault detection and exclusion) [5]: handle day-boundary clock jump */
|
||||
0, /* solution sync mode (0:off,1:on) */
|
||||
{{}, {}}, /* odisp[2][6*11] ocean tide loading parameters {rov,base} */
|
||||
{{}, {{}, {}}, {{}, {}}, {}, {}}, /* exterr_t exterr extended receiver error model */
|
||||
0, /* disable L2-AR */
|
||||
{} /* char pppopt[256] ppp option "-GAP_RESION=" default gap to reset iono parameters (ep) */
|
||||
};
|
||||
|
||||
rtkinit(&rtk, &rtklib_configuration_options);
|
||||
|
||||
// make PVT object
|
||||
pvt_ = rtklib_make_pvt_cc(in_streams_, dump_, dump_filename_, output_rate_ms, display_rate_ms, flag_nmea_tty_port, nmea_dump_filename, nmea_dump_devname, rinex_version, rinexobs_rate_ms, rinexnav_rate_ms, flag_rtcm_server, flag_rtcm_tty_port, rtcm_tcp_port, rtcm_station_id, rtcm_msg_rate_ms, rtcm_dump_devname, type_of_receiver, rtk);
|
||||
DLOG(INFO) << "pvt(" << pvt_->unique_id() << ")";
|
||||
if (out_streams_ > 0)
|
||||
{
|
||||
LOG(ERROR) << "The PVT block does not have an output stream";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool RtklibPvt::save_assistance_to_XML()
|
||||
{
|
||||
LOG(INFO) << "SUPL: Try to save GPS ephemeris to XML file " << eph_xml_filename_;
|
||||
std::map<int, Gps_Ephemeris> eph_map = pvt_->get_GPS_L1_ephemeris_map();
|
||||
|
||||
if (eph_map.size() > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::ofstream ofs(eph_xml_filename_.c_str(), std::ofstream::trunc | std::ofstream::out);
|
||||
boost::archive::xml_oarchive xml(ofs);
|
||||
xml << boost::serialization::make_nvp("GNSS-SDR_ephemeris_map", eph_map);
|
||||
ofs.close();
|
||||
LOG(INFO) << "Saved GPS L1 Ephemeris map data";
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << e.what();
|
||||
return false;
|
||||
}
|
||||
return true; // return variable (true == succeeded)
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << "Failed to save Ephemeris, map is empty";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RtklibPvt::~RtklibPvt()
|
||||
{
|
||||
rtkfree(&rtk);
|
||||
save_assistance_to_XML();
|
||||
}
|
||||
|
||||
|
||||
void RtklibPvt::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
// Nothing to connect internally
|
||||
DLOG(INFO) << "nothing to connect internally";
|
||||
}
|
||||
|
||||
|
||||
void RtklibPvt::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
// Nothing to disconnect
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr RtklibPvt::get_left_block()
|
||||
{
|
||||
return pvt_;
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr RtklibPvt::get_right_block()
|
||||
{
|
||||
return pvt_; // this is a sink, nothing downstream
|
||||
}
|
@ -1367,8 +1367,8 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co
|
||||
line += std::string(3, ' ');
|
||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 18, 2), 19);
|
||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 18, 2), 19);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_t_OT), 9);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_T + 1024), 9); // valid until 2019
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 9);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_T + 1024), 9); // valid until 2019
|
||||
line += std::string(1, ' ');
|
||||
line += Rinex_Printer::leftJustify("DELTA-UTC: A0,A1,T,W", 20);
|
||||
}
|
||||
@ -1378,8 +1378,8 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co
|
||||
line += std::string("GPUT");
|
||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A0, 16, 2), 18);
|
||||
line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(utc_model.d_A1, 15, 2), 16);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_t_OT), 7);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_T + 1024), 5); // valid until 2019
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_t_OT), 7);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_T + 1024), 5); // valid until 2019
|
||||
/* if ( SBAS )
|
||||
{
|
||||
line += string(1, ' ');
|
||||
@ -1399,16 +1399,16 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co
|
||||
// -------- Line 6 leap seconds
|
||||
// For leap second information, see http://www.endruntechnologies.com/leap.htm
|
||||
line.clear();
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LS), 6);
|
||||
if (version == 2)
|
||||
{
|
||||
line += std::string(54, ' ');
|
||||
}
|
||||
if (version == 3)
|
||||
{
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_DN), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.d_DeltaT_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
|
||||
line += std::string(36, ' ');
|
||||
}
|
||||
line += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
@ -1653,8 +1653,8 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Beidou_Dnav_Iono&
|
||||
line.clear();
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_DN), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
|
||||
line += std::string(36, ' ');
|
||||
line += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
Rinex_Printer::lengthCheck(line);
|
||||
@ -2827,8 +2827,8 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Beidou_Dnav_Utc_M
|
||||
{
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_DN), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
|
||||
line_aux += std::string(36, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
@ -2842,7 +2842,6 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Beidou_Dnav_Utc_M
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3769,7 +3768,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Bei
|
||||
|
||||
line += satelliteSystem["Beidou"];
|
||||
if (bds_ephemeris_iter->second.i_satellite_PRN < 10) line += std::string("0");
|
||||
line += boost::lexical_cast<std::string>(bds_ephemeris_iter->second.i_satellite_PRN);
|
||||
line += std::to_string(bds_ephemeris_iter->second.i_satellite_PRN);
|
||||
std::string year(timestring, 0, 4);
|
||||
line += std::string(1, ' ');
|
||||
line += year;
|
||||
@ -3851,7 +3850,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int32_t, Bei
|
||||
line += std::string(1, ' ');
|
||||
line += std::string(18, ' '); // spare
|
||||
line += std::string(1, ' ');
|
||||
double BDS_week_continuous_number = static_cast<double>(bds_ephemeris_iter->second.i_BEIDOU_week);
|
||||
auto BDS_week_continuous_number = static_cast<double>(bds_ephemeris_iter->second.i_BEIDOU_week);
|
||||
line += Rinex_Printer::doub2for(BDS_week_continuous_number, 18, 2);
|
||||
line += std::string(1, ' ');
|
||||
line += std::string(18, ' '); // spare
|
||||
@ -7201,7 +7200,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string bands)
|
||||
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string& bands)
|
||||
{
|
||||
std::string line;
|
||||
version = 3;
|
||||
@ -7663,8 +7662,8 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Beidou_Dnav_Utc_M
|
||||
data.push_back(line_str);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LS), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.d_DeltaT_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(utc_model.i_DN), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_WN_LSF), 6);
|
||||
line_aux += Rinex_Printer::rightJustify(std::to_string(utc_model.i_DN), 6);
|
||||
line_aux += std::string(36, ' ');
|
||||
line_aux += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
|
||||
data.push_back(line_aux);
|
||||
@ -7678,7 +7677,6 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Beidou_Dnav_Utc_M
|
||||
{
|
||||
data.push_back(line_str);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -10409,7 +10407,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
|
||||
}
|
||||
|
||||
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string bds_bands)
|
||||
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string& bds_bands)
|
||||
{
|
||||
std::string line;
|
||||
|
||||
@ -10520,7 +10518,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris
|
||||
}
|
||||
|
||||
int32_t numSatellitesObserved = available_prns.size();
|
||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
|
||||
line += Rinex_Printer::rightJustify(std::to_string(numSatellitesObserved), 3);
|
||||
// Receiver clock offset (optional)
|
||||
//line += rightJustify(asString(clockOffset, 12), 15);
|
||||
line += std::string(80 - line.size(), ' ');
|
||||
@ -10536,9 +10534,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris
|
||||
lineObs.clear();
|
||||
lineObs += satelliteSystem["Beidou"];
|
||||
if (static_cast<int32_t>(*it) < 10) lineObs += std::string(1, '0');
|
||||
lineObs += boost::lexical_cast<std::string>(static_cast<int32_t>(*it));
|
||||
lineObs += std::to_string(static_cast<int32_t>(*it));
|
||||
ret = total_map.equal_range(*it);
|
||||
for (std::multimap<uint32_t, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
|
||||
for (auto iter = ret.first; iter != ret.second; ++iter)
|
||||
{
|
||||
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
|
||||
|
||||
|
@ -51,21 +51,19 @@
|
||||
#ifndef GNSS_SDR_RINEX_PRINTER_H_
|
||||
#define GNSS_SDR_RINEX_PRINTER_H_
|
||||
|
||||
#include "gps_navigation_message.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "glonass_gnav_navigation_message.h"
|
||||
#include "beidou_dnav_navigation_message.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "beidou_dnav_navigation_message.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "glonass_gnav_navigation_message.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <sstream> // for stringstream
|
||||
#include <iomanip> // for setprecision
|
||||
#include <map>
|
||||
#include <sstream> // for stringstream
|
||||
@ -203,7 +201,7 @@ public:
|
||||
/*!
|
||||
* \brief Generates the a Beidou B1I Observation data header. Example: beidou_bands("B1")
|
||||
*/
|
||||
void rinex_obs_header(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string bands);
|
||||
void rinex_obs_header(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string& bands);
|
||||
|
||||
/*!
|
||||
* \brief Generates the SBAS raw data header
|
||||
@ -363,7 +361,7 @@ public:
|
||||
/*!
|
||||
* \brief Writes BDS B1I observables into the RINEX file
|
||||
*/
|
||||
void log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string bds_bands);
|
||||
void log_rinex_obs(std::fstream& out, const Beidou_Dnav_Ephemeris& eph, double obs_time, const std::map<int32_t, Gnss_Synchro>& observables, const std::string& bds_bands);
|
||||
|
||||
|
||||
/*!
|
||||
|
@ -52,10 +52,10 @@
|
||||
* -----------------------------------------------------------------------*/
|
||||
|
||||
#include "rtklib_solver.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "rtklib_conversions.h"
|
||||
#include "rtklib_solution.h"
|
||||
#include <glog/logging.h>
|
||||
|
@ -55,13 +55,13 @@
|
||||
#define GNSS_SDR_RTKLIB_SOLVER_H_
|
||||
|
||||
|
||||
#include "beidou_dnav_navigation_message.h"
|
||||
#include "galileo_almanac.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "glonass_gnav_navigation_message.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gps_cnav_navigation_message.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include "beidou_dnav_navigation_message.h"
|
||||
#include "pvt_solution.h"
|
||||
#include "rtklib_rtkpos.h"
|
||||
#include <array>
|
||||
|
@ -36,11 +36,11 @@
|
||||
|
||||
#include "acq_conf.h"
|
||||
#include "acquisition_interface.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "pcps_acquisition.h"
|
||||
#include "complex_byte_to_float_x2.h"
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <string>
|
||||
|
||||
@ -55,7 +55,7 @@ class BeidouB1iPcpsAcquisition : public AcquisitionInterface
|
||||
{
|
||||
public:
|
||||
BeidouB1iPcpsAcquisition(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams,
|
||||
const std::string& role, unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
virtual ~BeidouB1iPcpsAcquisition();
|
||||
|
@ -39,8 +39,8 @@ void beidou_b1i_code_gen_int(int* _dest, signed int _prn, unsigned int _chip_shi
|
||||
const unsigned int _code_length = 2046;
|
||||
bool G1[_code_length];
|
||||
bool G2[_code_length];
|
||||
bool G1_register[11] = {0,1,0,1,0,1,0,1,0,1,0};
|
||||
bool G2_register[11] = {0,1,0,1,0,1,0,1,0,1,0};
|
||||
bool G1_register[11] = {false, true, false, true, false, true, false, true, false, true, false};
|
||||
bool G2_register[11] = {false, true, false, true, false, true, false, true, false, true, false};
|
||||
bool feedback1, feedback2;
|
||||
bool aux;
|
||||
unsigned int lcv, lcv2;
|
||||
|
@ -261,8 +261,8 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
||||
|
||||
rtklib_sat.code = bei_eph.i_sig_type; /*B1I data*/
|
||||
rtklib_sat.flag = bei_eph.i_nav_type; /*MEO/IGSO satellite*/
|
||||
rtklib_sat.iode=(int32_t)bei_eph.d_AODE; /* AODE */
|
||||
rtklib_sat.iodc=(int32_t)bei_eph.d_AODC; /* AODC */
|
||||
rtklib_sat.iode = static_cast<int32_t>(bei_eph.d_AODE); /* AODE */
|
||||
rtklib_sat.iodc = static_cast<int32_t>(bei_eph.d_AODC); /* AODC */
|
||||
|
||||
rtklib_sat.week = bei_eph.i_BEIDOU_week; /* week of tow */
|
||||
rtklib_sat.cic = bei_eph.d_Cic;
|
||||
@ -285,8 +285,8 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
||||
/* adjustment for week handover */
|
||||
double tow, toc, toe;
|
||||
tow = time2gpst(rtklib_sat.ttr, &rtklib_sat.week);
|
||||
toc = time2gpst(rtklib_sat.toc, NULL);
|
||||
toe = time2gpst(rtklib_sat.toe, NULL);
|
||||
toc = time2gpst(rtklib_sat.toc, nullptr);
|
||||
toe = time2gpst(rtklib_sat.toe, nullptr);
|
||||
|
||||
if (rtklib_sat.toes < tow - 302400.0)
|
||||
{
|
||||
@ -306,7 +306,6 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
||||
}
|
||||
|
||||
|
||||
|
||||
eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph)
|
||||
{
|
||||
eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
|
@ -31,6 +31,7 @@
|
||||
#ifndef GNSS_SDR_RTKLIB_CONVERSIONS_H_
|
||||
#define GNSS_SDR_RTKLIB_CONVERSIONS_H_
|
||||
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "galileo_almanac.h"
|
||||
#include "galileo_ephemeris.h"
|
||||
#include "glonass_gnav_ephemeris.h"
|
||||
@ -39,7 +40,6 @@
|
||||
#include "gps_almanac.h"
|
||||
#include "gps_cnav_ephemeris.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "rtklib.h"
|
||||
|
||||
eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph);
|
||||
|
@ -31,11 +31,11 @@
|
||||
|
||||
|
||||
#include "signal_generator.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "GLONASS_L1_L2_CA.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <glog/logging.h>
|
||||
#include <cstdint>
|
||||
|
@ -31,19 +31,19 @@
|
||||
|
||||
|
||||
#include "beidou_b1i_telemetry_decoder.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <glog/logging.h>
|
||||
#include "beidou_dnav_almanac.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "beidou_dnav_iono.h"
|
||||
#include "beidou_dnav_utc_model.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
BeidouB1iTelemetryDecoder::BeidouB1iTelemetryDecoder(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
@ -68,9 +68,7 @@ BeidouB1iTelemetryDecoder::BeidouB1iTelemetryDecoder(ConfigurationInterface* con
|
||||
}
|
||||
|
||||
|
||||
BeidouB1iTelemetryDecoder::~BeidouB1iTelemetryDecoder()
|
||||
{
|
||||
}
|
||||
BeidouB1iTelemetryDecoder::~BeidouB1iTelemetryDecoder() = default;
|
||||
|
||||
|
||||
void BeidouB1iTelemetryDecoder::set_satellite(const Gnss_Satellite& satellite)
|
||||
|
@ -34,9 +34,9 @@
|
||||
#ifndef GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_H_
|
||||
#define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_H_
|
||||
|
||||
#include "beidou_b1i_telemetry_decoder_cc.h"
|
||||
#include "telemetry_decoder_interface.h"
|
||||
#include <string>
|
||||
#include "beidou_b1i_telemetry_decoder_cc.h"
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
@ -47,7 +47,7 @@ class BeidouB1iTelemetryDecoder : public TelemetryDecoderInterface
|
||||
{
|
||||
public:
|
||||
BeidouB1iTelemetryDecoder(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
@ -38,8 +38,8 @@
|
||||
#include "display.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk_gnsssdr/volk_gnsssdr.h>
|
||||
#include <iostream>
|
||||
|
||||
@ -130,7 +130,6 @@ beidou_b1i_telemetry_decoder_cc::beidou_b1i_telemetry_decoder_cc(
|
||||
d_flag_preamble = false;
|
||||
d_channel = 0;
|
||||
flag_SOW_set = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -154,7 +153,7 @@ beidou_b1i_telemetry_decoder_cc::~beidou_b1i_telemetry_decoder_cc()
|
||||
}
|
||||
|
||||
|
||||
void beidou_b1i_telemetry_decoder_cc::decode_bch15_11_01(int32_t *bits, int32_t *decbits)
|
||||
void beidou_b1i_telemetry_decoder_cc::decode_bch15_11_01(const int32_t *bits, int32_t *decbits)
|
||||
{
|
||||
int bit, err, reg[4] = {1, 1, 1, 1};
|
||||
int errind[15] = {14, 13, 10, 12, 6, 9, 4, 11, 0, 5, 7, 8, 1, 3, 2};
|
||||
@ -184,7 +183,7 @@ void beidou_b1i_telemetry_decoder_cc::decode_bch15_11_01(int32_t *bits, int32_t
|
||||
|
||||
void beidou_b1i_telemetry_decoder_cc::decode_word(
|
||||
int32_t word_counter,
|
||||
double* enc_word_symbols,
|
||||
const double *enc_word_symbols,
|
||||
int32_t *dec_word_symbols)
|
||||
{
|
||||
int32_t bitsbch[30], first_branch[15], second_branch[15];
|
||||
@ -221,8 +220,6 @@ void beidou_b1i_telemetry_decoder_cc::decode_word(
|
||||
dec_word_symbols[j + 26] = second_branch[11 + j];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -367,7 +364,7 @@ void beidou_b1i_telemetry_decoder_cc::set_channel(int channel)
|
||||
try
|
||||
{
|
||||
d_dump_filename = "telemetry";
|
||||
d_dump_filename.append(boost::lexical_cast<std::string>(d_channel));
|
||||
d_dump_filename.append(std::to_string(d_channel));
|
||||
d_dump_filename.append(".dat");
|
||||
d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
d_dump_file.open(d_dump_filename.c_str(), std::ios::out | std::ios::binary);
|
||||
@ -388,8 +385,8 @@ int beidou_b1i_telemetry_decoder_cc::general_work(int noutput_items __attribute_
|
||||
int32_t corr_value = 0;
|
||||
int32_t preamble_diff = 0;
|
||||
|
||||
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const Gnss_Synchro **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
auto **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); // Get the output buffer pointer
|
||||
const auto **in = reinterpret_cast<const Gnss_Synchro **>(&input_items[0]); // Get the input buffer pointer
|
||||
|
||||
Gnss_Synchro current_symbol; //structure to save the synchronization information and send the output object to the next block
|
||||
//1. Copy the current tracking output
|
||||
|
@ -35,13 +35,13 @@
|
||||
#ifndef GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_CC_H
|
||||
#define GNSS_SDR_BEIDOU_B1I_TELEMETRY_DECODER_CC_H
|
||||
|
||||
#include "beidou_dnav_navigation_message.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "beidou_dnav_almanac.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "beidou_dnav_navigation_message.h"
|
||||
#include "beidou_dnav_utc_model.h"
|
||||
#include "gnss_satellite.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
@ -79,8 +79,8 @@ private:
|
||||
beidou_b1i_telemetry_decoder_cc(const Gnss_Satellite &satellite, bool dump);
|
||||
|
||||
void decode_subframe(double *symbols, int32_t frame_length);
|
||||
void decode_word(int32_t word_counter, double* enc_word_symbols, int32_t* dec_word_symbols);
|
||||
void decode_bch15_11_01(int32_t *bits, int32_t *decbits);
|
||||
void decode_word(int32_t word_counter, const double *enc_word_symbols, int32_t *dec_word_symbols);
|
||||
void decode_bch15_11_01(const int32_t *bits, int32_t *decbits);
|
||||
|
||||
|
||||
//!< Preamble decoding
|
||||
|
@ -34,18 +34,18 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "dll_pll_conf.h"
|
||||
#include "beidou_b1i_dll_pll_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "display.h"
|
||||
#include <glog/logging.h>
|
||||
#include "Beidou_B1I.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "display.h"
|
||||
#include "dll_pll_conf.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
Dll_Pll_Conf trk_param = Dll_Pll_Conf();
|
||||
@ -118,7 +118,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
||||
trk_param.carrier_lock_th = carrier_lock_th;
|
||||
|
||||
//################# MAKE TRACKING GNURadio object ###################
|
||||
if (item_type.compare("gr_complex") == 0)
|
||||
if (item_type == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
tracking_ = dll_pll_veml_make_tracking(trk_param);
|
||||
@ -141,9 +141,7 @@ BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
||||
}
|
||||
|
||||
|
||||
BeidouB1iDllPllTracking::~BeidouB1iDllPllTracking()
|
||||
{
|
||||
}
|
||||
BeidouB1iDllPllTracking::~BeidouB1iDllPllTracking() = default;
|
||||
|
||||
|
||||
void BeidouB1iDllPllTracking::start_tracking()
|
||||
|
@ -37,8 +37,8 @@
|
||||
#ifndef GNSS_SDR_BEIDOU_B1I_DLL_PLL_TRACKING_H_
|
||||
#define GNSS_SDR_BEIDOU_B1I_DLL_PLL_TRACKING_H_
|
||||
|
||||
#include "tracking_interface.h"
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "tracking_interface.h"
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@ -50,7 +50,7 @@ class BeidouB1iDllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
BeidouB1iDllPllTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
@ -35,17 +35,17 @@
|
||||
*/
|
||||
|
||||
#include "dll_pll_veml_tracking.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "GPS_L2C.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "Galileo_E1.h"
|
||||
#include "Galileo_E5a.h"
|
||||
#include "Beidou_B1I.h"
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include "beidou_b1i_signal_processing.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "galileo_e1_signal_processing.h"
|
||||
#include "galileo_e5_signal_processing.h"
|
||||
#include "beidou_b1i_signal_processing.h"
|
||||
#include "gnss_sdr_create_directory.h"
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "gps_l5_signal.h"
|
||||
@ -609,7 +609,6 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
d_symbol_history.resize(22); // Change fixed buffer size
|
||||
d_symbol_history.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
multicorrelator_cpu.set_local_code_and_taps(d_code_samples_per_chip * d_code_length_chips, d_tracking_code, d_local_code_shift_chips);
|
||||
|
@ -38,6 +38,9 @@
|
||||
#include "gnss_block_factory.h"
|
||||
#include "array_signal_conditioner.h"
|
||||
#include "beamformer_filter.h"
|
||||
#include "beidou_b1i_dll_pll_tracking.h"
|
||||
#include "beidou_b1i_pcps_acquisition.h"
|
||||
#include "beidou_b1i_telemetry_decoder.h"
|
||||
#include "byte_to_short.h"
|
||||
#include "channel.h"
|
||||
#include "configuration_interface.h"
|
||||
@ -65,9 +68,6 @@
|
||||
#include "glonass_l2_ca_dll_pll_tracking.h"
|
||||
#include "glonass_l2_ca_pcps_acquisition.h"
|
||||
#include "glonass_l2_ca_telemetry_decoder.h"
|
||||
#include "beidou_b1i_pcps_acquisition.h"
|
||||
#include "beidou_b1i_dll_pll_tracking.h"
|
||||
#include "beidou_b1i_telemetry_decoder.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "gps_l1_ca_dll_pll_c_aid_tracking.h"
|
||||
#include "gps_l1_ca_dll_pll_tracking.h"
|
||||
@ -798,7 +798,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_B1(
|
||||
<< acq << ", Tracking Implementation: " << trk << ", Telemetry Decoder implementation: " << tlm;
|
||||
std::string aux = configuration->property("Acquisition_B1" + std::to_string(channel) + ".implementation", std::string("W"));
|
||||
std::string appendix1;
|
||||
if (aux.compare("W") != 0)
|
||||
if (aux != "W")
|
||||
{
|
||||
appendix1 = std::to_string(channel);
|
||||
}
|
||||
@ -808,7 +808,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_B1(
|
||||
}
|
||||
aux = configuration->property("Tracking_B1" + std::to_string(channel) + ".implementation", std::string("W"));
|
||||
std::string appendix2;
|
||||
if (aux.compare("W") != 0)
|
||||
if (aux != "W")
|
||||
{
|
||||
appendix2 = std::to_string(channel);
|
||||
}
|
||||
@ -818,7 +818,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetChannel_B1(
|
||||
}
|
||||
aux = configuration->property("TelemetryDecoder_B1" + std::to_string(channel) + ".implementation", std::string("W"));
|
||||
std::string appendix3;
|
||||
if (aux.compare("W") != 0)
|
||||
if (aux != "W")
|
||||
{
|
||||
appendix3 = std::to_string(channel);
|
||||
}
|
||||
@ -1117,7 +1117,6 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
|
||||
queue);
|
||||
channel_absolute_id++;
|
||||
}
|
||||
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
|
@ -1760,10 +1760,8 @@ void GNSSFlowgraph::set_signals_list()
|
||||
available_BDS_B1_signals_.push_back(Gnss_Signal(
|
||||
Gnss_Satellite(std::string("Beidou"), *available_gnss_prn_iter),
|
||||
std::string("B1")));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,7 +55,6 @@
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#if ENABLE_FPGA
|
||||
#include "gnss_sdr_fpga_sample_counter.h"
|
||||
|
@ -32,9 +32,9 @@
|
||||
#ifndef GNSS_SDR_BEIDOU_B1I_H_
|
||||
#define GNSS_SDR_BEIDOU_B1I_H_
|
||||
|
||||
#include <vector>
|
||||
#include <utility> // std::pair
|
||||
#include "MATH_CONSTANTS.h"
|
||||
#include <utility> // std::pair
|
||||
#include <vector>
|
||||
|
||||
// Physical constants
|
||||
const double BEIDOU_C_m_s = 299792458.0; //!< The speed of light, [m/s]
|
||||
|
@ -30,11 +30,9 @@
|
||||
*/
|
||||
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "Beidou_B1I.h"
|
||||
#include "gnss_satellite.h"
|
||||
#include <cmath>
|
||||
|
||||
Beidou_Dnav_Ephemeris::Beidou_Dnav_Ephemeris()
|
||||
{
|
||||
|
@ -33,11 +33,10 @@
|
||||
#define GNSS_SDR_BEIDOU_DNAV_EPHEMERIS_H_
|
||||
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "boost/assign.hpp"
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
||||
/*!
|
||||
@ -56,6 +55,7 @@ private:
|
||||
* \param[out] - corrected time, in seconds
|
||||
*/
|
||||
double check_t(double time);
|
||||
|
||||
public:
|
||||
unsigned int i_satellite_PRN; // SV PRN NUMBER
|
||||
double d_TOW; //!< Time of BEIDOU Week of the ephemeris set (taken from subframes TOW) [s]
|
||||
@ -134,7 +134,9 @@ public:
|
||||
void serialize(Archive& archive, const unsigned int version)
|
||||
{
|
||||
using boost::serialization::make_nvp;
|
||||
if(version){};
|
||||
if (version)
|
||||
{
|
||||
};
|
||||
|
||||
archive& make_nvp("i_satellite_PRN", i_satellite_PRN); // SV PRN NUMBER
|
||||
archive& make_nvp("d_TOW", d_TOW); //!< Time of GPS Week of the ephemeris set (taken from subframes TOW) [s]
|
||||
|
@ -43,4 +43,3 @@ Beidou_Dnav_Iono::Beidou_Dnav_Iono()
|
||||
d_beta2 = 0.0;
|
||||
d_beta3 = 0.0;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,9 @@ public:
|
||||
void serialize(Archive& archive, const unsigned int version)
|
||||
{
|
||||
using boost::serialization::make_nvp;
|
||||
if(version){};
|
||||
if (version)
|
||||
{
|
||||
};
|
||||
archive& make_nvp("d_alpha0", d_alpha0);
|
||||
archive& make_nvp("d_alpha1", d_alpha1);
|
||||
archive& make_nvp("d_alpha2", d_alpha2);
|
||||
|
@ -30,15 +30,14 @@
|
||||
*/
|
||||
|
||||
#include "beidou_dnav_navigation_message.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <boost/crc.hpp> // for boost::crc_basic, boost::crc_optimal
|
||||
#include <boost/dynamic_bitset.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <gnss_satellite.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
|
||||
void Beidou_Dnav_Navigation_Message::reset()
|
||||
@ -227,7 +226,7 @@ void Beidou_Dnav_Navigation_Message::print_beidou_word_bytes(unsigned int BEIDOU
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
bool Beidou_Dnav_Navigation_Message::read_navigation_bool(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int,int>> parameter)
|
||||
bool Beidou_Dnav_Navigation_Message::read_navigation_bool(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int, int>>& parameter)
|
||||
{
|
||||
bool value;
|
||||
|
||||
@ -242,7 +241,7 @@ bool Beidou_Dnav_Navigation_Message::read_navigation_bool(std::bitset<BEIDOU_DNA
|
||||
return value;
|
||||
}
|
||||
|
||||
unsigned long int Beidou_Dnav_Navigation_Message::read_navigation_unsigned(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int,int>> parameter)
|
||||
unsigned long int Beidou_Dnav_Navigation_Message::read_navigation_unsigned(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int, int>>& parameter)
|
||||
{
|
||||
unsigned long int value = 0;
|
||||
int num_of_slices = parameter.size();
|
||||
@ -260,7 +259,7 @@ unsigned long int Beidou_Dnav_Navigation_Message::read_navigation_unsigned(std::
|
||||
return value;
|
||||
}
|
||||
|
||||
signed long int Beidou_Dnav_Navigation_Message::read_navigation_signed(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int,int>> parameter)
|
||||
signed long int Beidou_Dnav_Navigation_Message::read_navigation_signed(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int, int>>& parameter)
|
||||
{
|
||||
signed long int value = 0;
|
||||
int num_of_slices = parameter.size();
|
||||
@ -654,7 +653,6 @@ int Beidou_Dnav_Navigation_Message::d1_subframe_decoder(std::string const &subfr
|
||||
|
||||
d_M0_ALMANAC = static_cast<double>(read_navigation_signed(subframe_bits, D1_M0));
|
||||
d_M0_ALMANAC = d_M0_ALMANAC * D1_M0_ALMANAC_LSB;
|
||||
|
||||
}
|
||||
|
||||
if (SV_page_5 == 7)
|
||||
@ -694,7 +692,6 @@ int Beidou_Dnav_Navigation_Message::d1_subframe_decoder(std::string const &subfr
|
||||
almanacHealth[30] = static_cast<int>(read_navigation_unsigned(subframe_bits, D1_HEA30));
|
||||
almanac_WN = static_cast<int>(read_navigation_unsigned(subframe_bits, D1_WNA));
|
||||
d_toa2 = static_cast<int>(read_navigation_unsigned(subframe_bits, D1_TOA2));
|
||||
|
||||
}
|
||||
|
||||
if (SV_page_5 == 9)
|
||||
@ -1021,8 +1018,6 @@ Beidou_Dnav_Ephemeris Beidou_Dnav_Navigation_Message::get_ephemeris()
|
||||
eph.d_A_f2 = d_A_f2;
|
||||
|
||||
|
||||
|
||||
|
||||
eph.d_TGD1 = d_TGD1;
|
||||
eph.d_TGD2 = d_TGD2;
|
||||
}
|
||||
@ -1123,9 +1118,15 @@ bool Beidou_Dnav_Navigation_Message::have_new_ephemeris() // Check if we have a
|
||||
if (d_previous_aode != d_AODE)
|
||||
{
|
||||
// Clear flags for all received pages
|
||||
flag_sf1_p1 = false; flag_sf1_p2 = false; flag_sf1_p3 = false;
|
||||
flag_sf1_p4 = false; flag_sf1_p5 = false; flag_sf1_p6 = false;
|
||||
flag_sf1_p7 = false; flag_sf1_p8 = false; flag_sf1_p9 = false;
|
||||
flag_sf1_p1 = false;
|
||||
flag_sf1_p2 = false;
|
||||
flag_sf1_p3 = false;
|
||||
flag_sf1_p4 = false;
|
||||
flag_sf1_p5 = false;
|
||||
flag_sf1_p6 = false;
|
||||
flag_sf1_p7 = false;
|
||||
flag_sf1_p8 = false;
|
||||
flag_sf1_p9 = false;
|
||||
flag_sf1_p10 = false;
|
||||
|
||||
flag_eph_valid = true;
|
||||
@ -1144,7 +1145,9 @@ bool Beidou_Dnav_Navigation_Message::have_new_ephemeris() // Check if we have a
|
||||
if (d_previous_aode != d_AODE)
|
||||
{
|
||||
// Clear flags for all received subframes
|
||||
flag_d1_sf1 = false; flag_d1_sf2 = false; flag_d1_sf3 = false;
|
||||
flag_d1_sf1 = false;
|
||||
flag_d1_sf2 = false;
|
||||
flag_d1_sf3 = false;
|
||||
|
||||
flag_eph_valid = true;
|
||||
// Update the time of ephemeris information
|
||||
|
@ -34,17 +34,16 @@
|
||||
#define GNSS_SDR_BEIDOU_DNAV_NAVIGATION_MESSAGE_H_
|
||||
|
||||
|
||||
#include "Beidou_B1I.h"
|
||||
#include "beidou_dnav_almanac.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "beidou_dnav_iono.h"
|
||||
#include "beidou_dnav_utc_model.h"
|
||||
#include <bitset>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include "beidou_dnav_almanac.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "beidou_dnav_iono.h"
|
||||
#include "beidou_dnav_utc_model.h"
|
||||
#include "Beidou_B1I.h"
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
@ -55,9 +54,9 @@
|
||||
class Beidou_Dnav_Navigation_Message
|
||||
{
|
||||
private:
|
||||
unsigned long int read_navigation_unsigned(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int,int>> parameter);
|
||||
signed long int read_navigation_signed(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int,int>> parameter);
|
||||
bool read_navigation_bool(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int,int>> parameter);
|
||||
unsigned long int read_navigation_unsigned(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int, int>>& parameter);
|
||||
signed long int read_navigation_signed(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int, int>>& parameter);
|
||||
bool read_navigation_bool(std::bitset<BEIDOU_DNAV_SUBFRAME_DATA_BITS> bits, const std::vector<std::pair<int, int>>& parameter);
|
||||
void print_beidou_word_bytes(unsigned int BEIDOU_word);
|
||||
/*
|
||||
* Accounts for the beginning or end of week crossover
|
||||
|
@ -49,4 +49,3 @@ Beidou_Dnav_Utc_Model::Beidou_Dnav_Utc_Model()
|
||||
d_A0_GLO = 0;
|
||||
d_A1_GLO = 0;
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,6 @@ public:
|
||||
archive& make_nvp("d_A0_GPS", d_A0_GLO);
|
||||
archive& make_nvp("d_A0_GPS", d_A1_GLO);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -616,7 +616,7 @@ std::string Gnss_Satellite::what_block(const std::string& system_, uint32_t PRN_
|
||||
block_ = std::string("Unknown(Simulated)");
|
||||
}
|
||||
}
|
||||
if (system_.compare("Beidou") == 0)
|
||||
if (system_ == "Beidou")
|
||||
{
|
||||
// Check https://en.wikipedia.org/wiki/List_of_BeiDou_satellites
|
||||
switch (PRN_)
|
||||
|
@ -119,7 +119,7 @@ DECLARE_string(log_dir);
|
||||
#include "unit-tests/signal-processing-blocks/sources/gnss_sdr_valve_test.cc"
|
||||
#include "unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc"
|
||||
// #include "unit-tests/signal-processing-blocks/acquisition/glonass_l2_ca_pcps_acquisition_test.cc"
|
||||
#include "unit-tests/signal-processing-blocks/acquisition/beidou_b1i_pcps_acquisition_test.cc"
|
||||
// #include "unit-tests/signal-processing-blocks/acquisition/beidou_b1i_pcps_acquisition_test.cc"
|
||||
|
||||
#if OPENCL_BLOCKS_TEST
|
||||
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc"
|
||||
|
@ -31,27 +31,27 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <chrono>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/analog/sig_source_waveform.h>
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "Beidou_B1I.h"
|
||||
#include "acquisition_dump_reader.h"
|
||||
#include "beidou_b1i_pcps_acquisition.h"
|
||||
#include "gnss_block_factory.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
#include "gnss_sdr_valve.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "gnuplot_i.h"
|
||||
#include "in_memory_configuration.h"
|
||||
#include "test_flags.h"
|
||||
#include "acquisition_dump_reader.h"
|
||||
#include "beidou_b1i_pcps_acquisition.h"
|
||||
#include "../../../../core/system_parameters/Beidou_B1I.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/analog/sig_source_waveform.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <chrono>
|
||||
|
||||
|
||||
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#include "file_signal_source.h"
|
||||
#include "in_memory_configuration.h"
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
@ -34,15 +34,15 @@ if ~exist('dll_pll_veml_read_tracking_dump.m', 'file')
|
||||
addpath('./libs')
|
||||
end
|
||||
|
||||
samplingFreq = 25000000; %[Hz]
|
||||
coherent_integration_time_ms = 1; %[ms]
|
||||
channels = 10; % Number of channels
|
||||
samplingFreq = 5000000; %[Hz]
|
||||
coherent_integration_time_ms = 20; %[ms]
|
||||
channels = 5; % Number of channels
|
||||
first_channel = 0; % Number of the first channel
|
||||
|
||||
path = '/home/dmiralles/Documents/gnss-sdr/';%#'; %% CHANGE THIS PATH
|
||||
path = '/dump_dir/'; %% CHANGE THIS PATH
|
||||
|
||||
for N=1:1:channels
|
||||
tracking_log_path = [path 'epl_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE track_ch_ BY YOUR dump_filename
|
||||
tracking_log_path = [path 'track_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE track_ch_ BY YOUR dump_filename
|
||||
GNSS_tracking(N) = dll_pll_veml_read_tracking_dump(tracking_log_path);
|
||||
end
|
||||
|
||||
|
@ -38,7 +38,7 @@ samplingFreq = 6625000; %[Hz]
|
||||
channels = 5;
|
||||
first_channel = 0;
|
||||
|
||||
path = '/home/sergi/gnss/gnss-sdr/install/'; %% CHANGE THIS PATH
|
||||
path = '/archive/'; %% CHANGE THIS PATH
|
||||
|
||||
for N=1:1:channels
|
||||
tracking_log_path = [path 'epl_tracking_ch_' num2str(N+first_channel-1) '.dat']; %% CHANGE epl_tracking_ch_ BY YOUR dump_filename
|
||||
|
@ -29,10 +29,10 @@
|
||||
clearvars;
|
||||
close all;
|
||||
addpath('./libs');
|
||||
samplingFreq = 25000000; %[Hz]
|
||||
channels=10;
|
||||
path='/home/dmiralles/Documents/gnss-sdr/';
|
||||
observables_log_path=[path 'observables.dat'];
|
||||
samplingFreq = 6625000; %[Hz]
|
||||
channels=5;
|
||||
path='/archive/';
|
||||
observables_log_path=[path 'glo_observables.dat'];
|
||||
GNSS_observables= read_hybrid_observables_dump(channels,observables_log_path);
|
||||
|
||||
%%
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user