AP_GPS:Septentrio constellation choice

This commit is contained in:
chiara-septentrio 2024-06-25 09:02:14 +02:00 committed by Andrew Tridgell
parent 7b5c1f16c1
commit fc8147ead0
2 changed files with 18 additions and 0 deletions

View File

@ -138,6 +138,19 @@ AP_GPS_SBF::read(void)
config_string = nullptr; config_string = nullptr;
} }
break; break;
case Config_State::Constellation:
if ((params.gnss_mode&0x6F)!=0) {
//IMES not taken into account by Septentrio receivers
if (asprintf(&config_string, "sst, %s%s%s%s%s%s\n", (params.gnss_mode&(1U<<0))!=0 ? "GPS" : "",
(params.gnss_mode&(1U<<1))!=0 ? ((params.gnss_mode&0x01)==0 ? "SBAS" : "+SBAS") : "",
(params.gnss_mode&(1U<<2))!=0 ? ((params.gnss_mode&0x03)==0 ? "GALILEO" : "+GALILEO") : "",
(params.gnss_mode&(1U<<3))!=0 ? ((params.gnss_mode&0x07)==0 ? "BEIDOU" : "+BEIDOU") : "",
(params.gnss_mode&(1U<<5))!=0 ? ((params.gnss_mode&0x0F)==0 ? "QZSS" : "+QZSS") : "",
(params.gnss_mode&(1U<<6))!=0 ? ((params.gnss_mode&0x2F)==0 ? "GLONASS" : "+GLONASS") : "") == -1) {
config_string=nullptr;
}
}
break;
case Config_State::Blob: case Config_State::Blob:
if (asprintf(&config_string, "%s\n", _initialisation_blob[_init_blob_index]) == -1) { if (asprintf(&config_string, "%s\n", _initialisation_blob[_init_blob_index]) == -1) {
config_string = nullptr; config_string = nullptr;
@ -364,6 +377,9 @@ AP_GPS_SBF::parse(uint8_t temp)
config_step = Config_State::SSO; config_step = Config_State::SSO;
break; break;
case Config_State::SSO: case Config_State::SSO:
config_step = Config_State::Constellation;
break;
case Config_State::Constellation:
config_step = Config_State::Blob; config_step = Config_State::Blob;
break; break;
case Config_State::Blob: case Config_State::Blob:
@ -699,4 +715,5 @@ bool AP_GPS_SBF::prepare_for_arming(void) {
return is_logging; return is_logging;
} }
#endif #endif

View File

@ -76,6 +76,7 @@ private:
Blob, Blob,
SBAS, SBAS,
SGA, SGA,
Constellation,
Complete Complete
}; };
Config_State config_step; Config_State config_step;