1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-11-13 13:47:15 +00:00

Add Galileo E6 signal structure based on E6-B/C Codes Technical Note, Issue 1, Jan 2019.

Add Acquisition, Tracking and TLM blocks for Galileo E6 B/C. The decoder does nothing
This commit is contained in:
Carles Fernandez
2020-11-07 21:33:26 +01:00
parent ab5b824dcf
commit bcd7c25cd1
35 changed files with 2912 additions and 114 deletions

View File

@@ -158,8 +158,16 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
* 30 | Galileo E1B + GLONASS L2 C/A
* 31 | GPS L2C + GLONASS L2 C/A
* 32 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a
* 33 | GPS L1 C/A + Galileo E1B + Galileo E5a
*
*
* Skipped previous values to avoid overlapping
* 100 | Galileo E6B
* 101 | Galileo E1B + Galileo E6B
* 102 | Galileo E5a + Galileo E6B
* 103 | Galileo E5b + Galileo E6B
* 104 | Galileo E1B + Galileo E5a + Galileo E6B
* 105 | Galileo E1B + Galileo E5b + Galileo E6B
* 106 | GPS L1 C/A + Galileo E1B + Galileo E6B
* Skipped previous values to avoid overlapping
* 500 | BeiDou B1I
* 501 | BeiDou B1I + GPS L1 C/A
@@ -190,185 +198,218 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
const int gal_1B_count = configuration->property("Channels_1B.count", 0);
const int gal_E5a_count = configuration->property("Channels_5X.count", 0);
const int gal_E5b_count = configuration->property("Channels_7X.count", 0);
const int gal_E6_count = configuration->property("Channels_E6.count", 0);
const int glo_1G_count = configuration->property("Channels_1G.count", 0);
const int glo_2G_count = configuration->property("Channels_2G.count", 0);
const int bds_B1_count = configuration->property("Channels_B1.count", 0);
const int bds_B3_count = configuration->property("Channels_B3.count", 0);
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 1; // L1
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 2; // GPS L2C
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 3; // L5
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 4; // E1
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 5; // E5a
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 7; // GPS L1 C/A + GPS L2C
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 8; // L1+L5
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 9; // L1+E1
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 10; // GPS L1 C/A + Galileo E5a
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 12; // Galileo E1B + GPS L2C
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 13; // L5+E5a
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 14; // Galileo E1B + Galileo E5a
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.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) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 16; // GPS L2C + GPS L5
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 17; // GPS L2C + Galileo E5a
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.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)) pvt_output_parameters.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)) pvt_output_parameters.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) && (bds_B1_count == 0) && (bds_B3_count == 0))
// 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) && (gal_E6_count == 0)) pvt_output_parameters.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) && (gal_E6_count == 0)) pvt_output_parameters.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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 21; // GPS L1 C/A + Galileo E1B + GPS L2C
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 22; // GPS L1 C/A + Galileo E1B + GPS L5
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 23; // GLONASS L1 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 24; // GLONASS L2 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 25; // GLONASS L1 C/A + GLONASS L2 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 26; // GPS L1 C/A + GLONASS L1 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 27; // Galileo E1B + GLONASS L1 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 28; // GPS L2C + GLONASS L1 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 29; // GPS L1 C/A + GLONASS L2 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 30; // Galileo E1B + GLONASS L2 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 31; // GPS L2C + GLONASS L2 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 32; // L1+E1+L5+E5a
}
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 33; // L1+E1+E5a
}
// Galileo E6
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) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 100; // Galileo E6B
}
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) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 101; // Galileo E1B + Galileo E6B
}
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) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 102; // Galileo E5a + Galileo E6B
}
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) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 103; // Galileo E5b + Galileo E6B
}
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) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 104; // Galileo E1B + Galileo E5a + Galileo E6B
}
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) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 105; // Galileo E1B + Galileo E5b + Galileo E6B
}
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) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 106; // GPS L1 C/A + Galileo E1B + Galileo E6B
}
// BeiDou B1I Receiver
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) && (bds_B1_count != 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 500; // Beidou B1I
}
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) && (bds_B1_count != 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 501; // Beidou B1I + GPS L1 C/A
}
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) && (bds_B1_count != 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 502; // Beidou B1I + Galileo E1B
}
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) && (bds_B1_count != 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 503; // Beidou B1I + GLONASS L1 C/A
}
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) && (bds_B1_count != 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 504; // Beidou B1I + GPS L1 C/A + Galileo E1B
}
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) && (bds_B1_count != 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 505; // Beidou B1I + GPS L1 C/A + GLONASS L1 C/A + Galileo E1B
}
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) && (bds_B1_count != 0) && (bds_B3_count != 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count != 0))
{
pvt_output_parameters.type_of_receiver = 506; // Beidou B1I + Beidou B3I
}
// BeiDou B3I Receiver
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) && (bds_B1_count == 0) && (bds_B3_count != 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
{
pvt_output_parameters.type_of_receiver = 600; // Beidou B3I
}
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) && (bds_B1_count == 0) && (bds_B3_count != 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
{
pvt_output_parameters.type_of_receiver = 601; // Beidou B3I + GPS L2C
}
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) && (bds_B1_count == 0) && (bds_B3_count != 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
{
pvt_output_parameters.type_of_receiver = 602; // Beidou B3I + GLONASS L2 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count != 0))
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) && (gal_E6_count == 0) && (glo_1G_count != 0) && (glo_2G_count != 0) && (bds_B1_count == 0) && (bds_B3_count != 0))
{
pvt_output_parameters.type_of_receiver = 603; // Beidou B3I + GPS L2C + GLONASS L2 C/A
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 1000; // GPS L1 + GPS L2C + GPS L5
}
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) && (bds_B1_count == 0) && (bds_B3_count == 0))
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) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 1001; // GPS L1 + Galileo E1B + GPS L2C + GPS L5 + Galileo E5a
}
@@ -411,7 +452,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
int num_bands = 0;
if ((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0))
if ((gps_1C_count > 0) || (gal_1B_count > 0) || (gal_E6_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0))
{
num_bands = 1;
}
@@ -423,6 +464,14 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
{
num_bands = 2;
}
if ((gal_1B_count > 0) && (gal_E6_count > 0))
{
num_bands = 2;
}
if ((gal_1B_count > 0) && (gal_E6_count > 0) && (gal_E5a_count > 0) || (gal_E5b_count > 0))
{
num_bands = 3;
}
if (((gps_1C_count > 0) || (gal_1B_count > 0) || (glo_1G_count > 0) || (bds_B1_count > 0)) && ((gps_2S_count > 0) || (glo_2G_count > 0) || (bds_B3_count > 0)) && ((gal_E5a_count > 0) || (gal_E5b_count > 0) || (gps_L5_count > 0)))
{
num_bands = 3;

View File

@@ -134,6 +134,7 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
d_mapStringValues["L5"] = evGPS_L5;
d_mapStringValues["1B"] = evGAL_1B;
d_mapStringValues["5X"] = evGAL_5X;
d_mapStringValues["E6"] = evGAL_E6;
d_mapStringValues["7X"] = evGAL_7X;
d_mapStringValues["1G"] = evGLO_1G;
d_mapStringValues["2G"] = evGLO_2G;
@@ -1140,6 +1141,9 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
case 33: // L1+E1+E5a
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
break;
case 106: // GPS L1 C/A + Galileo E1B + Galileo E6B
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
break;
case 1000: // L1+L2+L5
d_rp->log_rinex_nav(d_rp->navFile, new_eph);
break;
@@ -1319,8 +1323,20 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
case 30: // Galileo E1B + GLONASS L2 C/A
d_rp->log_rinex_nav(d_rp->navMixFile, new_gal_eph, new_glo_eph);
break;
case 32: // L1+E1+L5+E5a
case 33: // L1+E1+E5a
case 32: // L1+E1+L5+E5a
case 33: // L1+E1+E5a
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
break;
case 101: // E1B + E6B
case 102: // Galileo E5a + Galileo E6B
case 103: // Galileo E5b + Galileo E6B
case 104: // Galileo E1B + Galileo E5a + Galileo E6B
case 105: // Galileo E1B + Galileo E5b + Galileo E6B
d_rp->log_rinex_nav(d_rp->navGalFile, new_gal_eph);
break;
case 106: // GPS L1 C/A + Galileo E1B + Galileo E6B
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
break;
case 1001: // L1+E1+L2+L5+E5a
d_rp->log_rinex_nav(d_rp->navMixFile, new_eph, new_gal_eph);
break;
@@ -1803,6 +1819,9 @@ void rtklib_pvt_gs::apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observabl
case evGAL_5X:
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ5 * TWO_PI;
break;
case evGAL_E6:
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ6 * TWO_PI;
break;
case evGAL_7X:
observables_iter->second.Carrier_phase_rads -= rx_clock_offset_s * FREQ7 * TWO_PI;
break;
@@ -1902,6 +1921,9 @@ void rtklib_pvt_gs::initialize_and_apply_carrier_phase_offset()
case evGAL_5X:
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ5;
break;
case evGAL_E6:
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ6;
break;
case evGAL_7X:
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ7;
break;
@@ -2301,7 +2323,14 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
* 30 | Galileo E1B + GLONASS L2 C/A
* 31 | GPS L2C + GLONASS L2 C/A
* 32 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a
* 500 | BeiDou B1I
* 33 | GPS L1 C/A + Galileo E1B + Galileo E5a
= 100 | Galileo E6B
= 101 | Galileo E1B + Galileo E6B
* 102 | Galileo E5a + Galileo E6B
* 103 | Galileo E5b + Galileo E6B
* 104 | Galileo E1B + Galileo E5a + Galileo E6B
* 105 | Galileo E1B + Galileo E5b + Galileo E6B
* 106 | GPS L1 C/A + Galileo E1B + Galileo E6B
* 501 | BeiDou B1I + GPS L1 C/A
* 502 | BeiDou B1I + Galileo E1B
* 503 | BeiDou B1I + GLONASS L1 C/A
@@ -2615,6 +2644,65 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
d_rinex_header_written = true; // do not write header anymore
}
break;
case 101: // Galileo E1B + Galileo E6B
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time);
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
d_rinex_header_written = true; // do not write header anymore
}
break;
case 102: // Galileo E5a + Galileo E6B
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
const std::string signal("5X");
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
d_rinex_header_written = true; // do not write header anymore
}
break;
case 103: // Galileo E5b + Galileo E6B
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
const std::string signal("7X");
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, signal);
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
d_rinex_header_written = true; // do not write header anymore
}
break;
case 104: // Galileo E1B + Galileo E5a + Galileo E6B
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
{
const std::string gal_signal("1B 5X");
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
d_rinex_header_written = true; // do not write header anymore
}
break;
case 105: // Galileo E1B + Galileo E5b + Galileo E6B
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()))
{
const std::string gal_signal("1B 7X");
d_rp->rinex_obs_header(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
d_rp->rinex_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->log_rinex_nav(d_rp->navGalFile, d_user_pvt_solver->galileo_ephemeris_map);
d_rinex_header_written = true; // do not write header anymore
}
break;
case 106: // GPS L1 C/A + Galileo E1B + Galileo E6B
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
{
const std::string gal_signal("1B");
d_rp->rinex_obs_header(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gal_signal);
d_rp->rinex_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->log_rinex_nav(d_rp->navMixFile, d_user_pvt_solver->gps_ephemeris_map, d_user_pvt_solver->galileo_ephemeris_map);
d_rinex_header_written = true; // do not write header anymore
}
break;
case 500: // BDS B1I only
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
@@ -3002,6 +3090,78 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
}
break;
case 101: // Galileo E1B + Galileo E6B
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rp->log_rinex_obs(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, d_gnss_observables_map, "1B");
}
if (!d_rinex_header_updated and (d_user_pvt_solver->galileo_utc_model.A0_6 != 0))
{
d_rp->update_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->update_obs_header(d_rp->obsFile, d_user_pvt_solver->galileo_utc_model);
d_rinex_header_updated = true;
}
break;
case 102: // Galileo E5a + Galileo E6B
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rp->log_rinex_obs(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, d_gnss_observables_map, "5X");
}
if (!d_rinex_header_updated and (d_user_pvt_solver->galileo_utc_model.A0_6 != 0))
{
d_rp->update_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->update_obs_header(d_rp->obsFile, d_user_pvt_solver->galileo_utc_model);
d_rinex_header_updated = true;
}
break;
case 103: // Galileo E5b + Galileo E6B
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rp->log_rinex_obs(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, d_gnss_observables_map, "5X");
}
if (!d_rinex_header_updated and (d_user_pvt_solver->galileo_utc_model.A0_6 != 0))
{
d_rp->update_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->update_obs_header(d_rp->obsFile, d_user_pvt_solver->galileo_utc_model);
d_rinex_header_updated = true;
}
break;
case 104: // Galileo E1B + Galileo E5a + Galileo E6B
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rp->log_rinex_obs(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, d_gnss_observables_map, "1B 5X");
}
if (!d_rinex_header_updated and (d_user_pvt_solver->galileo_utc_model.A0_6 != 0))
{
d_rp->update_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->update_obs_header(d_rp->obsFile, d_user_pvt_solver->galileo_utc_model);
d_rinex_header_updated = true;
}
break;
case 105: // Galileo E1B + Galileo E5b + Galileo E6B
if (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rp->log_rinex_obs(d_rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, d_gnss_observables_map, "1B 7X");
}
if (!d_rinex_header_updated and (d_user_pvt_solver->galileo_utc_model.A0_6 != 0))
{
d_rp->update_nav_header(d_rp->navGalFile, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rp->update_obs_header(d_rp->obsFile, d_user_pvt_solver->galileo_utc_model);
d_rinex_header_updated = true;
}
break;
case 106: // GPS L1 C/A + Galileo E1B + Galileo E6B
if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()))
{
d_rp->log_rinex_obs(d_rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, d_gnss_observables_map);
if (!d_rinex_header_updated and (d_user_pvt_solver->gps_utc_model.d_A0 != 0))
{
d_rp->update_obs_header(d_rp->obsFile, d_user_pvt_solver->gps_utc_model);
d_rp->update_nav_header(d_rp->navMixFile, d_user_pvt_solver->gps_iono, d_user_pvt_solver->gps_utc_model, gps_ephemeris_iter->second, d_user_pvt_solver->galileo_iono, d_user_pvt_solver->galileo_utc_model);
d_rinex_header_updated = true;
}
}
break;
case 500: // BDS B1I only
if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend())
{
@@ -3084,9 +3244,9 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
}
break;
case 4:
case 5:
case 6:
case 4: // Galileo E1B
case 5: // Galileo E5a
case 6: // Galileo E5b
if (flag_write_RTCM_1045_output == true)
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
@@ -3250,8 +3410,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
}
break;
case 14:
case 15:
case 14: // Galileo E1B + Galileo E5a
case 15: // Galileo E1B + Galileo E5b
if (flag_write_RTCM_1045_output == true)
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
@@ -3268,9 +3428,9 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
}
break;
case 23:
case 24:
case 25:
case 23: // GLONASS L1 C/A
case 24: // GLONASS L2 C/A
case 25: // GLONASS L1 C/A + GLONASS L2 C/A
if (flag_write_RTCM_1020_output == true)
{
for (const auto& glonass_gnav_ephemeris_iter : d_user_pvt_solver->glonass_gnav_ephemeris_map)
@@ -3579,6 +3739,85 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
}
break;
case 101: // Galileo E1B + Galileo E6B
case 102: // Galileo E5a + Galileo E6B
case 103: // Galileo E5b + Galileo E6B
case 104: // Galileo E1B + Galileo E5a + Galileo E6B
case 105: // Galileo E1B + Galileo E5b + Galileo E6B
if (flag_write_RTCM_1045_output == true)
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
{
d_rtcm_printer->Print_Rtcm_MT1045(gal_eph_iter.second);
}
}
if (flag_write_RTCM_MSM_output == true)
{
const auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
}
}
break;
case 106: // GPS L1 C/A + Galileo E1B + Galileo E6B
if (flag_write_RTCM_1019_output == true)
{
for (const auto& gps_eph_iter : d_user_pvt_solver->gps_ephemeris_map)
{
d_rtcm_printer->Print_Rtcm_MT1019(gps_eph_iter.second);
}
}
if (flag_write_RTCM_1045_output == true)
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
{
d_rtcm_printer->Print_Rtcm_MT1045(gal_eph_iter.second);
}
}
if (flag_write_RTCM_MSM_output == true)
{
auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
int gps_channel = 0;
int gal_channel = 0;
for (const auto& gnss_observables_iter : d_gnss_observables_map)
{
const std::string system(gnss_observables_iter.second.System, 1);
if (gps_channel == 0)
{
if (system == "G")
{
// This is a channel with valid GPS signal
gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN);
if (gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend())
{
gps_channel = 1;
}
}
}
if (gal_channel == 0)
{
if (system == "E")
{
gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter.second.PRN);
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
gal_channel = 1;
}
}
}
}
if (gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend())
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
}
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
}
}
break;
default:
break;
}
@@ -3606,9 +3845,9 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
d_rtcm_writing_started = true;
break;
case 4:
case 5:
case 6:
case 4: // Galileo E1B
case 5: // Galileo E5a
case 6: // Galileo E5b
if (d_rtcm_MT1045_rate_ms != 0) // allows deactivating messages by setting rate = 0
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
@@ -3759,8 +3998,8 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
d_rtcm_writing_started = true;
break;
case 14:
case 15:
case 14: // Galileo E1B + Galileo E5a
case 15: // Galileo E1B + Galileo E5b
if (d_rtcm_MT1045_rate_ms != 0) // allows deactivating messages by setting rate = 0
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
@@ -3778,9 +4017,9 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
d_rtcm_writing_started = true;
break;
case 23:
case 24:
case 25:
case 23: // GLONASS L1 C/A
case 24: // GLONASS L2 C/A
case 25: // GLONASS L1 C/A + GLONASS L2 C/A
if (d_rtcm_MT1020_rate_ms != 0) // allows deactivating messages by setting rate = 0
{
for (const auto& glonass_gnav_eph_iter : d_user_pvt_solver->glonass_gnav_ephemeris_map)
@@ -4094,6 +4333,104 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
}
d_rtcm_writing_started = true;
break;
case 101: // Galileo E1B + Galileo E6B
case 102: // Galileo E5a + Galileo E6B
case 103: // Galileo E5b + Galileo E6B
if (d_rtcm_MT1045_rate_ms != 0) // allows deactivating messages by setting rate = 0
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
{
d_rtcm_printer->Print_Rtcm_MT1045(gal_eph_iter.second);
}
}
if (d_rtcm_MSM_rate_ms != 0)
{
const auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
}
}
d_rtcm_writing_started = true;
break;
case 104: // Galileo E1B + Galileo E5a + Galileo E6B
case 105: // Galileo E1B + Galileo E5b + Galileo E6B
if (d_rtcm_MT1045_rate_ms != 0) // allows deactivating messages by setting rate = 0
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
{
d_rtcm_printer->Print_Rtcm_MT1045(gal_eph_iter.second);
}
}
if (d_rtcm_MSM_rate_ms != 0)
{
const auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
}
}
d_rtcm_writing_started = true;
break;
case 106: // GPS L1 C/A + Galileo E1B + Galileo E6B
if (d_rtcm_MT1019_rate_ms != 0) // allows deactivating messages by setting rate = 0
{
for (const auto& gps_eph_iter : d_user_pvt_solver->gps_ephemeris_map)
{
d_rtcm_printer->Print_Rtcm_MT1019(gps_eph_iter.second);
}
}
if (d_rtcm_MT1045_rate_ms != 0)
{
for (const auto& gal_eph_iter : d_user_pvt_solver->galileo_ephemeris_map)
{
d_rtcm_printer->Print_Rtcm_MT1045(gal_eph_iter.second);
}
}
if (d_rtcm_MSM_rate_ms != 0)
{
auto gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin();
auto gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin();
int gps_channel = 0;
int gal_channel = 0;
for (const auto& gnss_observables_iter : d_gnss_observables_map)
{
const std::string system(gnss_observables_iter.second.System, 1);
if (gps_channel == 0)
{
if (system == "G")
{
// This is a channel with valid GPS signal
gps_eph_iter = d_user_pvt_solver->gps_ephemeris_map.find(gnss_observables_iter.second.PRN);
if (gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend())
{
gps_channel = 1;
}
}
}
if (gal_channel == 0)
{
if (system == "E")
{
gal_eph_iter = d_user_pvt_solver->galileo_ephemeris_map.find(gnss_observables_iter.second.PRN);
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
gal_channel = 1;
}
}
}
}
if (gps_eph_iter != d_user_pvt_solver->gps_ephemeris_map.cend())
{
d_rtcm_printer->Print_Rtcm_MSM(7, gps_eph_iter->second, {}, {}, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
}
if (gal_eph_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())
{
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_eph_iter->second, {}, d_rx_time, d_gnss_observables_map, d_enable_rx_clock_correction, 0, 0, false, false);
}
}
d_rtcm_writing_started = true;
break;
default:
break;
}

