mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-12 02:10:34 +00:00
tracking working, some satellites with loss of lock
This commit is contained in:
parent
d11490edc4
commit
51aa80aa46
@ -47,13 +47,14 @@ Channel.signal=B1
|
||||
Acquisition_B1.implementation=BEIDOU_B1I_PCPS_Acquisition
|
||||
Acquisition_B1.item_type=gr_complex
|
||||
Acquisition_B1.coherent_integration_time_ms=1
|
||||
Acquisition_B1.threshold=0.008
|
||||
Acquisition_B1.threshold=18
|
||||
;Acquisition_B1.pfa=0.000001
|
||||
Acquisition_B1.doppler_max=10000
|
||||
Acquisition_B1.doppler_step=250
|
||||
Acquisition_B1.dump=true
|
||||
Acquisition_B1.dump_filename=./acq_dump.dat
|
||||
Acquisition_B1.blocking=false;
|
||||
Acquisition_B1.use_CFAR_algorithm=false
|
||||
|
||||
;######### TRACKING GLOBAL CONFIG ############
|
||||
Tracking_B1.implementation=BEIDOU_B1I_DLL_PLL_Tracking
|
||||
@ -61,7 +62,7 @@ Tracking_B1.item_type=gr_complex
|
||||
Tracking_B1.pll_bw_hz=40.0;
|
||||
Tracking_B1.dll_bw_hz=4.0;
|
||||
Tracking_B1.order=3;
|
||||
Tracking_B1.dump=false;
|
||||
Tracking_B1.dump=true;
|
||||
Tracking_B1.dump_filename=./epl_tracking_ch_
|
||||
|
||||
|
||||
|
@ -46,7 +46,6 @@ void beidou_b1i_code_gen_int(int* _dest, signed int _prn, unsigned int _chip_shi
|
||||
unsigned int lcv, lcv2;
|
||||
unsigned int delay;
|
||||
signed int prn_idx;
|
||||
std::cout << "MY SATELLITE " << _prn << "!" << std::endl;
|
||||
/* G2 Delays as defined in GPS-ISD-200D */
|
||||
const signed int delays[33] = {712 /*PRN1*/, 1581, 1414, 1550, 581, 771, 1311, 1043, 1549, 359, 710, 1579, 1548, 1103, 579, 769, 358, 709, 1411, 1547,
|
||||
1102, 578, 357, 1577, 1410, 1546, 1101, 707, 1576, 1409, 1545, 354 /*PRN32*/,
|
||||
|
@ -1,9 +1,10 @@
|
||||
/*!
|
||||
* \file gps_l1_ca_dll_pll_tracking.cc
|
||||
* \file beidou_b1i_dll_pll_tracking.cc
|
||||
* \brief Implementation of an adapter of a DLL+PLL tracking loop block
|
||||
* for GPS L1 C/A to a TrackingInterface
|
||||
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
|
||||
* Javier Arribas, 2011. jarribas(at)cttc.es
|
||||
* Sergi Segura, 2018. sergi.segura.munoz@gmail.com
|
||||
*
|
||||
* Code DLL + carrier PLL according to the algorithms described in:
|
||||
* K.Borre, D.M.Akos, N.Bertelsen, P.Rinder, and S.H.Jensen,
|
||||
@ -36,16 +37,16 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "gps_l1_ca_dll_pll_tracking.h"
|
||||
#include "beidou_b1i_dll_pll_tracking.h"
|
||||
#include "configuration_interface.h"
|
||||
#include "GPS_L1_CA.h"
|
||||
#include "beidou_b1I.h"
|
||||
#include "gnss_sdr_flags.h"
|
||||
#include "display.h"
|
||||
#include <glog/logging.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
BeidouB1iDllPllTracking::BeidouB1iDllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
@ -76,34 +77,34 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
std::string default_dump_filename = "./track_ch";
|
||||
std::string dump_filename = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||
trk_param.dump_filename = dump_filename;
|
||||
int vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||
int vector_length = std::round(fs_in / (BEIDOU_B1I_CODE_RATE_HZ / BEIDOU_B1I_CODE_LENGTH_CHIPS));
|
||||
trk_param.vector_length = vector_length;
|
||||
int symbols_extended_correlator = configuration->property(role + ".extend_correlation_symbols", 1);
|
||||
if (symbols_extended_correlator < 1)
|
||||
{
|
||||
symbols_extended_correlator = 1;
|
||||
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
|
||||
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. extend_correlation_symbols must be bigger than 1. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
else if (symbols_extended_correlator > 20)
|
||||
{
|
||||
symbols_extended_correlator = 20;
|
||||
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
|
||||
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. extend_correlation_symbols must be lower than 21. Coherent integration has been set to 20 symbols (20 ms)" << TEXT_RESET << std::endl;
|
||||
}
|
||||
trk_param.extend_correlation_symbols = symbols_extended_correlator;
|
||||
bool track_pilot = configuration->property(role + ".track_pilot", false);
|
||||
if (track_pilot)
|
||||
{
|
||||
std::cout << TEXT_RED << "WARNING: GPS L1 C/A does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
|
||||
std::cout << TEXT_RED << "WARNING: BEIDOU B1I does not have pilot signal. Data tracking has been enabled" << TEXT_RESET << std::endl;
|
||||
}
|
||||
if ((symbols_extended_correlator > 1) and (pll_bw_narrow_hz > pll_bw_hz or dll_bw_narrow_hz > dll_bw_hz))
|
||||
{
|
||||
std::cout << TEXT_RED << "WARNING: GPS L1 C/A. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
|
||||
std::cout << TEXT_RED << "WARNING: BEIDOU B1I. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << std::endl;
|
||||
}
|
||||
trk_param.very_early_late_space_chips = 0.0;
|
||||
trk_param.very_early_late_space_narrow_chips = 0.0;
|
||||
trk_param.track_pilot = false;
|
||||
trk_param.system = 'G';
|
||||
char sig_[3] = "1C";
|
||||
trk_param.system = 'C';
|
||||
char sig_[3] = "B1";
|
||||
std::memcpy(trk_param.signal, sig_, 3);
|
||||
int cn0_samples = configuration->property(role + ".cn0_samples", 20);
|
||||
if (FLAGS_cn0_samples != 20) cn0_samples = FLAGS_cn0_samples;
|
||||
@ -142,12 +143,12 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
}
|
||||
|
||||
|
||||
GpsL1CaDllPllTracking::~GpsL1CaDllPllTracking()
|
||||
BeidouB1iDllPllTracking::~BeidouB1iDllPllTracking()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaDllPllTracking::start_tracking()
|
||||
void BeidouB1iDllPllTracking::start_tracking()
|
||||
{
|
||||
tracking_->start_tracking();
|
||||
}
|
||||
@ -156,20 +157,20 @@ void GpsL1CaDllPllTracking::start_tracking()
|
||||
/*
|
||||
* Set tracking channel unique ID
|
||||
*/
|
||||
void GpsL1CaDllPllTracking::set_channel(unsigned int channel)
|
||||
void BeidouB1iDllPllTracking::set_channel(unsigned int channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
tracking_->set_channel(channel);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
void BeidouB1iDllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
|
||||
{
|
||||
tracking_->set_gnss_synchro(p_gnss_synchro);
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaDllPllTracking::connect(gr::top_block_sptr top_block)
|
||||
void BeidouB1iDllPllTracking::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
@ -178,7 +179,7 @@ void GpsL1CaDllPllTracking::connect(gr::top_block_sptr top_block)
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaDllPllTracking::disconnect(gr::top_block_sptr top_block)
|
||||
void BeidouB1iDllPllTracking::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
@ -187,13 +188,13 @@ void GpsL1CaDllPllTracking::disconnect(gr::top_block_sptr top_block)
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr GpsL1CaDllPllTracking::get_left_block()
|
||||
gr::basic_block_sptr BeidouB1iDllPllTracking::get_left_block()
|
||||
{
|
||||
return tracking_;
|
||||
}
|
||||
|
||||
|
||||
gr::basic_block_sptr GpsL1CaDllPllTracking::get_right_block()
|
||||
gr::basic_block_sptr BeidouB1iDllPllTracking::get_right_block()
|
||||
{
|
||||
return tracking_;
|
||||
}
|
||||
|
@ -35,8 +35,8 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_
|
||||
#define GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_
|
||||
#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"
|
||||
@ -47,22 +47,21 @@ class ConfigurationInterface;
|
||||
/*!
|
||||
* \brief This class implements a code DLL + carrier PLL tracking loop
|
||||
*/
|
||||
class GpsL1CaDllPllTracking : public TrackingInterface
|
||||
class BeidouB1iDllPllTracking : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL1CaDllPllTracking(ConfigurationInterface* configuration,
|
||||
BeidouB1iDllPllTracking(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
virtual ~GpsL1CaDllPllTracking();
|
||||
virtual ~BeidouB1iDllPllTracking();
|
||||
|
||||
inline std::string role() override
|
||||
{
|
||||
return role_;
|
||||
}
|
||||
|
||||
//! Returns "GPS_L1_CA_DLL_PLL_Tracking"
|
||||
inline std::string implementation() override
|
||||
{
|
||||
return "BEIDOU_B1I_DLL_PLL_Tracking";
|
||||
@ -100,4 +99,4 @@ private:
|
||||
unsigned int out_streams_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_GPS_L1_CA_DLL_PLL_TRACKING_H_
|
||||
#endif // GNSS_SDR_BEIDOU_B1I_DLL_PLL_TRACKING_H_
|
||||
|
@ -49,6 +49,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
|
||||
dllpllconf_t trk_param;
|
||||
DLOG(INFO) << "role " << role;
|
||||
//################# CONFIGURATION PARAMETERS ########################
|
||||
|
@ -48,6 +48,8 @@
|
||||
#include "gps_l2c_signal.h"
|
||||
#include "GPS_L5.h"
|
||||
#include "gps_l5_signal.h"
|
||||
#include "beidou_b1I.h"
|
||||
#include "beidou_b1I_signal_processing.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
@ -101,6 +103,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(dllpllconf_t conf_) : gr::block("dl
|
||||
map_signal_pretty_name["2G"] = "L2 C/A";
|
||||
map_signal_pretty_name["5X"] = "E5a";
|
||||
map_signal_pretty_name["L5"] = "L5";
|
||||
map_signal_pretty_name["B1"] = "B1I";
|
||||
|
||||
signal_pretty_name = map_signal_pretty_name[signal_type];
|
||||
|
||||
@ -239,6 +242,37 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(dllpllconf_t conf_) : gr::block("dl
|
||||
d_symbols_per_bit = 0;
|
||||
}
|
||||
}
|
||||
else if (trk_parameters.system == 'C')
|
||||
{
|
||||
systemName = "Beidou";
|
||||
if (signal_type.compare("B1") == 0)
|
||||
{
|
||||
d_signal_carrier_freq = BEIDOU_B1I_FREQ_HZ;
|
||||
d_code_period = BEIDOU_B1I_CODE_PERIOD;
|
||||
d_code_chip_rate = BEIDOU_B1I_CODE_RATE_HZ;
|
||||
d_code_length_chips = static_cast<unsigned int>(BEIDOU_B1I_CODE_LENGTH_CHIPS);
|
||||
d_symbols_per_bit = BEIDOU_B1I_TELEMETRY_SYMBOLS_PER_BIT;
|
||||
d_correlation_length_ms = 1;
|
||||
d_code_samples_per_chip = 1;
|
||||
d_secondary = false;
|
||||
trk_parameters.track_pilot = false;
|
||||
interchange_iq = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
|
||||
std::cout << "Invalid Signal argument when instantiating tracking blocks" << std::endl;
|
||||
d_correlation_length_ms = 1;
|
||||
d_secondary = false;
|
||||
interchange_iq = false;
|
||||
d_signal_carrier_freq = 0.0;
|
||||
d_code_period = 0.0;
|
||||
d_code_length_chips = 0;
|
||||
d_code_samples_per_chip = 0;
|
||||
d_symbols_per_bit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
LOG(WARNING) << "Invalid System argument when instantiating tracking blocks";
|
||||
@ -482,6 +516,10 @@ void dll_pll_veml_tracking::start_tracking()
|
||||
}
|
||||
volk_gnsssdr_free(aux_code);
|
||||
}
|
||||
else if (systemName.compare("Beidou") == 0 and signal_type.compare("B1") == 0)
|
||||
{
|
||||
beidou_b1i_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN, 0);
|
||||
}
|
||||
|
||||
multicorrelator_cpu.set_local_code_and_taps(d_code_samples_per_chip * d_code_length_chips, d_tracking_code, d_local_code_shift_chips);
|
||||
std::fill_n(d_correlator_outs, d_n_correlator_taps, gr_complex(0.0, 0.0));
|
||||
|
@ -1657,7 +1657,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
}
|
||||
else if (implementation.compare("BEIDOU_B1I_DLL_PLL_Tracking") == 0)
|
||||
{
|
||||
std::unique_ptr<GNSSBlockInterface> block_(new GpsL1CaDllPllTracking(configuration.get(), role, in_streams,
|
||||
std::unique_ptr<GNSSBlockInterface> block_(new BeidouB1iDllPllTracking(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
@ -1988,7 +1988,7 @@ std::unique_ptr<TrackingInterface> GNSSBlockFactory::GetTrkBlock(
|
||||
}
|
||||
else if (implementation.compare("BEIDOU_B1I_DLL_PLL_Tracking") == 0)
|
||||
{
|
||||
std::unique_ptr<TrackingInterface> block_(new GpsL1CaDllPllTracking(configuration.get(), role, in_streams,
|
||||
std::unique_ptr<TrackingInterface> block_(new BeidouB1iDllPllTracking(configuration.get(), role, in_streams,
|
||||
out_streams));
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
@ -599,6 +599,99 @@ std::string Gnss_Satellite::what_block(const std::string& system_, unsigned int
|
||||
block_ = std::string("Unknown(Simulated)");
|
||||
}
|
||||
}
|
||||
if (system_.compare("Beidou") == 0)
|
||||
{
|
||||
// Check https://en.wikipedia.org/wiki/List_of_BeiDou_satellites
|
||||
switch ( PRN_ )
|
||||
{
|
||||
case 1:
|
||||
block_ = std::string("Compass-G1");
|
||||
break;
|
||||
case 2:
|
||||
block_ = std::string("Compass-G6");
|
||||
break;
|
||||
case 3:
|
||||
block_ = std::string("Compass-G3");
|
||||
break;
|
||||
case 4:
|
||||
block_ = std::string("Compass-G4");
|
||||
break;
|
||||
case 5:
|
||||
block_ = std::string("Compass-G5");
|
||||
break;
|
||||
case 6:
|
||||
block_ = std::string("Compass-IGSO1");
|
||||
break;
|
||||
case 7:
|
||||
block_ = std::string("Compass-IGSO2");
|
||||
break;
|
||||
case 8:
|
||||
block_ = std::string("Compass-IGSO3");
|
||||
break;
|
||||
case 9:
|
||||
block_ = std::string("Compass-IGSO4");
|
||||
break;
|
||||
case 10:
|
||||
block_ = std::string("Compass-IGSO5");
|
||||
break;
|
||||
case 11:
|
||||
block_ = std::string("Compass-M3");
|
||||
break;
|
||||
case 12:
|
||||
block_ = std::string("Compass-M4");
|
||||
break;
|
||||
case 13:
|
||||
block_ = std::string("Compass-M2");
|
||||
break;
|
||||
case 14:
|
||||
block_ = std::string("Compass-M5");
|
||||
break;
|
||||
case 17:
|
||||
block_ = std::string("Compass-G7");
|
||||
break;
|
||||
case 19:
|
||||
block_ = std::string("BeiDou-3 M1");
|
||||
break;
|
||||
case 20:
|
||||
block_ = std::string("BeiDou-3 M2");
|
||||
break;
|
||||
case 21:
|
||||
block_ = std::string("BeiDou-3 M3");
|
||||
break;
|
||||
case 22:
|
||||
block_ = std::string("BeiDou-3 M4");
|
||||
break;
|
||||
case 27:
|
||||
block_ = std::string("BeiDou-3 M7");
|
||||
break;
|
||||
case 28:
|
||||
block_ = std::string("BeiDou-3 M8");
|
||||
break;
|
||||
case 29:
|
||||
block_ = std::string("BeiDou-3 M9");
|
||||
break;
|
||||
case 30:
|
||||
block_ = std::string("BeiDou-3 M10");
|
||||
break;
|
||||
case 31:
|
||||
block_ = std::string("BDS I1-S");
|
||||
break;
|
||||
case 32:
|
||||
block_ = std::string("BDS I2-S");
|
||||
break;
|
||||
case 33:
|
||||
block_ = std::string("BDS M1-S");
|
||||
break;
|
||||
case 34:
|
||||
block_ = std::string("BDS M2-S");
|
||||
break;
|
||||
case 35:
|
||||
block_ = std::string("BDS M3-S");
|
||||
break;
|
||||
default:
|
||||
block_ = std::string("Unknown(Simulated)");
|
||||
}
|
||||
}
|
||||
return block_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user