Changeset 10587 in ntrip for trunk/BNC/src/bncutils.cpp


Ignore:
Timestamp:
Dec 10, 2024, 3:57:21 PM (3 days ago)
Author:
stuerze
Message:

RINEX version 4.02 updates

File:
1 edited

Legend:

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

    r10577 r10587  
    266266
    267267  // update interval: 2h, data sets are valid for 4 hours
    268   if      (eph->type() == t_eph::GPS     && (dt > 14400.0 || dt < -7200.0)) {
     268  if      (eph->system() == t_eph::GPS     && (dt > 14400.0 || dt < -7200.0)) {
    269269    return true;
    270270  }
    271271  // update interval: 3h, data sets are valid for 4 hours
    272   else if (eph->type() == t_eph::Galileo && (dt > 14400.0 || dt <     0.0)) {
     272  else if (eph->system() == t_eph::Galileo && (dt > 14400.0 || dt <     0.0)) {
    273273    return true;
    274274  }
    275275  // updated every 30 minutes + 5 min
    276   else if (eph->type() == t_eph::GLONASS && (dt >  2100.0 || dt < -2100.0)) {
     276  else if (eph->system() == t_eph::GLONASS && (dt >  2100.0 || dt < -2100.0)) {
    277277    return true;
    278278  }
    279279  // orbit parameters are valid for 7200 seconds (minimum)
    280   else if (eph->type() == t_eph::QZSS    && (dt >  7200.0 || dt < -3600.0)) {
     280  else if (eph->system() == t_eph::QZSS    && (dt >  7200.0 || dt < -3600.0)) {
    281281    return true;
    282282  }
    283283  // maximum update interval: 300 sec
    284   else if (eph->type() == t_eph::SBAS    && (dt >   600.0 || dt <  -600.0)) {
     284  else if (eph->system() == t_eph::SBAS    && (dt >   600.0 || dt <  -600.0)) {
    285285    return true;
    286286  }
    287287  // updates 1h + 5 min
    288   else if (eph->type() == t_eph::BDS     && (dt >  3900.0 || dt <     0.0) ) {
     288  else if (eph->system() == t_eph::BDS     && (dt >  3900.0 || dt <     0.0) ) {
    289289    return true;
    290290  }
    291291  // update interval: up to 24 hours
    292   else if (eph->type() == t_eph::IRNSS   && (fabs(dt > 86400.0))) {
     292  else if (eph->system() == t_eph::IRNSS   && (fabs(dt > 86400.0))) {
    293293    return true;
    294294  }
     
    845845//
    846846////////////////////////////////////////////////////////////////////////////
    847 double accuracyFromIndex(int index, t_eph::e_type type) {
     847double accuracyFromIndex(int index, t_eph::e_system system) {
    848848double accuracy = -1.0;
    849849
    850   if (type == t_eph::GPS ||
    851       type == t_eph::BDS ||
    852       type == t_eph::SBAS||
    853       type == t_eph::QZSS||
    854       type == t_eph::IRNSS) {
     850  if (system == t_eph::GPS ||
     851      system == t_eph::BDS ||
     852      system == t_eph::SBAS||
     853      system == t_eph::QZSS||
     854      system == t_eph::IRNSS) {
    855855    if ((index >= 0) && (index <= 6)) {
    856856      if (index == 3) {
     
    869869    }
    870870  }
    871   else if (type == t_eph::Galileo) {
     871  else if (system == t_eph::Galileo) {
    872872    if ((index >= 0) && (index <= 49)) {
    873873      accuracy = (double(index) / 100.0);
     
    891891//
    892892////////////////////////////////////////////////////////////////////////////
    893 int indexFromAccuracy(double accuracy, t_eph::e_type type) {
    894 
    895   if (type == t_eph::GPS ||
    896       type == t_eph::BDS ||
    897       type == t_eph::SBAS ||
    898       type == t_eph::QZSS ||
    899       type == t_eph::IRNSS) {
     893int indexFromAccuracy(double accuracy, t_eph::e_system system) {
     894
     895  if (system == t_eph::GPS ||
     896      system == t_eph::BDS ||
     897      system == t_eph::SBAS ||
     898      system == t_eph::QZSS ||
     899      system == t_eph::IRNSS) {
    900900
    901901    if      (accuracy <= 2.40) {
     
    949949  }
    950950
    951   if (type == t_eph::Galileo) {
     951  if (system == t_eph::Galileo) {
    952952    if      (accuracy <= 0.49) {
    953953      return int(ceil(accuracy * 100.0));
     
    967967  }
    968968
    969   return (type == t_eph::Galileo) ? 255 : 15;
     969  return (system == t_eph::Galileo) ? 255 : 15;
    970970}
    971971
    972972// Returns fit interval in hours from flag
    973973////////////////////////////////////////////////////////////////////////////
    974 double fitIntervalFromFlag(int flag, double iodc, t_eph::e_type type) {
     974double fitIntervalFromFlag(int flag, double iodc, t_eph::e_system system) {
    975975  double fitInterval = 0.0;
    976976
    977977  switch (flag) {
    978978    case 0:
    979       if      (type == t_eph::GPS) {
     979      if      (system == t_eph::GPS) {
    980980        fitInterval = 4.0;
    981981      }
    982       else if (type == t_eph::QZSS) {
     982      else if (system == t_eph::QZSS) {
    983983        fitInterval = 2.0;
    984984      }
    985985      break;
    986986    case 1:
    987       if (type == t_eph::GPS) {
     987      if (system == t_eph::GPS) {
    988988        if      (iodc >= 240 && iodc <= 247) {
    989989          fitInterval =  8.0;
Note: See TracChangeset for help on using the changeset viewer.