View File

@@ -190,6 +190,7 @@ private:
evSBAS_1C,
evGAL_1B,
evGAL_5X,
evGAL_E6,
evGAL_7X,
evGLO_1G,
evGLO_2G,

View File

@@ -24,6 +24,7 @@ set(ACQ_ADAPTER_SOURCES
galileo_e5a_noncoherent_iq_acquisition_caf.cc
galileo_e5a_pcps_acquisition.cc
galileo_e5b_pcps_acquisition.cc
galileo_e6_pcps_acquisition.cc
glonass_l1_ca_pcps_acquisition.cc
glonass_l2_ca_pcps_acquisition.cc
beidou_b1i_pcps_acquisition.cc
@@ -46,6 +47,7 @@ set(ACQ_ADAPTER_HEADERS
galileo_e5a_noncoherent_iq_acquisition_caf.h
galileo_e5a_pcps_acquisition.h
galileo_e5b_pcps_acquisition.h
galileo_e6_pcps_acquisition.h
glonass_l1_ca_pcps_acquisition.h
glonass_l2_ca_pcps_acquisition.h
beidou_b1i_pcps_acquisition.h

View File

@@ -0,0 +1,253 @@
/*!
* \file galileo_e6_pcps_acquisition.cc
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
* Galileo E6 B/C Signals
* \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#include "galileo_e6_pcps_acquisition.h"
#include "Galileo_E6.h"
#include "acq_conf.h"
#include "configuration_interface.h"
#include "galileo_e6_signal_processing.h"
#include "gnss_sdr_flags.h"
#include <glog/logging.h>
#include <algorithm>
#if HAS_STD_SPAN
#include <span>
namespace own = std;
#else
#include <gsl/gsl>
namespace own = gsl;
#endif
GalileoE6PcpsAcquisition::GalileoE6PcpsAcquisition(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams) : role_(role),
in_streams_(in_streams),
out_streams_(out_streams)
{
configuration_ = configuration;
acq_parameters_.ms_per_code = 1;
acq_parameters_.SetFromConfiguration(configuration_, role, GALILEO_E6_B_CODE_CHIP_RATE_CPS, GALILEO_E6_OPT_ACQ_FS_SPS);
DLOG(INFO) << "role " << role;
if (FLAGS_doppler_max != 0)
{
acq_parameters_.doppler_max = FLAGS_doppler_max;
}
doppler_max_ = acq_parameters_.doppler_max;
doppler_step_ = static_cast<unsigned int>(acq_parameters_.doppler_step);
item_type_ = acq_parameters_.item_type;
item_size_ = acq_parameters_.it_size;
fs_in_ = acq_parameters_.fs_in;
code_length_ = static_cast<unsigned int>(std::floor(static_cast<double>(acq_parameters_.resampled_fs) / (GALILEO_E6_B_CODE_CHIP_RATE_CPS / GALILEO_E6_B_CODE_LENGTH_CHIPS)));
vector_length_ = static_cast<unsigned int>(std::floor(acq_parameters_.sampled_ms * acq_parameters_.samples_per_ms) * (acq_parameters_.bit_transition_flag ? 2.0 : 1.0));
code_ = std::vector<std::complex<float>>(vector_length_);
sampled_ms_ = acq_parameters_.sampled_ms;
acquisition_ = pcps_make_acquisition(acq_parameters_);
DLOG(INFO) << "acquisition(" << acquisition_->unique_id() << ")";
if (item_type_ == "cbyte")
{
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
float_to_complex_ = gr::blocks::float_to_complex::make();
}
channel_ = 0;
threshold_ = 0.0;
doppler_center_ = 0;
gnss_synchro_ = nullptr;
if (in_streams_ > 1)
{
LOG(ERROR) << "This implementation only supports one input stream";
}
if (out_streams_ > 0)
{
LOG(ERROR) << "This implementation does not provide an output stream";
}
}
void GalileoE6PcpsAcquisition::stop_acquisition()
{
acquisition_->set_active(false);
}
void GalileoE6PcpsAcquisition::set_threshold(float threshold)
{
threshold_ = threshold;
acquisition_->set_threshold(threshold_);
}
void GalileoE6PcpsAcquisition::set_doppler_max(unsigned int doppler_max)
{
doppler_max_ = doppler_max;
acquisition_->set_doppler_max(doppler_max_);
}
void GalileoE6PcpsAcquisition::set_doppler_step(unsigned int doppler_step)
{
doppler_step_ = doppler_step;
acquisition_->set_doppler_step(doppler_step_);
}
void GalileoE6PcpsAcquisition::set_doppler_center(int doppler_center)
{
doppler_center_ = doppler_center;
acquisition_->set_doppler_center(doppler_center_);
}
void GalileoE6PcpsAcquisition::set_gnss_synchro(Gnss_Synchro* gnss_synchro)
{
gnss_synchro_ = gnss_synchro;
acquisition_->set_gnss_synchro(gnss_synchro_);
}
signed int GalileoE6PcpsAcquisition::mag()
{
return acquisition_->mag();
}
void GalileoE6PcpsAcquisition::init()
{
acquisition_->init();
}
void GalileoE6PcpsAcquisition::set_local_code()
{
std::vector<std::complex<float>> code(code_length_);
if (acq_parameters_.use_automatic_resampler)
{
galileo_e6_b_code_gen_complex_sampled(code,
gnss_synchro_->PRN, acq_parameters_.resampled_fs, 0);
}
else
{
galileo_e6_b_code_gen_complex_sampled(code,
gnss_synchro_->PRN, fs_in_, 0);
}
own::span<gr_complex> code__span(code_.data(), vector_length_);
for (unsigned int i = 0; i < sampled_ms_; i++)
{
std::copy_n(code.data(), code_length_, code__span.subspan(i * code_length_, code_length_).data());
}
acquisition_->set_local_code(code_.data());
}
void GalileoE6PcpsAcquisition::reset()
{
acquisition_->set_active(true);
}
void GalileoE6PcpsAcquisition::set_state(int state)
{
acquisition_->set_state(state);
}
void GalileoE6PcpsAcquisition::connect(gr::top_block_sptr top_block)
{
if (item_type_ == "gr_complex" || item_type_ == "cshort")
{
// nothing to connect
}
else if (item_type_ == "cbyte")
{
// Since a byte-based acq implementation is not available,
// we just convert cshorts to gr_complex
top_block->connect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->connect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->connect(float_to_complex_, 0, acquisition_, 0);
}
else
{
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
}
void GalileoE6PcpsAcquisition::disconnect(gr::top_block_sptr top_block)
{
if (item_type_ == "gr_complex" || item_type_ == "cshort")
{
// nothing to disconnect
}
else if (item_type_ == "cbyte")
{
top_block->disconnect(cbyte_to_float_x2_, 0, float_to_complex_, 0);
top_block->disconnect(cbyte_to_float_x2_, 1, float_to_complex_, 1);
top_block->disconnect(float_to_complex_, 0, acquisition_, 0);
}
else
{
LOG(WARNING) << item_type_ << " unknown acquisition item type";
}
}
gr::basic_block_sptr GalileoE6PcpsAcquisition::get_left_block()
{
if (item_type_ == "gr_complex" || item_type_ == "cshort")
{
return acquisition_;
}
if (item_type_ == "cbyte")
{
return cbyte_to_float_x2_;
}
LOG(WARNING) << item_type_ << " unknown acquisition item type";
return nullptr;
}
gr::basic_block_sptr GalileoE6PcpsAcquisition::get_right_block()
{
return acquisition_;
}
void GalileoE6PcpsAcquisition::set_resampler_latency(uint32_t latency_samples)
{
acquisition_->set_resampler_latency(latency_samples);
}

View File

@@ -0,0 +1,189 @@
/*!
* \file galileo_e6_pcps_acquisition.h
* \brief Adapts a PCPS acquisition block to an AcquisitionInterface for
* Galileo E6 B/C Signals
* \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_GALILEO_E6_PCPS_ACQUISITION_H
#define GNSS_SDR_GALILEO_E6_PCPS_ACQUISITION_H
#include "acq_conf.h"
#include "channel_fsm.h"
#include "complex_byte_to_float_x2.h"
#include "gnss_synchro.h"
#include "pcps_acquisition.h"
#include <gnuradio/blocks/float_to_complex.h>
#include <memory>
#include <string>
#include <vector>
/** \addtogroup Acquisition
* \{ */
/** \addtogroup Acq_adapters
* \{ */
class ConfigurationInterface;
/*!
* \brief This class adapts a PCPS acquisition block to an
* AcquisitionInterface for Galileo E6 Signals
*/
class GalileoE6PcpsAcquisition : public AcquisitionInterface
{
public:
GalileoE6PcpsAcquisition(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
~GalileoE6PcpsAcquisition() = default;
inline std::string role() override
{
return role_;
}
/*!
* \brief Returns "Galileo_E6_PCPS_Acquisition"
*/
inline std::string implementation() override
{
return "Galileo_E6_PCPS_Acquisition";
}
size_t item_size() override
{
return item_size_;
}
void connect(gr::top_block_sptr top_block) override;
void disconnect(gr::top_block_sptr top_block) override;
gr::basic_block_sptr get_left_block() override;
gr::basic_block_sptr get_right_block() override;
/*!
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
* to efficiently exchange synchronization data between acquisition and
* tracking blocks
*/
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
/*!
* \brief Set acquisition channel unique ID
*/
inline void set_channel(unsigned int channel) override
{
channel_ = channel;
acquisition_->set_channel(channel_);
}
/*!
* \brief Set channel fsm associated to this acquisition instance
*/
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
{
channel_fsm_ = channel_fsm;
acquisition_->set_channel_fsm(channel_fsm);
}
/*!
* \brief Set statistics threshold of PCPS algorithm
*/
void set_threshold(float threshold) override;
/*!
* \brief Set maximum Doppler off grid search
*/
void set_doppler_max(unsigned int doppler_max) override;
/*!
* \brief Set Doppler steps for the grid search
*/
void set_doppler_step(unsigned int doppler_step) override;
/*!
* \brief Set Doppler center for the grid search
*/
void set_doppler_center(int doppler_center) override;
/*!
* \brief Initializes acquisition algorithm.
*/
void init() override;
/*!
* \brief Sets local code for Galileo E1 PCPS acquisition algorithm.
*/
void set_local_code() override;
/*!
* \brief Returns the maximum peak of grid search
*/
signed int mag() override;
/*!
* \brief Restart acquisition algorithm
*/
void reset() override;
/*!
* \brief If state = 1, it forces the block to start acquiring from the first sample
*/
void set_state(int state) override;
/*!
* \brief Stop running acquisition
*/
void stop_acquisition() override;
/*!
* \brief Sets the resampler latency to account it in the acquisition code delay estimation
*/
void set_resampler_latency(uint32_t latency_samples) override;
private:
pcps_acquisition_sptr acquisition_;
std::vector<std::complex<float>> code_;
std::weak_ptr<ChannelFsm> channel_fsm_;
gr::blocks::float_to_complex::sptr float_to_complex_;
complex_byte_to_float_x2_sptr cbyte_to_float_x2_;
Gnss_Synchro* gnss_synchro_;
const ConfigurationInterface* configuration_;
Acq_Conf acq_parameters_;
std::string item_type_;
std::string dump_filename_;
std::string role_;
int64_t fs_in_;
size_t item_size_;
float threshold_;
int doppler_center_;
unsigned int vector_length_;
unsigned int code_length_;
unsigned int channel_;
unsigned int doppler_max_;
unsigned int doppler_step_;
unsigned int sampled_ms_;
unsigned int in_streams_;
unsigned int out_streams_;
};
/** \} */
/** \} */
#endif // GNSS_SDR_GALILEO_E6_PCPS_ACQUISITION_H

View File

@@ -42,8 +42,8 @@
#define CL_SILENCE_DEPRECATION
#include "channel_fsm.h"
#include "gnss_synchro.h"
#include "gnss_block_interface.h"
#include "gnss_synchro.h"
#include "opencl/fft_internal.h"
#include <gnuradio/block.h>
#include <gnuradio/fft/fft.h>

View File

@@ -19,6 +19,7 @@ set(GNSS_SPLIBS_SOURCES
glonass_l2_signal_processing.cc
pass_through.cc
galileo_e5_signal_processing.cc
galileo_e6_signal_processing.cc
beidou_b1i_signal_processing.cc
beidou_b3i_signal_processing.cc
complex_byte_to_float_x2.cc
@@ -44,6 +45,7 @@ set(GNSS_SPLIBS_HEADERS
glonass_l2_signal_processing.h
pass_through.h
galileo_e5_signal_processing.h
galileo_e6_signal_processing.h
beidou_b1i_signal_processing.h
beidou_b3i_signal_processing.h
complex_byte_to_float_x2.h

View File

@@ -0,0 +1,253 @@
/*!
* \file galileo_e6_signal_processing.cc
* \brief This library implements various functions for Galileo E6 signals such
* as replica code generation
* \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es
*
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#include "galileo_e6_signal_processing.h"
#include "Galileo_E6.h"
#include "gnss_signal_processing.h"
#include <iostream>
#include <vector>
void galileo_e6_b_code_gen_complex_primary(own::span<std::complex<float>> _dest,
int32_t _prn)
{
const uint32_t prn = _prn - 1;
uint32_t index = 0;
std::array<int32_t, 4> a{};
if ((_prn < 1) || (_prn > 50))
{
return;
}
for (size_t i = 0; i < GALILEO_E6_B_PRIMARY_CODE_STR_LENGTH - 1; i++)
{
hex_to_binary_converter(a, GALILEO_E6_B_PRIMARY_CODE[prn][i]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(static_cast<float>(a[2]), 0.0);
_dest[index + 3] = std::complex<float>(static_cast<float>(a[3]), 0.0);
index = index + 4;
}
// last bit is filled up with a zero
hex_to_binary_converter(a, GALILEO_E6_B_PRIMARY_CODE[prn][GALILEO_E6_B_PRIMARY_CODE_STR_LENGTH - 1]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(static_cast<float>(a[2]), 0.0);
}
void galileo_e6_b_code_gen_float_primary(own::span<float> _dest, int32_t _prn)
{
const uint32_t prn = _prn - 1;
uint32_t index = 0;
std::array<int32_t, 4> a{};
if ((_prn < 1) || (_prn > 50))
{
return;
}
for (size_t i = 0; i < GALILEO_E6_B_PRIMARY_CODE_STR_LENGTH - 1; i++)
{
hex_to_binary_converter(a, GALILEO_E6_B_PRIMARY_CODE[prn][i]);
_dest[index] = static_cast<float>(a[0]);
_dest[index + 1] = static_cast<float>(a[1]);
_dest[index + 2] = static_cast<float>(a[2]);
_dest[index + 3] = static_cast<float>(a[3]);
index = index + 4;
}
// last bit is filled up with a zero
hex_to_binary_converter(a, GALILEO_E6_B_PRIMARY_CODE[prn][GALILEO_E6_B_PRIMARY_CODE_STR_LENGTH - 1]);
_dest[index] = static_cast<float>(a[0]);
_dest[index + 1] = static_cast<float>(a[1]);
_dest[index + 2] = static_cast<float>(a[2]);
}
void galileo_e6_b_code_gen_complex_sampled(own::span<std::complex<float>> _dest,
uint32_t _prn,
int32_t _fs,
uint32_t _chip_shift)
{
constexpr uint32_t _codeLength = GALILEO_E6_B_CODE_LENGTH_CHIPS;
constexpr int32_t _codeFreqBasis = GALILEO_E6_B_CODE_CHIP_RATE_CPS;
const auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / static_cast<double>(_codeLength)));
const uint32_t delay = ((_codeLength - _chip_shift) % _codeLength) * _samplesPerCode / _codeLength;
std::vector<std::complex<float>> _code(_codeLength);
galileo_e6_b_code_gen_complex_primary(_code, _prn);
if (_fs != _codeFreqBasis)
{
std::vector<std::complex<float>> _resampled_signal(_samplesPerCode);
resampler(_code, _resampled_signal, _codeFreqBasis, _fs); // resamples code to fs
_code = std::move(_resampled_signal);
}
for (uint32_t i = 0; i < _samplesPerCode; i++)
{
_dest[(i + delay) % _samplesPerCode] = _code[i];
}
}
void galileo_e6_c_code_gen_complex_primary(own::span<std::complex<float>> _dest,
int32_t _prn)
{
const uint32_t prn = _prn - 1;
uint32_t index = 0;
std::array<int32_t, 4> a{};
if ((_prn < 1) || (_prn > 50))
{
return;
}
for (size_t i = 0; i < GALILEO_E6_C_PRIMARY_CODE_STR_LENGTH - 1; i++)
{
hex_to_binary_converter(a, GALILEO_E6_C_PRIMARY_CODE[prn][i]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(static_cast<float>(a[2]), 0.0);
_dest[index + 3] = std::complex<float>(static_cast<float>(a[3]), 0.0);
index = index + 4;
}
// last bit is filled up with a zero
hex_to_binary_converter(a, GALILEO_E6_C_PRIMARY_CODE[prn][GALILEO_E6_C_PRIMARY_CODE_STR_LENGTH - 1]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(static_cast<float>(a[2]), 0.0);
}
void galileo_e6_c_code_gen_float_primary(own::span<float> _dest, int32_t _prn)
{
const uint32_t prn = _prn - 1;
uint32_t index = 0;
std::array<int32_t, 4> a{};
if ((_prn < 1) || (_prn > 50))
{
return;
}
for (size_t i = 0; i < GALILEO_E6_C_PRIMARY_CODE_STR_LENGTH - 1; i++)
{
hex_to_binary_converter(a, GALILEO_E6_C_PRIMARY_CODE[prn][i]);
_dest[index] = static_cast<float>(a[0]);
_dest[index + 1] = static_cast<float>(a[1]);
_dest[index + 2] = static_cast<float>(a[2]);
_dest[index + 3] = static_cast<float>(a[3]);
index = index + 4;
}
// last bit is filled up with a zero
hex_to_binary_converter(a, GALILEO_E6_C_PRIMARY_CODE[prn][GALILEO_E6_C_PRIMARY_CODE_STR_LENGTH - 1]);
_dest[index] = static_cast<float>(a[0]);
_dest[index + 1] = static_cast<float>(a[1]);
_dest[index + 2] = static_cast<float>(a[2]);
}
void galileo_e6_c_code_gen_complex_sampled(own::span<std::complex<float>> _dest,
uint32_t _prn,
int32_t _fs,
uint32_t _chip_shift)
{
constexpr uint32_t _codeLength = GALILEO_E6_C_CODE_LENGTH_CHIPS;
constexpr int32_t _codeFreqBasis = GALILEO_E6_C_CODE_CHIP_RATE_CPS;
const auto _samplesPerCode = static_cast<uint32_t>(static_cast<double>(_fs) / (static_cast<double>(_codeFreqBasis) / static_cast<double>(_codeLength)));
const uint32_t delay = ((_codeLength - _chip_shift) % _codeLength) * _samplesPerCode / _codeLength;
std::vector<std::complex<float>> _code(_codeLength);
galileo_e6_c_code_gen_complex_primary(_code, _prn);
if (_fs != _codeFreqBasis)
{
std::vector<std::complex<float>> _resampled_signal(_samplesPerCode);
resampler(_code, _resampled_signal, _codeFreqBasis, _fs); // resamples code to fs
_code = std::move(_resampled_signal);
}
for (uint32_t i = 0; i < _samplesPerCode; i++)
{
_dest[(i + delay) % _samplesPerCode] = _code[i];
}
}
void galileo_e6_c_secondary_code_gen_complex(own::span<std::complex<float>> _dest,
int32_t _prn)
{
const uint32_t prn = _prn - 1;
uint32_t index = 0;
std::array<int32_t, 4> a{};
if ((_prn < 1) || (_prn > 50))
{
return;
}
for (size_t i = 0; i < GALILEO_E6_C_SECONDARY_CODE_STR_LENGTH; i++)
{
hex_to_binary_converter(a, GALILEO_E6_C_SECONDARY_CODE[prn][i]);
_dest[index] = std::complex<float>(static_cast<float>(a[0]), 0.0);
_dest[index + 1] = std::complex<float>(static_cast<float>(a[1]), 0.0);
_dest[index + 2] = std::complex<float>(static_cast<float>(a[2]), 0.0);
_dest[index + 3] = std::complex<float>(static_cast<float>(a[3]), 0.0);
index = index + 4;
}
}
void galileo_e6_c_secondary_code_gen_float(own::span<float> _dest,
int32_t _prn)
{
const uint32_t prn = _prn - 1;
uint32_t index = 0;
std::array<int32_t, 4> a{};
if ((_prn < 1) || (_prn > 50))
{
return;
}
for (size_t i = 0; i < GALILEO_E6_C_SECONDARY_CODE_STR_LENGTH; i++)
{
hex_to_binary_converter(a, GALILEO_E6_C_SECONDARY_CODE[prn][i]);
_dest[index] = static_cast<float>(a[0]);
_dest[index + 1] = static_cast<float>(a[1]);
_dest[index + 2] = static_cast<float>(a[2]);
_dest[index + 3] = static_cast<float>(a[3]);
index = index + 4;
}
}
std::string galileo_e6_c_secondary_code(int32_t _prn)
{
std::string dest(static_cast<size_t>(GALILEO_E6_C_SECONDARY_CODE_LENGTH_CHIPS), '0');
const uint32_t prn = _prn - 1;
uint32_t index = 0;
for (size_t i = 0; i < GALILEO_E6_C_SECONDARY_CODE_STR_LENGTH; i++)
{
std::string aux = hex_to_binary_string(GALILEO_E6_C_SECONDARY_CODE[prn][i]);
dest[index] = aux[0];
dest[index + 1] = aux[1];
dest[index + 2] = aux[2];
dest[index + 3] = aux[3];
index = index + 4;
}
return dest;
}

View File

@@ -0,0 +1,111 @@
/*!
* \file galileo_e6_signal_processing.h
* \brief This library implements various functions for Galileo E6 signals such
* as replica code generation
* \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es
*
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_GALILEO_E6_SIGNAL_PROCESSING_H
#define GNSS_SDR_GALILEO_E6_SIGNAL_PROCESSING_H
#include <array>
#include <complex>
#include <cstdint>
#include <string>
#if HAS_STD_SPAN
#include <span>
namespace own = std;
#else
#include <gsl/gsl>
namespace own = gsl;
#endif
/** \addtogroup Algorithms_Library
* \{ */
/** \addtogroup Algorithm_libs algorithms_libs
* \{ */
/*!
* \brief Generates Galileo E6B code at 1 sample/chip
*/
void galileo_e6_b_code_gen_complex_primary(own::span<std::complex<float>> _dest,
int32_t _prn);
/*!
* \brief Generates Galileo E6B code at 1 sample/chip
*/
void galileo_e6_b_code_gen_float_primary(own::span<float> _dest, int32_t _prn);
/*!
* \brief Generates Galileo E6B complex code, shifted to the desired chip and
* sampled at a frequency fs
*/
void galileo_e6_b_code_gen_complex_sampled(own::span<std::complex<float>> _dest,
uint32_t _prn,
int32_t _fs,
uint32_t _chip_shift);
/*!
* \brief Generates Galileo E6C codes at 1 sample/chip
*/
void galileo_e6_c_code_gen_complex_primary(own::span<std::complex<float>> _dest,
int32_t _prn);
/*!
* \brief Generates Galileo E6C codes at 1 sample/chip
*/
void galileo_e6_c_code_gen_float_primary(own::span<float> _dest, int32_t _prn);
/*!
* \brief Generates Galileo E6C complex codes, shifted to the desired chip and
* sampled at a frequency fs
*/
void galileo_e6_c_code_gen_complex_sampled(own::span<std::complex<float>> _dest,
uint32_t _prn,
int32_t _fs,
uint32_t _chip_shift);
/*!
* \brief Generates Galileo E6C secondary codes at 1 sample/chip
*/
void galileo_e6_c_secondary_code_gen_complex(own::span<std::complex<float>> _dest,
int32_t _prn);
/*!
* \brief Generates Galileo E6C secondary codes at 1 sample/chip
*/
void galileo_e6_c_secondary_code_gen_float(own::span<float> _dest,
int32_t _prn);
/*!
* \brief Generates a string with Galileo E6C secondary codes at 1 sample/chip
*/
std::string galileo_e6_c_secondary_code(int32_t _prn);
/** \} */
/** \} */
#endif // GNSS_SDR_GALILEO_E6_SIGNAL_PROCESSING_H

View File

@@ -149,6 +149,114 @@ void hex_to_binary_converter(own::span<int32_t> _dest, char _from)
}
std::string hex_to_binary_string(char _from)
{
std::string _dest("0000");
switch (_from)
{
case '0':
_dest[0] = '0';
_dest[1] = '0';
_dest[2] = '0';
_dest[3] = '0';
break;
case '1':
_dest[0] = '0';
_dest[1] = '0';
_dest[2] = '0';
_dest[3] = '1';
break;
case '2':
_dest[0] = '0';
_dest[1] = '0';
_dest[2] = '1';
_dest[3] = '0';
break;
case '3':
_dest[0] = '0';
_dest[1] = '0';
_dest[2] = '1';
_dest[3] = '1';
break;
case '4':
_dest[0] = '0';
_dest[1] = '1';
_dest[2] = '0';
_dest[3] = '0';
break;
case '5':
_dest[0] = '0';
_dest[1] = '1';
_dest[2] = '0';
_dest[3] = '1';
break;
case '6':
_dest[0] = '0';
_dest[1] = '1';
_dest[2] = '1';
_dest[3] = '0';
break;
case '7':
_dest[0] = '0';
_dest[1] = '1';
_dest[2] = '1';
_dest[3] = '1';
break;
case '8':
_dest[0] = '1';
_dest[1] = '0';
_dest[2] = '0';
_dest[3] = '0';
break;
case '9':
_dest[0] = '1';
_dest[1] = '0';
_dest[2] = '0';
_dest[3] = '1';
break;
case 'A':
_dest[0] = '1';
_dest[1] = '0';
_dest[2] = '1';
_dest[3] = '0';
break;
case 'B':
_dest[0] = '1';
_dest[1] = '0';
_dest[2] = '1';
_dest[3] = '1';
break;
case 'C':
_dest[0] = '1';
_dest[1] = '1';
_dest[2] = '0';
_dest[3] = '0';
break;
case 'D':
_dest[0] = '1';
_dest[1] = '1';
_dest[2] = '0';
_dest[3] = '1';
break;
case 'E':
_dest[0] = '1';
_dest[1] = '1';
_dest[2] = '1';
_dest[3] = '0';
break;
case 'F':
_dest[0] = '1';
_dest[1] = '1';
_dest[2] = '1';
_dest[3] = '1';
break;
default:
break;
}
return _dest;
}
void resampler(const own::span<float> _from, own::span<float> _dest, float _fs_in,
float _fs_out)
{

View File

@@ -25,6 +25,7 @@
#include <complex>
#include <cstdint>
#include <string>
#if HAS_STD_SPAN
#include <span>
namespace own = std;
@@ -58,6 +59,13 @@ void complex_exp_gen_conj(own::span<std::complex<float>> _dest, double _f, doubl
*/
void hex_to_binary_converter(own::span<int32_t> _dest, char _from);
/*!
* \brief This function makes a conversion from hex (the input is a char)
* to binary (the output is a string of 4 char with 0 or 1 values).
*
*/
std::string hex_to_binary_string(char _from);
/*!
* \brief This function resamples a sequence of float values.
*

View File

@@ -155,6 +155,7 @@ hybrid_observables_gs::hybrid_observables_gs(const Obs_Conf &conf_) : gr::block(
d_mapStringValues["L5"] = evGPS_L5;
d_mapStringValues["1B"] = evGAL_1B;
d_mapStringValues["5X"] = evGAL_5X;
d_mapStringValues["E6"] = evGAL_E6;
d_mapStringValues["7X"] = evGAL_7X;
d_mapStringValues["1G"] = evGLO_1G;
d_mapStringValues["2G"] = evGLO_2G;
@@ -572,6 +573,9 @@ void hybrid_observables_gs::smooth_pseudoranges(std::vector<Gnss_Synchro> &data)
case evGAL_5X:
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ5;
break;
case evGAL_E6:
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ6;
break;
case evGAL_7X:
wavelength_m = SPEED_OF_LIGHT_M_S / FREQ7;
break;

View File

@@ -90,6 +90,7 @@ private:
evSBAS_1C,
evGAL_1B,
evGAL_5X,
evGAL_E6,
evGAL_7X,
evGLO_1G,
evGLO_2G,

View File

@@ -26,6 +26,7 @@
#include "Galileo_E1.h"
#include "Galileo_E5a.h"
#include "Galileo_E5b.h"
#include "Galileo_E6.h"
#include "configuration_interface.h"
#include <glog/logging.h>
#include <cstdint>
@@ -93,6 +94,10 @@ SignalGenerator::SignalGenerator(const ConfigurationInterface* configuration,
{
vector_length = static_cast<unsigned int>(round(static_cast<float>(fs_in) / (GALILEO_E5B_CODE_CHIP_RATE_CPS / GALILEO_E5B_CODE_LENGTH_CHIPS)));
}
else if (signal1[0].at(1) == '6')
{
vector_length = static_cast<unsigned int>(round(static_cast<float>(fs_in) / (GALILEO_E6_C_CODE_CHIP_RATE_CPS / GALILEO_E6_C_CODE_LENGTH_CHIPS)) * GALILEO_E6_C_SECONDARY_CODE_LENGTH_CHIPS);
}
else
{
vector_length = static_cast<unsigned int>(round(static_cast<float>(fs_in) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)) * GALILEO_E1_C_SECONDARY_CODE_LENGTH);

View File

@@ -23,8 +23,10 @@
#include "Galileo_E1.h"
#include "Galileo_E5a.h"
#include "Galileo_E5b.h"
#include "Galileo_E6.h"
#include "galileo_e1_signal_processing.h"
#include "galileo_e5_signal_processing.h"
#include "galileo_e6_signal_processing.h"
#include "glonass_l1_signal_processing.h"
#include "gps_sdr_signal_processing.h"
#include <gnuradio/io_signature.h>
@@ -142,6 +144,13 @@ void signal_generator_c::init()
data_bit_duration_ms_.push_back(1e3 / GALILEO_E5B_SYMBOL_RATE_BPS);
}
else if (signal_[sat].at(1) == '6')
{
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GALILEO_E6_B_CODE_CHIP_RATE_CPS / GALILEO_E6_B_CODE_LENGTH_CHIPS)));
num_of_codes_per_vector_.push_back(static_cast<int>(GALILEO_E6_C_SECONDARY_CODE_LENGTH_CHIPS));
data_bit_duration_ms_.push_back(1);
}
else
{
samples_per_code_.push_back(round(static_cast<float>(fs_in_) / (GALILEO_E1_CODE_CHIP_RATE_CPS / GALILEO_E1_B_CODE_LENGTH_CHIPS)));
@@ -239,6 +248,37 @@ void signal_generator_c::generate_codes()
}
}
}
else if (signal_[sat].at(1) == '6')
{
// Generate one code-period of E&B signal
galileo_e6_b_code_gen_complex_sampled(code, PRN_[sat], fs_in_,
static_cast<int>(GALILEO_E6_B_CODE_LENGTH_CHIPS) - delay_chips_[sat]);
// Obtain the desired CN0 assuming that Pn = 1.
if (noise_flag_)
{
for (unsigned int i = 0; i < samples_per_code_[sat]; i++)
{
code[i] *= std::sqrt(std::pow(10.0F, CN0_dB_[sat] / 10.0F) / BW_BB_ / 2.0F);
}
}
// Concatenate "num_of_codes_per_vector_" codes
for (unsigned int i = 0; i < num_of_codes_per_vector_[sat]; i++)
{
memcpy(&(sampled_code_data_[sat][i * samples_per_code_[sat]]),
code.data(), sizeof(gr_complex) * samples_per_code_[sat]);
}
// Generate E6C signal (100 code-periods, with secondary code)
galileo_e6_c_code_gen_complex_sampled(sampled_code_pilot_[sat], PRN_[sat], fs_in_,
static_cast<int>(GALILEO_E6_C_CODE_LENGTH_CHIPS) - delay_chips_[sat]);
// Obtain the desired CN0 assuming that Pn = 1.
if (noise_flag_)
{
for (unsigned int i = 0; i < vector_length_; i++)
{
sampled_code_pilot_[sat][i] *= sqrt(std::pow(10.0F, CN0_dB_[sat] / 10.0F) / BW_BB_ / 2.0F);
}
}
}
else
{
// Generate one code-period of E1B signal
@@ -442,6 +482,33 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
out_idx++;
}
}
else if (signal_[sat].at(1) == '6')
{
// EACH WORK outputs 1 modulated primary code
int codelen = static_cast<int>(GALILEO_E6_C_CODE_LENGTH_CHIPS);
unsigned int delay_samples = (delay_chips_[sat] % codelen) * samples_per_code_[sat] / codelen;
for (i = 0; i < num_of_codes_per_vector_[sat]; i++)
{
for (k = 0; k < delay_samples; k++)
{
out[out_idx] += (sampled_code_data_[sat][out_idx] * current_data_bits_[sat] - sampled_code_pilot_[sat][out_idx]) * complex_phase_[out_idx];
out_idx++;
}
if (ms_counter_[sat] == 0 && data_flag_)
{
// New random data bit
current_data_bits_[sat] = gr_complex((uniform_dist(e1) % 2) == 0 ? 1 : -1, 0);
}
for (k = delay_samples; k < samples_per_code_[sat]; k++)
{
out[out_idx] += (sampled_code_data_[sat][out_idx] * current_data_bits_[sat] - sampled_code_pilot_[sat][out_idx]) * complex_phase_[out_idx];
out_idx++;
}
ms_counter_[sat] = (ms_counter_[sat] + 1) % data_bit_duration_ms_[sat];
}
}
else
{
auto delay_samples = static_cast<unsigned int>((delay_chips_[sat] % static_cast<int>(GALILEO_E1_B_CODE_LENGTH_CHIPS)) * samples_per_code_[sat] / GALILEO_E1_B_CODE_LENGTH_CHIPS);

View File

@@ -16,6 +16,7 @@ set(TELEMETRY_DECODER_ADAPTER_SOURCES
sbas_l1_telemetry_decoder.cc
galileo_e5a_telemetry_decoder.cc
galileo_e5b_telemetry_decoder.cc
galileo_e6_telemetry_decoder.cc
glonass_l1_ca_telemetry_decoder.cc
glonass_l2_ca_telemetry_decoder.cc
beidou_b1i_telemetry_decoder.cc
@@ -30,6 +31,7 @@ set(TELEMETRY_DECODER_ADAPTER_HEADERS
sbas_l1_telemetry_decoder.h
galileo_e5a_telemetry_decoder.h
galileo_e5b_telemetry_decoder.h
galileo_e6_telemetry_decoder.h
glonass_l1_ca_telemetry_decoder.h
glonass_l2_ca_telemetry_decoder.h
beidou_b1i_telemetry_decoder.h

View File

@@ -0,0 +1,93 @@
/*!
* \file galileo_e6_telemetry_decoder.cc
* \brief Interface of an adapter of a GALILEO E6 CNAV data decoder block
* to a TelemetryDecoderInterface
* \author Carles Fernandez-Prades, 2020 cfernandez@cttc.es
*
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#include "galileo_e6_telemetry_decoder.h"
#include "configuration_interface.h"
#include <glog/logging.h>
GalileoE6TelemetryDecoder::GalileoE6TelemetryDecoder(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams) : role_(role),
in_streams_(in_streams),
out_streams_(out_streams)
{
const std::string default_dump_filename("./navigation.dat");
DLOG(INFO) << "role " << role;
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
// make telemetry decoder object
telemetry_decoder_ = galileo_make_telemetry_decoder_gs(satellite_, 3, dump_); // unified galileo decoder set to CNAV (frame_type=3)
DLOG(INFO) << "telemetry_decoder(" << telemetry_decoder_->unique_id() << ")";
channel_ = 0;
if (in_streams_ > 1)
{
LOG(ERROR) << "This implementation only supports one input stream";
}
if (out_streams_ > 1)
{
LOG(ERROR) << "This implementation only supports one output stream";
}
}
void GalileoE6TelemetryDecoder::set_satellite(const Gnss_Satellite& satellite)
{
satellite_ = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
telemetry_decoder_->set_satellite(satellite_);
DLOG(INFO) << "GALILEO TELEMETRY DECODER: satellite set to " << satellite_;
}
void GalileoE6TelemetryDecoder::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 GalileoE6TelemetryDecoder::disconnect(gr::top_block_sptr top_block)
{
if (top_block)
{
/* top_block is not null */
};
// Nothing to disconnect
}
gr::basic_block_sptr GalileoE6TelemetryDecoder::get_left_block()
{
return telemetry_decoder_;
}
gr::basic_block_sptr GalileoE6TelemetryDecoder::get_right_block()
{
return telemetry_decoder_;
}

View File

@@ -0,0 +1,117 @@
/*!
* \file galileo_e6_telemetry_decoder.h
* \brief Interface of an adapter of a GALILEO E6 CNAV data decoder block
* to a TelemetryDecoderInterface
* \author Carles Fernandez-Prades, 2020 cfernandez@cttc.es
*
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_GALILEO_E6_TELEMETRY_DECODER_H
#define GNSS_SDR_GALILEO_E6_TELEMETRY_DECODER_H
#include "galileo_telemetry_decoder_gs.h"
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include "telemetry_decoder_interface.h"
#include <gnuradio/runtime_types.h> // for basic_block_sptr, top_block_sptr
#include <cstddef> // for size_t
#include <string>
/** \addtogroup Telemetry_Decoder
* \{ */
/** \addtogroup Telemetry_Decoder_adapters
* \{ */
class ConfigurationInterface;
/*!
* \brief This class implements a NAV data decoder for Galileo CNAV frames in E6 radio link
*/
class GalileoE6TelemetryDecoder : public TelemetryDecoderInterface
{
public:
GalileoE6TelemetryDecoder(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
~GalileoE6TelemetryDecoder() = default;
/*!
* \brief Returns "Galileo_E6_Telemetry_Decoder"
*/
inline std::string implementation() override
{
return "Galileo_E6_Telemetry_Decoder";
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
void set_satellite(const Gnss_Satellite& satellite) override;
inline std::string role() override
{
return role_;
}
inline void set_channel(int channel) override { telemetry_decoder_->set_channel(channel); }
inline void reset() override
{
telemetry_decoder_->reset();
}
inline size_t item_size() override
{
return sizeof(Gnss_Synchro);
}
private:
galileo_telemetry_decoder_gs_sptr telemetry_decoder_;
Gnss_Satellite satellite_;
std::string dump_filename_;
std::string role_;
int channel_;
unsigned int in_streams_;
unsigned int out_streams_;
bool dump_;
};
/** \} */
/** \} */
#endif // GNSS_SDR_GALILEO_E6_TELEMETRY_DECODER_H

View File

@@ -24,6 +24,7 @@
#include "Galileo_E1.h" // for GALILEO_E1_CODE_PERIOD_MS
#include "Galileo_E5a.h" // for GALILEO_E5A_CODE_PERIO...
#include "Galileo_E5b.h" // for GALILEO_E5B_CODE_PERIOD_MS
#include "Galileo_E6.h" // for GALILEO_E6_CODE_PERIOD_MS
#include "convolutional.h"
#include "display.h"
#include "galileo_almanac_helper.h" // for Galileo_Almanac_Helper
@@ -108,6 +109,20 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
d_max_symbols_without_valid_frame = GALILEO_FNAV_SYMBOLS_PER_PAGE * 5; // rise alarm 100 seconds without valid tlm
break;
}
case 3: // CNAV
{
d_PRN_code_period_ms = static_cast<uint32_t>(GALILEO_E6_CODE_PERIOD_MS);
d_bits_per_preamble = 16; // Not available
d_samples_per_preamble = 16; // Not available
d_preamble_period_symbols = 1000; // Not available
d_required_symbols = 1000 + d_samples_per_preamble; // Not available
d_preamble_samples.reserve(d_samples_per_preamble); // Not available
d_frame_length_symbols = d_preamble_period_symbols - d_samples_per_preamble; // Not available
d_codelength = d_preamble_period_symbols - d_samples_per_preamble; // Not available
d_datalength = (d_codelength / d_nn) - d_mm; // Not available
d_max_symbols_without_valid_frame = d_preamble_period_symbols * 10; // Not available
break;
}
default:
d_bits_per_preamble = 0;
d_samples_per_preamble = 0;
@@ -150,6 +165,12 @@ galileo_telemetry_decoder_gs::galileo_telemetry_decoder_gs(
}
break;
}
case 3: // CNAV for E6
{
// TODO
d_preamble_samples[i] = 1;
break;
}
}
}
d_sample_counter = 0ULL;
@@ -421,6 +442,12 @@ void galileo_telemetry_decoder_gs::decode_FNAV_word(float *page_symbols, int32_t
}
void galileo_telemetry_decoder_gs::decode_CNAV_word(float *page_symbols __attribute__((unused)), int32_t frame_length __attribute__((unused)))
{
// TODO
}
void galileo_telemetry_decoder_gs::set_satellite(const Gnss_Satellite &satellite)
{
gr::thread::scoped_lock lock(d_setlock);
@@ -493,6 +520,11 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
d_symbol_history.push_back(current_symbol.Prompt_Q);
break;
}
case 3: // CNAV
{
d_symbol_history.push_back(current_symbol.Prompt_I);
break;
}
default:
{
d_symbol_history.push_back(current_symbol.Prompt_I);
@@ -600,46 +632,33 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
if (d_sample_counter == d_preamble_index + static_cast<uint64_t>(d_preamble_period_symbols))
{
// call the decoder
// NEW Galileo page part is received
// 0. fetch the symbols into an array
if (d_flag_PLL_180_deg_phase_locked == false) // normal PLL lock
{
for (uint32_t i = 0; i < d_frame_length_symbols; i++)
{
d_page_part_symbols[i] = d_symbol_history[i + d_samples_per_preamble]; // because last symbol of the preamble is just received now!
}
}
else // 180 deg. inverted carrier phase PLL lock
{
for (uint32_t i = 0; i < d_frame_length_symbols; i++)
{
d_page_part_symbols[i] = -d_symbol_history[i + d_samples_per_preamble]; // because last symbol of the preamble is just received now!
}
}
switch (d_frame_type)
{
case 1: // INAV
// NEW Galileo page part is received
// 0. fetch the symbols into an array
if (d_flag_PLL_180_deg_phase_locked == false) // normal PLL lock
{
for (uint32_t i = 0; i < d_frame_length_symbols; i++)
{
d_page_part_symbols[i] = d_symbol_history[i + d_samples_per_preamble]; // because last symbol of the preamble is just received now!
}
}
else // 180 deg. inverted carrier phase PLL lock
{
for (uint32_t i = 0; i < d_frame_length_symbols; i++)
{
d_page_part_symbols[i] = -d_symbol_history[i + d_samples_per_preamble]; // because last symbol of the preamble is just received now!
}
}
decode_INAV_word(d_page_part_symbols.data(), d_frame_length_symbols);
break;
case 2: // FNAV
// NEW Galileo page part is received
// 0. fetch the symbols into an array
if (d_flag_PLL_180_deg_phase_locked == false) // normal PLL lock
{
for (uint32_t i = 0; i < d_frame_length_symbols; i++)
{
d_page_part_symbols[i] = d_symbol_history[i + d_samples_per_preamble]; // because last symbol of the preamble is just received now!
}
}
else // 180 deg. inverted carrier phase PLL lock
{
for (uint32_t i = 0; i < d_frame_length_symbols; i++)
{
d_page_part_symbols[i] = -d_symbol_history[i + d_samples_per_preamble]; // because last symbol of the preamble is just received now!
}
}
decode_FNAV_word(d_page_part_symbols.data(), d_frame_length_symbols);
break;
case 3: // CNAV
decode_CNAV_word(d_page_part_symbols.data(), d_frame_length_symbols);
break;
default:
return -1;
break;
@@ -749,6 +768,10 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
break;
}
}
case 3: // CNAV
{
// TODO
}
}
}
else // if there is not a new preamble, we define the TOW of the current symbol
@@ -771,6 +794,11 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
}
break;
}
case 3: // CNAV
{
// TODO
break;
}
}
}
@@ -798,6 +826,11 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
}
break;
}
case 3: // CNAV
{
// TODO
break;
}
}
if (d_inav_nav.is_TOW_set() or d_fnav_nav.is_TOW_set())

