Changeset 9788 in ntrip for trunk/BNC


Ignore:
Timestamp:
Jul 12, 2022, 4:53:41 PM (22 months ago)
Author:
stuerze
Message:

some more changes to consider RINEX Version 4 nav file (EPH key only)

Location:
trunk/BNC/src
Files:
3 edited

Legend:

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

    r9786 r9788  
    249249    nLines += 1;
    250250  }
    251   else if (navType() == t_eph::CNV2) {
     251  if (navType() == t_eph::CNV2) {
    252252    nLines += 2;
    253253  }
     
    400400      if (navType() == t_eph::CNAV ||
    401401          navType() == t_eph::CNV2) {
    402         if ( readDbl(line, pos[0], fieldLen, _IDOT   ) ||
    403              readDbl(line, pos[1], fieldLen, _DN0DOT ) ||
    404              readDbl(line, pos[2], fieldLen, _URAI_NED0 ) ||
     402        if ( readDbl(line, pos[0], fieldLen, _IDOT       ) ||
     403             readDbl(line, pos[1], fieldLen, _Delta_n_dot) ||
     404             readDbl(line, pos[2], fieldLen, _URAI_NED0  ) ||
    405405             readDbl(line, pos[3], fieldLen, _URAI_NED1) ) {
    406406          _checkState = bad;
     
    411411        if ( readDbl(line, pos[0], fieldLen, _IDOT   ) ||
    412412             readDbl(line, pos[1], fieldLen, _L2Codes) ||
    413              readDbl(line, pos[2], fieldLen, _TOEweek  ) ||
     413             readDbl(line, pos[2], fieldLen, _TOEweek) ||
    414414             readDbl(line, pos[3], fieldLen, _L2PFlag) ) {
    415415          _checkState = bad;
     
    498498          return;
    499499        }
    500 
    501500      }
    502501
     
    709708        navType() == t_eph::CNV2) {
    710709      out << QString(fmt)
    711         .arg(_IDOT,      19, 'e', 12)
    712         .arg(_DN0DOT,    19, 'e', 12)
    713         .arg(_URAI_NED0, 19, 'e', 12)
    714         .arg(_URAI_NED1, 19, 'e', 12);
     710        .arg(_IDOT,        19, 'e', 12)
     711        .arg(_Delta_n_dot, 19, 'e', 12)
     712        .arg(_URAI_NED0,   19, 'e', 12)
     713        .arg(_URAI_NED1,   19, 'e', 12);
    715714
    716715    }
     
    902901      _tau  = -_tau;
    903902    }
    904 
     903    // =====================
     904    // BROADCAST ORBIT - 1
     905    // =====================
    905906    else if      ( iLine == 1 ) {
    906907      if ( readDbl(line, pos[0], fieldLen, _x_pos         ) ||
     
    912913      }
    913914    }
    914 
     915    // =====================
     916    // BROADCAST ORBIT - 2
     917    // =====================
    915918    else if ( iLine == 2 ) {
    916919      if ( readDbl(line, pos[0], fieldLen, _y_pos           ) ||
     
    922925      }
    923926    }
    924 
     927    // =====================
     928    // BROADCAST ORBIT - 3
     929    // =====================
    925930    else if ( iLine == 3 ) {
    926931      if ( readDbl(line, pos[0], fieldLen, _z_pos         )  ||
     
    932937      }
    933938    }
    934 
     939    // =====================
     940    // BROADCAST ORBIT - 4
     941    // =====================
    935942    else if ( iLine == 4 ) {
    936943      if ( readDbl(line, pos[0], fieldLen, statusflags    )  ||
     
    10491056
    10501057  QString fmt = version < 3.0 ? "   %1%2%3%4\n" : "    %1%2%3%4\n";
    1051 
     1058  // =====================
     1059  // BROADCAST ORBIT - 1
     1060  // =====================
    10521061  out << QString(fmt)
    10531062    .arg(_x_pos,          19, 'e', 12)
     
    10551064    .arg(_x_acceleration, 19, 'e', 12)
    10561065    .arg(_health,         19, 'e', 12);
    1057 
     1066  // =====================
     1067  // BROADCAST ORBIT - 2
     1068  // =====================
    10581069  out << QString(fmt)
    10591070    .arg(_y_pos,            19, 'e', 12)
     
    10611072    .arg(_y_acceleration,   19, 'e', 12)
    10621073    .arg(_frequency_number, 19, 'e', 12);
    1063 
     1074  // =====================
     1075  // BROADCAST ORBIT - 3
     1076  // =====================
    10641077  out << QString(fmt)
    10651078    .arg(_z_pos,          19, 'e', 12)
     
    10671080    .arg(_z_acceleration, 19, 'e', 12)
    10681081    .arg(_E,              19, 'e', 12);
    1069 
     1082  // =====================
     1083  // BROADCAST ORBIT - 4
     1084  // =====================
    10701085  if (version >= 3.05) {
    10711086    // unknown (RINEX version < 3.05)
     
    12601275      }
    12611276    }
    1262 
     1277    // =====================
     1278    // BROADCAST ORBIT - 1
     1279    // =====================
    12631280    else if      ( iLine == 1 ) {
    12641281      if ( readDbl(line, pos[0], fieldLen, _IODnav ) ||
     
    12701287      }
    12711288    }
    1272 
     1289    // =====================
     1290    // BROADCAST ORBIT - 2
     1291    // =====================
    12731292    else if ( iLine == 2 ) {
    12741293      if ( readDbl(line, pos[0], fieldLen, _Cuc   ) ||
     
    12801299      }
    12811300    }
    1282 
     1301    // =====================
     1302    // BROADCAST ORBIT - 3
     1303    // =====================
    12831304    else if ( iLine == 3 ) {
    12841305      if ( readDbl(line, pos[0], fieldLen, _TOEsec)  ||
     
    12901311      }
    12911312    }
    1292 
     1313    // =====================
     1314    // BROADCAST ORBIT - 4
     1315    // =====================
    12931316    else if ( iLine == 4 ) {
    12941317      if ( readDbl(line, pos[0], fieldLen, _i0      ) ||
     
    13001323      }
    13011324    }
    1302 
     1325    // =====================
     1326    // BROADCAST ORBIT - 5
     1327    // =====================
    13031328    else if ( iLine == 5 ) {
    13041329      if ( readDbl(line, pos[0], fieldLen, _IDOT      ) ||
     
    13181343      }
    13191344    }
    1320 
     1345    // =====================
     1346    // BROADCAST ORBIT - 6
     1347    // =====================
    13211348    else if ( iLine == 6 ) {
    13221349      if ( readDbl(line, pos[0], fieldLen, _SISA    ) ||
     
    13451372      }
    13461373    }
    1347 
     1374    // =====================
     1375    // BROADCAST ORBIT - 7
     1376    // =====================
    13481377    else if ( iLine == 7 ) {
    13491378      if ( readDbl(line, pos[0], fieldLen, _TOT) ) {
     
    14691498
    14701499  QString fmt = version < 3.0 ? "   %1%2%3%4\n" : "    %1%2%3%4\n";
    1471 
     1500  // =====================
     1501  // BROADCAST ORBIT - 1
     1502  // =====================
    14721503  out << QString(fmt)
    14731504    .arg(_IODnav,  19, 'e', 12)
     
    14751506    .arg(_Delta_n, 19, 'e', 12)
    14761507    .arg(_M0,      19, 'e', 12);
    1477 
     1508  // =====================
     1509  // BROADCAST ORBIT - 2
     1510  // =====================
    14781511  out << QString(fmt)
    14791512    .arg(_Cuc,    19, 'e', 12)
     
    14811514    .arg(_Cus,    19, 'e', 12)
    14821515    .arg(_sqrt_A, 19, 'e', 12);
    1483 
     1516  // =====================
     1517  // BROADCAST ORBIT - 3
     1518  // =====================
    14841519  out << QString(fmt)
    14851520    .arg(_TOEsec, 19, 'e', 12)
     
    14871522    .arg(_OMEGA0, 19, 'e', 12)
    14881523    .arg(_Cis,    19, 'e', 12);
    1489 
     1524  // =====================
     1525  // BROADCAST ORBIT - 4
     1526  // =====================
    14901527  out << QString(fmt)
    14911528    .arg(_i0,       19, 'e', 12)
     
    14931530    .arg(_omega,    19, 'e', 12)
    14941531    .arg(_OMEGADOT, 19, 'e', 12);
    1495 
     1532  // =====================
     1533  // BROADCAST ORBIT - 5
     1534  // =====================
    14961535  int    dataSource = 0;
    14971536  int    SVhealth   = 0;
     
    15781617    .arg(_TOEweek + 1024.0,  19, 'e', 12)
    15791618    .arg(0.0,                19, 'e', 12);
    1580 
     1619  // =====================
     1620  // BROADCAST ORBIT - 6
     1621  // =====================
    15811622  out << QString(fmt)
    15821623    .arg(_SISA,            19, 'e', 12)
     
    15841625    .arg(BGD_1_5A,         19, 'e', 12)
    15851626    .arg(BGD_1_5B,         19, 'e', 12);
    1586 
     1627  // =====================
     1628  // BROADCAST ORBIT - 7
     1629  // =====================
    15871630  double tot = _TOT;
    15881631  if (tot == 0.9999e9 && version < 3.0) {
     
    16601703      }
    16611704    }
    1662 
     1705    // =====================
     1706    // BROADCAST ORBIT - 1
     1707    // =====================
    16631708    else if      ( iLine == 1 ) {
    16641709      if ( readDbl(line, pos[0], fieldLen, _x_pos         ) ||
     
    16701715      }
    16711716    }
    1672 
     1717    // =====================
     1718    // BROADCAST ORBIT - 2
     1719    // =====================
    16731720    else if ( iLine == 2 ) {
    16741721      if ( readDbl(line, pos[0], fieldLen, _y_pos           ) ||
     
    16801727      }
    16811728    }
    1682 
     1729    // =====================
     1730    // BROADCAST ORBIT - 3
     1731    // =====================
    16831732    else if ( iLine == 3 ) {
    16841733      double iodn;
     
    17961845
    17971846  QString fmt = version < 3.0 ? "   %1%2%3%4\n" : "    %1%2%3%4\n";
    1798 
     1847  // =====================
     1848  // BROADCAST ORBIT - 1
     1849  // =====================
    17991850  out << QString(fmt)
    18001851    .arg(1.e-3*_x_pos,          19, 'e', 12)
     
    18021853    .arg(1.e-3*_x_acceleration, 19, 'e', 12)
    18031854    .arg(_health,               19, 'e', 12);
    1804 
     1855  // =====================
     1856  // BROADCAST ORBIT - 2
     1857  // =====================
    18051858  out << QString(fmt)
    18061859    .arg(1.e-3*_y_pos,          19, 'e', 12)
     
    18081861    .arg(1.e-3*_y_acceleration, 19, 'e', 12)
    18091862    .arg(_ura,                  19, 'e', 12);
    1810 
     1863  // =====================
     1864  // BROADCAST ORBIT - 3
     1865  // =====================
    18111866  out << QString(fmt)
    18121867    .arg(1.e-3*_z_pos,          19, 'e', 12)
     
    18221877t_ephBDS::t_ephBDS(double rnxVersion, const QStringList& lines) {
    18231878
    1824   const int nLines = 8;
     1879  int nLines = 8;
     1880
     1881  if (navType() == t_eph::CNV1 ||
     1882      navType() == t_eph::CNV2) {
     1883    nLines += 2;
     1884  }
     1885  if (navType() == t_eph::CNV3) {
     1886    nLines += 1;
     1887  }
    18251888
    18261889  if (lines.size() != nLines) {
     
    18801943      }
    18811944    }
    1882 
     1945    // =====================
     1946    // BROADCAST ORBIT - 1
     1947    // =====================
    18831948    else if      ( iLine == 1 ) {
    18841949      double aode;
     
    18921957      _AODE = int(aode);
    18931958    }
    1894 
     1959    // =====================
     1960    // BROADCAST ORBIT - 2
     1961    // =====================
    18951962    else if ( iLine == 2 ) {
    18961963      if ( readDbl(line, pos[0], fieldLen, _Cuc   ) ||
     
    19021969      }
    19031970    }
    1904 
     1971    // =====================
     1972    // BROADCAST ORBIT - 3
     1973    // =====================
    19051974    else if ( iLine == 3 ) {
    19061975      if ( readDbl(line, pos[0], fieldLen, _TOEsec )  ||
     
    19121981      }
    19131982    }
    1914 
     1983    // =====================
     1984    // BROADCAST ORBIT - 4
     1985    // =====================
    19151986    else if ( iLine == 4 ) {
    19161987      if ( readDbl(line, pos[0], fieldLen, _i0      ) ||
     
    19221993      }
    19231994    }
    1924 
     1995    // =====================
     1996    // BROADCAST ORBIT - 5
     1997    // =====================
    19251998    else if ( iLine == 5 ) {
    1926       if ( readDbl(line, pos[0], fieldLen, _IDOT    ) ||
    1927            readDbl(line, pos[2], fieldLen, _BDTweek)) {
    1928         _checkState = bad;
    1929         return;
    1930       }
    1931     }
    1932 
     1999
     2000      if (navType() == t_eph::CNV1 ||
     2001          navType() == t_eph::CNV2 ||
     2002          navType() == t_eph::CNV3 ) {
     2003        if ( readDbl(line, pos[0], fieldLen, _IDOT       ) ||
     2004             readDbl(line, pos[1], fieldLen, _Delta_n_dot) ||
     2005             readDbl(line, pos[2], fieldLen, _satType    ) ||
     2006             readDbl(line, pos[3], fieldLen, _top        ) ) {
     2007          _checkState = bad;
     2008          return;
     2009        }
     2010      }
     2011      else { // D1, D2, undefined
     2012        if ( readDbl(line, pos[0], fieldLen, _IDOT    ) ||
     2013             readDbl(line, pos[2], fieldLen, _BDTweek)) {
     2014          _checkState = bad;
     2015          return;
     2016        }
     2017      }
     2018    }
     2019    // =====================
     2020    // BROADCAST ORBIT - 6
     2021    // =====================
    19332022    else if ( iLine == 6 ) {
    1934       double SatH1;
    1935       if ( readDbl(line, pos[0], fieldLen, _URA ) ||
    1936            readDbl(line, pos[1], fieldLen, SatH1) ||
    1937            readDbl(line, pos[2], fieldLen, _TGD1) ||
    1938            readDbl(line, pos[3], fieldLen, _TGD2) ) {
    1939         _checkState = bad;
    1940         return;
    1941       }
    1942       _SatH1 = int(SatH1);
    1943     }
    1944 
     2023      if (navType() == t_eph::CNV1 ||
     2024          navType() == t_eph::CNV2 ||
     2025          navType() == t_eph::CNV3 ) {
     2026        if ( readDbl(line, pos[0], fieldLen, _SISAI_oe  ) ||
     2027             readDbl(line, pos[1], fieldLen, _SISAI_ocb ) ||
     2028             readDbl(line, pos[2], fieldLen, _SISAI_oc1 ) ||
     2029             readDbl(line, pos[3], fieldLen, _SISAI_oc2  ) ) {
     2030          _checkState = bad;
     2031          return;
     2032        }
     2033      }
     2034      else { // D1, D2, undefined
     2035        double SatH1;
     2036        if ( readDbl(line, pos[0], fieldLen, _URA ) ||
     2037             readDbl(line, pos[1], fieldLen, SatH1) ||
     2038             readDbl(line, pos[2], fieldLen, _TGD1) ||
     2039             readDbl(line, pos[3], fieldLen, _TGD2) ) {
     2040          _checkState = bad;
     2041          return;
     2042        }
     2043        _SatH1 = int(SatH1);
     2044      }
     2045    }
     2046    // =====================
     2047    // BROADCAST ORBIT - 7
     2048    // =====================
    19452049    else if ( iLine == 7 ) {
    1946       double aodc;
    1947       if ( readDbl(line, pos[0], fieldLen, _TOT) ||
    1948            readDbl(line, pos[1], fieldLen, aodc) ) {
    1949         _checkState = bad;
    1950         return;
    1951       }
    1952       if (_TOT == 0.9999e9) {  // 0.9999e9 means not known (RINEX standard)
    1953         _TOT = _TOEsec;
    1954       }
    1955       _AODC = int(aodc);
    1956     }
    1957   }
    1958 
    1959   _TOE.setBDS(int(_BDTweek), _TOEsec);
    1960 
     2050      if (navType() == t_eph::CNV1) {
     2051        if ( readDbl(line, pos[0], fieldLen, _ISC_B1Cd) ||
     2052             readDbl(line, pos[2], fieldLen, _TGD_B1Cp) ||
     2053             readDbl(line, pos[3], fieldLen, _TGD_B2ap) ) {
     2054          _checkState = bad;
     2055          return;
     2056        }
     2057      }
     2058      else if (navType() == t_eph::CNV2) {
     2059        if ( readDbl(line, pos[1], fieldLen, _ISC_B2ad) ||
     2060             readDbl(line, pos[2], fieldLen, _TGD_B1Cp) ||
     2061             readDbl(line, pos[3], fieldLen, _TGD_B2ap) ) {
     2062          _checkState = bad;
     2063          return;
     2064        }
     2065      }
     2066      else if (navType() == t_eph::CNV3) {
     2067        if ( readDbl(line, pos[0], fieldLen, _SISMAI        ) ||
     2068             readDbl(line, pos[1], fieldLen, _health        ) ||
     2069             readDbl(line, pos[2], fieldLen, _INTEGRITYF_B2b) ||
     2070             readDbl(line, pos[3], fieldLen, _TGD_B2bI)     )  {
     2071          _checkState = bad;
     2072          return;
     2073        }
     2074      }
     2075      else { // D1, D2 or undefined
     2076        double aodc;
     2077        if ( readDbl(line, pos[0], fieldLen, _TOT) ||
     2078             readDbl(line, pos[1], fieldLen, aodc) ) {
     2079          _checkState = bad;
     2080          return;
     2081        }
     2082        if (_TOT == 0.9999e9) {  // 0.9999e9 means not known (RINEX standard)
     2083          _TOT = _TOEsec;
     2084        }
     2085        _AODC = int(aodc);
     2086      }
     2087    }
     2088    // =====================
     2089    // BROADCAST ORBIT - 8
     2090    // =====================
     2091    else if ( iLine == 8 ) {
     2092
     2093      if      (navType() == t_eph::CNV1) {
     2094        if ( readDbl(line, pos[0], fieldLen, _SISMAI        ) ||
     2095             readDbl(line, pos[1], fieldLen, _health        ) ||
     2096             readDbl(line, pos[2], fieldLen, _INTEGRITYF_B1C) ||
     2097             readDbl(line, pos[3], fieldLen, _IODC)     )  {
     2098          _checkState = bad;
     2099          return;
     2100        }
     2101      }
     2102      else if (navType() == t_eph::CNV2) {
     2103        if ( readDbl(line, pos[0], fieldLen, _SISMAI           ) ||
     2104             readDbl(line, pos[1], fieldLen, _health           ) ||
     2105             readDbl(line, pos[2], fieldLen, _INTEGRITYF_B2aB1C) ||
     2106             readDbl(line, pos[3], fieldLen, _IODC)            )  {
     2107          _checkState = bad;
     2108          return;
     2109        }
     2110      }
     2111      else if (navType() == t_eph::CNV3) {
     2112        if ( readDbl(line, pos[0], fieldLen, _TOT)) {
     2113          _checkState = bad;
     2114          return;
     2115        }
     2116      }
     2117
     2118    }
     2119    // =====================
     2120    // BROADCAST ORBIT - 9
     2121    // =====================
     2122    else if ( iLine == 9 ) {
     2123
     2124      if      (navType() == t_eph::CNV1 ||
     2125               navType() == t_eph::CNV2) {
     2126        if ( readDbl(line, pos[0], fieldLen, _TOT) ||
     2127             readDbl(line, pos[3], fieldLen, _IODE) ) {
     2128          _checkState = bad;
     2129          return;
     2130        }
     2131      }
     2132
     2133    }
     2134  }
     2135
     2136   _TOE.setBDS(int(_BDTweek), _TOEsec);
    19612137  // remark: actually should be computed from second_tot
    19622138  //         but it seems to be unreliable in RINEX files
     
    21522328
    21532329  QString fmt = version < 3.0 ? "   %1%2%3%4\n" : "    %1%2%3%4\n";
    2154 
     2330  // =====================
     2331  // BROADCAST ORBIT - 1
     2332  // =====================
    21552333  out << QString(fmt)
    21562334    .arg(double(_AODE), 19, 'e', 12)
     
    21582336    .arg(_Delta_n,      19, 'e', 12)
    21592337    .arg(_M0,           19, 'e', 12);
    2160 
     2338  // =====================
     2339  // BROADCAST ORBIT - 2
     2340  // =====================
    21612341  out << QString(fmt)
    21622342    .arg(_Cuc,    19, 'e', 12)
     
    21642344    .arg(_Cus,    19, 'e', 12)
    21652345    .arg(_sqrt_A, 19, 'e', 12);
    2166 
     2346  // =====================
     2347  // BROADCAST ORBIT - 3
     2348  // =====================
    21672349  out << QString(fmt)
    21682350    .arg(_TOEsec, 19, 'e', 12)
     
    21702352    .arg(_OMEGA0, 19, 'e', 12)
    21712353    .arg(_Cis,    19, 'e', 12);
    2172 
     2354  // =====================
     2355  // BROADCAST ORBIT - 4
     2356  // =====================
    21732357  out << QString(fmt)
    21742358    .arg(_i0,       19, 'e', 12)
     
    21762360    .arg(_omega,    19, 'e', 12)
    21772361    .arg(_OMEGADOT, 19, 'e', 12);
    2178 
    2179   out << QString(fmt)
    2180     .arg(_IDOT,    19, 'e', 12)
    2181     .arg(0.0,      19, 'e', 12)
    2182     .arg(_BDTweek, 19, 'e', 12)
    2183     .arg(0.0,      19, 'e', 12);
    2184 
    2185   out << QString(fmt)
    2186     .arg(_URA,           19, 'e', 12)
    2187     .arg(double(_SatH1), 19, 'e', 12)
    2188     .arg(_TGD1,          19, 'e', 12)
    2189     .arg(_TGD2,          19, 'e', 12);
    2190 
    2191   double tots = 0.0;
    2192   if (_receptDateTime.isValid()) {// RTCM stream input
    2193     tots = _TOE.bdssec();
    2194   }
    2195   else { // RINEX input
    2196     tots = _TOT;
    2197   }
    2198   out << QString(fmt)
    2199     .arg(tots,          19, 'e', 12)
    2200     .arg(double(_AODC), 19, 'e', 12)
    2201     .arg("",            19, QChar(' '))
    2202     .arg("",            19, QChar(' '));
     2362  // =====================
     2363  // BROADCAST ORBIT - 5
     2364  // =====================
     2365  if (navType() == t_eph::CNV1 ||
     2366      navType() == t_eph::CNV2 ||
     2367      navType() == t_eph::CNV3 ) {
     2368    out << QString(fmt)
     2369      .arg(_IDOT,        19, 'e', 12)
     2370      .arg(_Delta_n_dot, 19, 'e', 12)
     2371      .arg(_satType,     19, 'e', 12)
     2372      .arg(_top,         19, 'e', 12);
     2373  }
     2374  else { // D1, D2, undefined
     2375    out << QString(fmt)
     2376      .arg(_IDOT,    19, 'e', 12)
     2377      .arg("",            19, QChar(' '))
     2378      .arg(_BDTweek, 19, 'e', 12)
     2379      .arg("",            19, QChar(' '));
     2380  }
     2381  // =====================
     2382  // BROADCAST ORBIT - 6
     2383  // =====================
     2384  if (navType() == t_eph::CNV1 ||
     2385      navType() == t_eph::CNV2 ||
     2386      navType() == t_eph::CNV3 ) {
     2387    out << QString(fmt)
     2388      .arg(_SISAI_oe,  19, 'e', 12)
     2389      .arg(_SISAI_ocb, 19, 'e', 12)
     2390      .arg(_SISAI_oc1, 19, 'e', 12)
     2391      .arg(_SISAI_oc2, 19, 'e', 12);
     2392  }
     2393  else { // D1, D2, undefined
     2394    out << QString(fmt)
     2395      .arg(_URA,           19, 'e', 12)
     2396      .arg(double(_SatH1), 19, 'e', 12)
     2397      .arg(_TGD1,          19, 'e', 12)
     2398      .arg(_TGD2,          19, 'e', 12);
     2399  }
     2400  // =====================
     2401  // BROADCAST ORBIT - 7
     2402  // =====================
     2403  if      (navType() == t_eph::CNV1) {
     2404    out << QString(fmt)
     2405      .arg(_ISC_B1Cd, 19, 'e', 12)
     2406      .arg("",        19, QChar(' '))
     2407      .arg(_TGD_B1Cp, 19, 'e', 12)
     2408      .arg(_TGD_B2ap, 19, 'e', 12);
     2409  }
     2410  else if (navType() == t_eph::CNV2) {
     2411    out << QString(fmt)
     2412      .arg("",        19, QChar(' '))
     2413      .arg(_ISC_B2ad, 19, 'e', 12)
     2414      .arg(_TGD_B1Cp, 19, 'e', 12)
     2415      .arg(_TGD_B2ap, 19, 'e', 12);
     2416  }
     2417  else if (navType() == t_eph::CNV3) {
     2418    out << QString(fmt)
     2419      .arg(_SISMAI,         19, 'e', 12)
     2420      .arg(_health,         19, 'e', 12)
     2421      .arg(_INTEGRITYF_B2b, 19, 'e', 12)
     2422      .arg(_TGD_B2bI,       19, 'e', 12);
     2423  }
     2424  else { // D1, D2, undefined
     2425    double tots = 0.0;
     2426    if (_receptDateTime.isValid()) {// RTCM stream input
     2427      tots = _TOE.bdssec();
     2428    }
     2429    else { // RINEX input
     2430      tots = _TOT;
     2431    }
     2432    out << QString(fmt)
     2433      .arg(tots,          19, 'e', 12)
     2434      .arg(double(_AODC), 19, 'e', 12)
     2435      .arg("",            19, QChar(' '))
     2436      .arg("",            19, QChar(' '));
     2437  }
     2438
     2439  // =====================
     2440  // BROADCAST ORBIT - 8
     2441  // =====================
     2442  if      (navType() == t_eph::CNV1) {
     2443    out << QString(fmt)
     2444      .arg(_SISMAI,         19, 'e', 12)
     2445      .arg(_health,         19, 'e', 12)
     2446      .arg(_INTEGRITYF_B1C, 19, 'e', 12)
     2447      .arg(_IODC,           19, 'e', 12);
     2448  }
     2449  else if (navType() == t_eph::CNV2) {
     2450    out << QString(fmt)
     2451      .arg(_SISMAI,            19, 'e', 12)
     2452      .arg(_health,            19, 'e', 12)
     2453      .arg(_INTEGRITYF_B2aB1C, 19, 'e', 12)
     2454      .arg(_IODC,              19, 'e', 12);
     2455  }
     2456  else if (navType() == t_eph::CNV3) {
     2457    out << QString(fmt)
     2458      .arg(_TOT,          19, 'e', 12)
     2459      .arg("",            19, QChar(' '))
     2460      .arg("",            19, QChar(' '))
     2461      .arg("",            19, QChar(' '));
     2462  }
     2463
     2464  // =====================
     2465  // BROADCAST ORBIT - 9
     2466  // =====================
     2467  if      (navType() == t_eph::CNV1 ||
     2468           navType() == t_eph::CNV2) {
     2469    out << QString(fmt)
     2470      .arg(_TOT,          19, 'e', 12)
     2471      .arg("",            19, QChar(' '))
     2472      .arg("",            19, QChar(' '))
     2473      .arg(_IODE,         19, 'e', 12);
     2474  }
     2475
     2476
    22032477  return rnxStr;
    22042478}
  • trunk/BNC/src/ephemeris.h

    r9786 r9788  
    106106    _ADOT             = 0.0;
    107107    _top              = 0.0;
    108     _DN0DOT           = 0.0;
     108    _Delta_n_dot      = 0.0;
    109109    _URAI_NED0        = 0.0;
    110110    _URAI_NED1        = 0.0;
     
    178178  double  _ADOT;            // [m/s]
    179179  double  _top;             // [s]
    180   double  _DN0DOT;          // [rad/s^2]
     180  double  _Delta_n_dot;     // [rad/s^2]
    181181
    182182  double _URAI_NED0;        // []
     
    491491  virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
    492492
    493   double  _TOT;
     493  double  _TOT;              // [s] of BDT week
    494494  bncTime _TOE;
    495495  int     _AODE;
    496496  int     _AODC;
    497   int     _URAI;             //  [0..15] index from RTCM stream
    498   mutable double  _URA;      //  user range accuracy [m]
    499   double  _clock_bias;       //  [s]
    500   double  _clock_drift;      //  [s/s]
    501   double  _clock_driftrate;  //  [s/s^2]
    502   double  _Crs;              //  [m]
    503   double  _Delta_n;          //  [rad/s]
    504   double  _M0;               //  [rad]
    505   double  _Cuc;              //  [rad]
     497  int     _URAI;             // [0..15] index from RTCM stream
     498  mutable double  _URA;      // user range accuracy [m]
     499  double  _clock_bias;       // [s]
     500  double  _clock_drift;      // [s/s]
     501  double  _clock_driftrate;  // [s/s^2]
     502  double  _Crs;              // [m]
     503  double  _Delta_n;          // [rad/s]
     504  double  _M0;               // [rad]
     505  double  _Cuc;              // [rad]
    506506  double  _e;                //
    507   double  _Cus;              //  [rad]
    508   double  _sqrt_A;           //  [m^0.5]
    509   double  _Cic;              //  [rad]
    510   double  _OMEGA0;           //  [rad]
    511   double  _Cis;              //  [rad]
    512   double  _i0;               //  [rad]
    513   double  _Crc;              //  [m]
    514   double  _omega;            //  [rad]
    515   double  _OMEGADOT;         //  [rad/s]
    516   double  _IDOT;             //  [rad/s]
    517   double  _TGD1;             //  [s]
    518   double  _TGD2;             //  [s]
     507  double  _Cus;              // [rad]
     508  double  _sqrt_A;           // [m^0.5]
     509  double  _Cic;              // [rad]
     510  double  _OMEGA0;           // [rad]
     511  double  _Cis;              // [rad]
     512  double  _i0;               // [rad]
     513  double  _Crc;              // [m]
     514  double  _omega;            // [rad]
     515  double  _OMEGADOT;         // [rad/s]
     516  double  _IDOT;             // [rad/s]
     517  double  _TOEsec;           // [s] of BDT week
     518  double  _BDTweek;          // BDT week
     519
     520  double  _Delta_n_dot;      // [rad/s^2]
     521  double  _satType;          // 0..reserved, 1..GEO, 2..IGSO, 3..MEO
     522  double  _top;              // [s]
     523
     524  double  _SISAI_oe;         // []
     525  double  _SISAI_ocb;        // []
     526  double  _SISAI_oc1;        // []
     527  double  _SISAI_oc2;        // []
     528
     529  double  _ISC_B1Cd;         // [s]
     530  double  _ISC_B2ad;         // [s]
     531
     532  double  _TGD1;             // [s]
     533  double  _TGD2;             // [s]
     534  double  _TGD_B1Cp;         // [s]
     535  double  _TGD_B2ap;         // [s]
     536  double  _TGD_B2bI;         // [s]
     537
     538  double  _SISMAI;           // []
     539
    519540  int     _SatH1;            //
    520   double  _TOEsec;           //  [s] of BDT week
    521   double  _BDTweek;          //  BDT week
     541  double  _health;           //
     542
     543  double  _INTEGRITYF_B1C;   // 3 bits word from sf 3
     544  double  _INTEGRITYF_B2aB1C;// 6 bits word with integrity bits in msg 10-11, 30.34 or 40
     545  double  _INTEGRITYF_B2b;   // 3 bits word from msg 10
     546
     547  double  _IODC;             // []
     548  double  _IODE;             // [] IODE are the same as the 8 LSBs of IODC
     549
    522550};
    523551#endif
  • trunk/BNC/src/rinex/rnxnavfile.cpp

    r9765 r9788  
    391391////////////////////////////////////////////////////////////////////////////
    392392void t_rnxNavFile::writeEph(const t_eph* eph) {
     393  if (version() < 4.0) {
     394    if (eph->navType() == t_eph::CNAV ||
     395        eph->navType() == t_eph::CNV1 ||
     396        eph->navType() == t_eph::CNV2 ||
     397        eph->navType() == t_eph::CNV3) {
     398      return;
     399    }
     400  }
    393401  *_stream << eph->toString(version());
    394402}
Note: See TracChangeset for help on using the changeset viewer.