mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
fix msg number for Galileo MSM1 messages
This commit is contained in:
parent
4958874269
commit
6422683652
@ -1021,7 +1021,18 @@ std::string Rtcm::print_MSM_1( const Gps_Ephemeris & gps_eph,
|
|||||||
bool divergence_free,
|
bool divergence_free,
|
||||||
bool more_messages)
|
bool more_messages)
|
||||||
{
|
{
|
||||||
unsigned int msg_number = 1071; /// check for Galileo, it's 1091
|
unsigned int msg_number = 0;
|
||||||
|
if(gps_eph.i_satellite_PRN != 0) msg_number = 1071;
|
||||||
|
if(gal_eph.i_satellite_PRN != 0) msg_number = 1091;
|
||||||
|
if((gps_eph.i_satellite_PRN != 0) && (gal_eph.i_satellite_PRN != 0))
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "MSM messages for observables from different systems are not defined"; //print two messages?
|
||||||
|
}
|
||||||
|
if(msg_number == 0)
|
||||||
|
{
|
||||||
|
LOG(WARNING) << "Invalid ephemeris provided";
|
||||||
|
msg_number = 1071;
|
||||||
|
}
|
||||||
|
|
||||||
std::string header = Rtcm::get_MSM_header(msg_number, gps_eph,
|
std::string header = Rtcm::get_MSM_header(msg_number, gps_eph,
|
||||||
gal_eph,
|
gal_eph,
|
||||||
@ -2509,6 +2520,29 @@ int Rtcm::set_DF401(const Gnss_Synchro & gnss_synchro)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//int Rtcm::set_DF402(const Gnss_Synchro & gnss_synchro)
|
||||||
|
//{
|
||||||
|
// unsigned indicator = 15;
|
||||||
|
// // Table 3.5-74
|
||||||
|
// if (lock < 32 ) indicator = 0;
|
||||||
|
// if (lock < 64 ) indicator = 1;
|
||||||
|
// if (lock < 128 ) indicator = 2;
|
||||||
|
// if (lock < 256 ) indicator = 3;
|
||||||
|
// if (lock < 512 ) indicator = 4;
|
||||||
|
// if (lock < 1024 ) indicator = 5;
|
||||||
|
// if (lock < 2048 ) indicator = 6;
|
||||||
|
// if (lock < 4096 ) indicator = 7;
|
||||||
|
// if (lock < 8192 ) indicator = 8;
|
||||||
|
// if (lock < 16384 ) indicator = 9;
|
||||||
|
// if (lock < 32768 ) indicator = 10;
|
||||||
|
// if (lock < 65536 ) indicator = 11;
|
||||||
|
// if (lock < 131072) indicator = 12;
|
||||||
|
// if (lock < 262144) indicator = 13;
|
||||||
|
// if (lock < 524288) indicator = 14;
|
||||||
|
// return 0;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int Rtcm::set_DF403(const Gnss_Synchro & gnss_synchro)
|
int Rtcm::set_DF403(const Gnss_Synchro & gnss_synchro)
|
||||||
{
|
{
|
||||||
|
@ -328,7 +328,8 @@ TEST(Rtcm_Test, MSMCell)
|
|||||||
bool more_messages = false;
|
bool more_messages = false;
|
||||||
double obs_time = 25.0;
|
double obs_time = 25.0;
|
||||||
|
|
||||||
gps_eph.i_satellite_PRN = gnss_synchro.PRN;
|
gps_eph.i_satellite_PRN = gnss_synchro2.PRN;
|
||||||
|
gal_eph.i_satellite_PRN = gnss_synchro.PRN;
|
||||||
|
|
||||||
std::string MSM1 = rtcm->print_MSM_1(gps_eph,
|
std::string MSM1 = rtcm->print_MSM_1(gps_eph,
|
||||||
gal_eph,
|
gal_eph,
|
||||||
@ -402,7 +403,6 @@ TEST(Rtcm_Test, MSM1)
|
|||||||
{
|
{
|
||||||
auto rtcm = std::make_shared<Rtcm>();
|
auto rtcm = std::make_shared<Rtcm>();
|
||||||
Gps_Ephemeris gps_eph = Gps_Ephemeris();
|
Gps_Ephemeris gps_eph = Gps_Ephemeris();
|
||||||
Galileo_Ephemeris gal_eph = Galileo_Ephemeris();
|
|
||||||
std::map<int, Gnss_Synchro> pseudoranges;
|
std::map<int, Gnss_Synchro> pseudoranges;
|
||||||
|
|
||||||
Gnss_Synchro gnss_synchro;
|
Gnss_Synchro gnss_synchro;
|
||||||
@ -452,7 +452,7 @@ TEST(Rtcm_Test, MSM1)
|
|||||||
gps_eph.i_satellite_PRN = gnss_synchro.PRN;
|
gps_eph.i_satellite_PRN = gnss_synchro.PRN;
|
||||||
|
|
||||||
std::string MSM1 = rtcm->print_MSM_1(gps_eph,
|
std::string MSM1 = rtcm->print_MSM_1(gps_eph,
|
||||||
gal_eph,
|
{},
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges,
|
pseudoranges,
|
||||||
ref_id,
|
ref_id,
|
||||||
@ -501,7 +501,7 @@ TEST(Rtcm_Test, MSM1)
|
|||||||
pseudoranges2.insert(std::pair<int, Gnss_Synchro>(3, gnss_synchro2));
|
pseudoranges2.insert(std::pair<int, Gnss_Synchro>(3, gnss_synchro2));
|
||||||
pseudoranges2.insert(std::pair<int, Gnss_Synchro>(4, gnss_synchro));
|
pseudoranges2.insert(std::pair<int, Gnss_Synchro>(4, gnss_synchro));
|
||||||
std::string MSM1_2 = rtcm->print_MSM_1(gps_eph,
|
std::string MSM1_2 = rtcm->print_MSM_1(gps_eph,
|
||||||
gal_eph,
|
{},
|
||||||
obs_time,
|
obs_time,
|
||||||
pseudoranges2,
|
pseudoranges2,
|
||||||
ref_id,
|
ref_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user