View File

@@ -86,6 +86,7 @@ private:
void deinterleaver(int32_t rows, int32_t cols, const float *in, float *out);
void decode_INAV_word(float *page_part_symbols, int32_t frame_length);
void decode_FNAV_word(float *page_symbols, int32_t frame_length);
void decode_CNAV_word(float *page_symbols, int32_t frame_length);
// vars for Viterbi decoder
std::vector<int32_t> d_preamble_samples;

View File

@@ -44,6 +44,7 @@ set(TRACKING_ADAPTER_SOURCES
gps_l1_ca_tcp_connector_tracking.cc
galileo_e5a_dll_pll_tracking.cc
galileo_e5b_dll_pll_tracking.cc
galileo_e6_dll_pll_tracking.cc
gps_l2_m_dll_pll_tracking.cc
glonass_l1_ca_dll_pll_tracking.cc
glonass_l1_ca_dll_pll_c_aid_tracking.cc
@@ -63,6 +64,7 @@ set(TRACKING_ADAPTER_HEADERS
gps_l1_ca_tcp_connector_tracking.h
galileo_e5a_dll_pll_tracking.h
galileo_e5b_dll_pll_tracking.h
galileo_e6_dll_pll_tracking.h
gps_l2_m_dll_pll_tracking.h
glonass_l1_ca_dll_pll_tracking.h
glonass_l1_ca_dll_pll_c_aid_tracking.h

View File

@@ -0,0 +1,140 @@
/*!
* \file galileo_e6_dll_pll_tracking.cc
* \brief Adapts a code DLL + carrier PLL
* tracking block to a TrackingInterface for Galileo E6 signals
* \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es
*
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#include "galileo_e6_dll_pll_tracking.h"
#include "Galileo_E6.h"
#include "configuration_interface.h"
#include "display.h"
#include "dll_pll_conf.h"
#include "gnss_sdr_flags.h"
#include <glog/logging.h>
#include <array>
GalileoE6DllPllTracking::GalileoE6DllPllTracking(
const 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_params = Dll_Pll_Conf();
DLOG(INFO) << "role " << role;
trk_params.SetFromConfiguration(configuration, role);
const auto vector_length = static_cast<int>(std::round(trk_params.fs_in / (GALILEO_E6_B_CODE_CHIP_RATE_CPS / GALILEO_E6_B_CODE_LENGTH_CHIPS)));
trk_params.vector_length = vector_length;
if (trk_params.extend_correlation_symbols < 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E6. extend_correlation_symbols must be bigger than 0. Coherent integration has been set to 1 symbol (1 ms)" << TEXT_RESET << '\n';
}
else if (!trk_params.track_pilot and trk_params.extend_correlation_symbols > 1)
{
trk_params.extend_correlation_symbols = 1;
std::cout << TEXT_RED << "WARNING: Galileo E6. Extended coherent integration is not allowed when tracking the data component. Coherent integration has been set to 1 ms (1 symbol)" << TEXT_RESET << '\n';
}
if ((trk_params.extend_correlation_symbols > 1) and (trk_params.pll_bw_narrow_hz > trk_params.pll_bw_hz or trk_params.dll_bw_narrow_hz > trk_params.dll_bw_hz))
{
std::cout << TEXT_RED << "WARNING: Galileo E5b. PLL or DLL narrow tracking bandwidth is higher than wide tracking one" << TEXT_RESET << '\n';
}
trk_params.system = 'E';
const std::array<char, 3> sig_{'E', '6', '\0'};
std::memcpy(trk_params.signal, sig_.data(), 3);
// ################# Make a GNU Radio Tracking block object ################
if (trk_params.item_type == "gr_complex")
{
item_size_ = sizeof(gr_complex);
tracking_ = dll_pll_veml_make_tracking(trk_params);
}
else
{
item_size_ = sizeof(gr_complex);
LOG(WARNING) << trk_params.item_type << " unknown tracking item type.";
}
channel_ = 0;
DLOG(INFO) << "tracking(" << tracking_->unique_id() << ")";
if (in_streams_ > 1)
{
LOG(ERROR) << "This implementation only supports one input stream";
}
if (out_streams_ > 1)
{
LOG(ERROR) << "This implementation only supports one output stream";
}
}
void GalileoE6DllPllTracking::stop_tracking()
{
tracking_->stop_tracking();
}
void GalileoE6DllPllTracking::start_tracking()
{
tracking_->start_tracking();
}
/*
* Set tracking channel unique ID
*/
void GalileoE6DllPllTracking::set_channel(unsigned int channel)
{
channel_ = channel;
tracking_->set_channel(channel);
}
void GalileoE6DllPllTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
{
tracking_->set_gnss_synchro(p_gnss_synchro);
}
void GalileoE6DllPllTracking::connect(gr::top_block_sptr top_block)
{
if (top_block)
{
/* top_block is not null */
};
// nothing to connect, now the tracking uses gr_sync_decimator
}
void GalileoE6DllPllTracking::disconnect(gr::top_block_sptr top_block)
{
if (top_block)
{
/* top_block is not null */
};
// nothing to disconnect, now the tracking uses gr_sync_decimator
}
gr::basic_block_sptr GalileoE6DllPllTracking::get_left_block()
{
return tracking_;
}
gr::basic_block_sptr GalileoE6DllPllTracking::get_right_block()
{
return tracking_;
}

View File

@@ -0,0 +1,117 @@
/*!
* \file galileo_e6_dll_pll_tracking.h
* \brief Adapts a code DLL + carrier PLL
* tracking block to a TrackingInterface for Galileo E6 signals
* \author Carles Fernandez-Prades, 2020. cfernandez(at)cttc.es
*
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (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.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_GALILEO_E6_DLL_PLL_TRACKING_H
#define GNSS_SDR_GALILEO_E6_DLL_PLL_TRACKING_H
#include "dll_pll_veml_tracking.h"
#include "tracking_interface.h"
#include <string>
/** \addtogroup Tracking
* \{ */
/** \addtogroup Tracking_adapters
* \{ */
class ConfigurationInterface;
/*!
* \brief This class implements a code DLL + carrier PLL tracking loop
*/
class GalileoE6DllPllTracking : public TrackingInterface
{
public:
GalileoE6DllPllTracking(
const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,
unsigned int out_streams);
~GalileoE6DllPllTracking() = default;
inline std::string role() override
{
return role_;
}
//! Returns "Galileo_E6_DLL_PLL_Tracking"
inline std::string implementation() override
{
return "Galileo_E6_DLL_PLL_Tracking";
}
inline size_t item_size() override
{
return item_size_;
}
/*!
* \brief Connect
*/
void connect(gr::top_block_sptr top_block) override;
/*!
* \brief Disconnect
*/
void disconnect(gr::top_block_sptr top_block) override;
/*!
* \brief Get left block
*/
gr::basic_block_sptr get_left_block() override;
/*!
* \brief Get right block
*/
gr::basic_block_sptr get_right_block() override;
/*!
* \brief Set tracking channel unique ID
*/
void set_channel(unsigned int channel) override;
/*!
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
* to efficiently exchange synchronization data between acquisition and tracking blocks
*/
void set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) override;
void start_tracking() override;
/*!
* \brief Stop running tracking
*/
void stop_tracking() override;
private:
dll_pll_veml_tracking_sptr tracking_;
size_t item_size_;
unsigned int channel_;
std::string role_;
unsigned int in_streams_;
unsigned int out_streams_;
};
/** \} */
/** \} */
#endif // GNSS_SDR_GALILEO_E6_DLL_PLL_TRACKING_H

View File

@@ -32,11 +32,13 @@
#include "Galileo_E1.h"
#include "Galileo_E5a.h"
#include "Galileo_E5b.h"
#include "Galileo_E6.h"
#include "MATH_CONSTANTS.h"
#include "beidou_b1i_signal_processing.h"
#include "beidou_b3i_signal_processing.h"
#include "galileo_e1_signal_processing.h"
#include "galileo_e5_signal_processing.h"
#include "galileo_e6_signal_processing.h"
#include "gnss_satellite.h"
#include "gnss_sdr_create_directory.h"
#include "gnss_synchro.h"
@@ -132,6 +134,7 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
map_signal_pretty_name["L5"] = "L5";
map_signal_pretty_name["B1"] = "B1I";
map_signal_pretty_name["B3"] = "B3I";
map_signal_pretty_name["E6"] = "E6";
d_signal_pretty_name = map_signal_pretty_name[d_signal_type];
@@ -316,6 +319,30 @@ dll_pll_veml_tracking::dll_pll_veml_tracking(const Dll_Pll_Conf &conf_) : gr::bl
d_interchange_iq = true;
}
}
else if (d_signal_type == "E6")
{
d_signal_carrier_freq = GALILEO_E6_FREQ_HZ;
d_code_period = GALILEO_E6_CODE_PERIOD_S;
d_code_chip_rate = GALILEO_E6_B_CODE_CHIP_RATE_CPS;
d_symbols_per_bit = 1;
d_correlation_length_ms = 1;
d_code_samples_per_chip = 1;
d_code_length_chips = static_cast<int32_t>(GALILEO_E6_B_CODE_LENGTH_CHIPS);
d_trk_parameters.slope = 1.0;
d_trk_parameters.spc = d_trk_parameters.early_late_space_chips;
d_trk_parameters.y_intercept = 1.0;
if (d_trk_parameters.track_pilot)
{
d_secondary = true;
d_signal_pretty_name = d_signal_pretty_name + "C";
d_secondary_code_length = static_cast<uint32_t>(GALILEO_E6_C_SECONDARY_CODE_LENGTH_CHIPS);
}
else
{
d_secondary = false;
d_signal_pretty_name = d_signal_pretty_name + "B";
}
}
else
{
LOG(WARNING) << "Invalid Signal argument when instantiating tracking blocks";
@@ -714,6 +741,21 @@ void dll_pll_veml_tracking::start_tracking()
}
}
}
else if (d_systemName == "Galileo" and d_signal_type == "E6")
{
if (d_trk_parameters.track_pilot)
{
d_secondary_code_string = galileo_e6_c_secondary_code(d_acquisition_gnss_synchro->PRN - 1);
galileo_e6_b_code_gen_float_primary(d_data_code, d_acquisition_gnss_synchro->PRN);
galileo_e6_c_code_gen_float_primary(d_tracking_code, d_acquisition_gnss_synchro->PRN);
d_Prompt_Data[0] = gr_complex(0.0, 0.0);
d_correlator_data_cpu.set_local_code_and_taps(d_code_samples_per_chip * d_code_length_chips, d_data_code.data(), d_prompt_data_shift);
}
else
{
galileo_e6_b_code_gen_float_primary(d_tracking_code, d_acquisition_gnss_synchro->PRN);
}
}
else if (d_systemName == "Beidou" and d_signal_type == "B1")
{
beidou_b1i_code_gen_float(d_tracking_code, d_acquisition_gnss_synchro->PRN, 0);
@@ -1745,8 +1787,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
if (!cn0_and_tracking_lock_status(d_code_period))
{
clear_tracking_vars();
d_state = 0; // loss-of-lock detected
loss_of_lock = true; // Set the flag so that the negative indication can be generated
d_state = 0; // loss-of-lock detected
loss_of_lock = true; // Set the flag so that the negative indication can be generated
current_synchro_data = *d_acquisition_gnss_synchro; // Fill in the Gnss_Synchro object with basic info
}
else
@@ -1906,8 +1948,8 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused)
if (!cn0_and_tracking_lock_status(d_code_period * static_cast<double>(d_trk_parameters.extend_correlation_symbols)))
{
clear_tracking_vars();
d_state = 0; // loss-of-lock detected
loss_of_lock = true; // Set the flag so that the negative indication can be generated
d_state = 0; // loss-of-lock detected
loss_of_lock = true; // Set the flag so that the negative indication can be generated
current_synchro_data = *d_acquisition_gnss_synchro; // Fill in the Gnss_Synchro object with basic info
}
else