Changeset 10947 in ntrip for trunk/BNC/src/bncantex.cpp
- Timestamp:
- Jun 25, 2026, 2:14:56 PM (29 hours ago)
- File:
-
- 1 edited
-
trunk/BNC/src/bncantex.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncantex.cpp
r10946 r10947 349 349 // independently-known attitude/orbit residuals if high accuracy matters. 350 350 //////////////////////////////////////////////////////////////////////////// 351 double bncAntex::glonassYawAngle(const QString& prn, const ColumnVector& xSat, 351 double bncAntex::glonassYawAngle(const QString& prn, double Mjd, 352 const ColumnVector& xSat, 352 353 const ColumnVector& vSat, 353 354 const ColumnVector& xSun) { 354 355 355 356 const double MAX_YAW_RATE = 0.25 * M_PI / 180.0; // [rad/s], approximate 357 358 // A genuine yaw-fixed window (gapless data) only ever lasts a few 359 // minutes around the orbit noon/midnight point - see the width 360 // estimate in the comment above. If the stored frozen value is much 361 // older than that, it is more likely stale (e.g. a stream outage, a 362 // maneuver-flagged-unhealthy period, or a brief eclipse passage spanned 363 // the gap) than a still-valid freeze, so fall back to the current 364 // nominal value instead of trusting it indefinitely. 365 const double MAX_FREEZE_AGE = 1800.0 / 86400.0; // 30 minutes, in days 356 366 357 367 // Inertial-consistent velocity (xSat, vSat are Earth-fixed; remove the … … 398 408 double psiEff; 399 409 if (psiRate > MAX_YAW_RATE) { 400 if (!st.valid) { 401 st.yaw = psiNom; // no prior history - best available estimate 410 if (!st.valid || (Mjd - st.lastMjd) > MAX_FREEZE_AGE) { 411 st.yaw = psiNom; // no prior history, or it is too old to trust 412 st.lastMjd = Mjd; 413 st.valid = true; 402 414 } 403 415 psiEff = st.yaw; // hold the frozen yaw angle 404 416 } 405 417 else { 406 st.yaw = psiNom; 407 st.valid = true; 408 psiEff = psiNom; 418 st.yaw = psiNom; 419 st.lastMjd = Mjd; 420 st.valid = true; 421 psiEff = psiNom; 409 422 } 410 423 … … 466 479 // ----------------------------------------------------------------- 467 480 if (prn[0] == 'R' && vSat.size() == 3) { 468 double psi = glonassYawAngle(prn, xSat, vSat, xSun); 481 double psi = glonassYawAngle(prn, Mjd, xSat, vSat, xSun); 469 482 470 483 ColumnVector vInert = vSat;
Note:
See TracChangeset
for help on using the changeset viewer.
