Changeset 11104 in ntrip


Ignore:
Timestamp:
Oct 21, 2026, 2:00:15 AM (18 hours ago)
Author:
stuerze
Message:

minor changes

Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncantex.cpp

    r11102 r11104  
    786786                                 const ColumnVector& vSat, ColumnVector& dx,
    787787                                 e_attMode mode, double externalYaw,
    788                                  const QString& stateKey) {
     788                                 const QString& stateKey, double* yawUsed) {
    789789
    790790  // separate yaw model states per caller (stateKey), each called in time order
    … …  
    890890        sy /= sqrt(DotProduct(sy,sy));
    891891        sx = crossproduct(sy, sz);
     892      }
     893
     894      // yaw angle used: rotation of the body x-axis around sz relative to
     895      // the velocity-referenced frame (convention of psiEff/externalYaw)
     896      if (yawUsed) {
     897        if (useVelocityFrame) {
     898          *yawUsed = psiEff;
     899        }
     900        else if (vSat.size() == 3) {
     901          ColumnVector Omega(3); Omega(1) = 0.0; Omega(2) = 0.0; Omega(3) = t_CST::omega;
     902          ColumnVector vInert = vSat + crossproduct(Omega, xSat);
     903          ColumnVector sy0 = crossproduct(sz, vInert);
     904          sy0 /= sqrt(DotProduct(sy0,sy0));
     905          ColumnVector sx0 = crossproduct(sy0, sz);
     906          *yawUsed = atan2(DotProduct(crossproduct(sx0, sx), sz), DotProduct(sx0, sx));
     907        }
     908        else {
     909          *yawUsed = 0.0;
     910        }
    892911      }
    893912
  • trunk/BNC/src/bncantex.h

    r11102 r11104  
    6767                           e_attMode mode = ATT_COMPUTED,
    6868                           double externalYaw = 0.0,
    69                            const QString& stateKey = QString());
     69                           const QString& stateKey = QString(),
     70                           double* yawUsed = 0);
    7071
    7172  // Drain and return diagnostic logs accumulated by the yaw models.
Note: See TracChangeset for help on using the changeset viewer.