Propagate broadcast SISA and NAPA to PVT

This commit is contained in:
Carles Fernandez
2026-07-17 20:49:00 +02:00
parent 72fc53c2c6
commit cec340f4aa
6 changed files with 52 additions and 3 deletions
+1 -1
View File
@@ -434,7 +434,7 @@ typedef struct
{ /* GPS/QZS/GAL broadcast ephemeris type */
int sat; /* satellite number */
int iode, iodc; /* IODE,IODC */
int sva; /* SV accuracy (URA index) */
int sva; /* SV accuracy (URA index, GAL: SISA index) */
int svh; /* SV health (0:ok) */
int week; /* GPS/QZS: gps week, GAL: galileo week */
int code; /* GPS/QZS: code on L2, GAL/BDS: data sources */
@@ -430,6 +430,7 @@ eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, 0, 0, 0, 0, 0.0, -1, 0};
// Galileo is the third satellite system for RTKLIB, so, add the required offset to discriminate Galileo ephemeris
rtklib_sat.sat = gal_eph.PRN + NSATGPS + NSATGLO;
rtklib_sat.sva = gal_eph.SISA;
rtklib_sat.A = gal_eph.sqrtA * gal_eph.sqrtA;
rtklib_sat.M0 = gal_eph.M_0;
rtklib_sat.deln = gal_eph.delta_n;
+47 -1
View File
@@ -77,6 +77,41 @@ double var_uraeph(int ura)
}
/* variance by galileo sisa ephemeris (OS SIS ICD, table 91) ----------------*/
double var_sisaeph(int sisa)
{
double sisa_m;
if (sisa == -1)
{
// Reduced CED does not contain SISA. Retain RTKLIB's default
// broadcast-ephemeris accuracy when no index was supplied.
sisa_m = 2.4;
}
else if (sisa < 0 || sisa > 125)
{
// Spare values and NAPA (255) provide no usable accuracy prediction.
sisa_m = 6144.0;
}
else if (sisa <= 49)
{
sisa_m = static_cast<double>(sisa) * 0.01;
}
else if (sisa <= 74)
{
sisa_m = 0.50 + static_cast<double>(sisa - 50) * 0.02;
}
else if (sisa <= 99)
{
sisa_m = 1.00 + static_cast<double>(sisa - 75) * 0.04;
}
else
{
sisa_m = 2.00 + static_cast<double>(sisa - 100) * 0.16;
}
return std::pow(sisa_m, 2.0);
}
static double cnav_ura_upper_bound_m(int ura_index)
{
switch (ura_index)
@@ -517,7 +552,18 @@ void eph2pos(gtime_t time, const eph_t *eph, double *rs, double *dts,
}
/* position and clock error variance */
*var = eph->cnav_ura_valid ? std::pow(cnav_uraeph(time, eph), 2.0) : var_uraeph(eph->sva);
if (eph->cnav_ura_valid)
{
*var = std::pow(cnav_uraeph(time, eph), 2.0);
}
else if (satsys(eph->sat, nullptr) == SYS_GAL)
{
*var = var_sisaeph(eph->sva);
}
else
{
*var = var_uraeph(eph->sva);
}
}
@@ -38,6 +38,7 @@
double var_uraeph(int ura);
double var_sisaeph(int sisa);
double var_urassr(int ura);
void alm2pos(gtime_t time, const alm_t *alm, double *rs, double *dts);
double eph2clk(gtime_t time, const eph_t *eph);
@@ -50,7 +50,7 @@ public:
int32_t IOD_nav{};
// SV status
int32_t SISA{}; //!< Signal in space accuracy index
int32_t SISA{-1}; //!< Signal in space accuracy index (-1 if unavailable in the source data)
int32_t E5a_HS{}; //!< E5a Signal Health Status
int32_t E5b_HS{}; //!< E5b Signal Health Status
int32_t E1B_HS{}; //!< E1B Signal Health Status
@@ -407,6 +407,7 @@ Galileo_Ephemeris Galileo_Fnav_Message::get_ephemeris() const
ephemeris.af0 = FNAV_af0_1; // SV clock bias correction coefficient [s]
ephemeris.af1 = FNAV_af1_1; // SV clock drift correction coefficient [s/s]
ephemeris.af2 = FNAV_af2_1; // SV clock drift rate correction coefficient [s/s^2]
ephemeris.SISA = FNAV_SISA_1; // Signal In Space Accuracy index
ephemeris.BGD_E1E5a = FNAV_BGD_1; // E1-E5a Broadcast Group Delay [s]
// GST