Ignore:
Timestamp:
Dec 26, 2014, 12:03:26 PM (9 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r6441 r6442  
    7373  }
    7474  else {
    75     _usedEph = new QMap<QString, t_eph*>;
     75    _usedEph = new QMap<QString, const t_eph*>;
    7676  }
    7777
     
    348348    in >> prn;
    349349
    350     t_eph* eph = 0;
    351     const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);
    352     if (ephPair) {
    353 
    354       eph = ephPair->last;
     350    const t_eph* ephLast = _ephUser->ephLast(prn);
     351    const t_eph* ephPrev = _ephUser->ephPrev(prn);
     352    const t_eph* eph     = ephLast;
     353
     354    if (eph) {
    355355
    356356      // Use previous ephemeris if the last one is too recent
    357357      // ----------------------------------------------------
    358358      const int MINAGE = 60; // seconds
    359       if (ephPair->prev && eph->receptDateTime().isValid() &&
     359      if (ephPrev && eph->receptDateTime().isValid() &&
    360360          eph->receptDateTime().secsTo(currentDateAndTimeGPS()) < MINAGE) {
    361         eph = ephPair->prev;
     361        eph = ephPrev;
    362362      }
    363363
     
    371371          eph = 0;
    372372          if (_usedEph->contains(prn)) {
    373             t_eph* usedEph = _usedEph->value(prn);
    374             if      (usedEph == ephPair->last) {
    375               eph = ephPair->last;
    376             }
    377             else if (usedEph == ephPair->prev) {
    378               eph = ephPair->prev;
     373            const t_eph* usedEph = _usedEph->value(prn);
     374            if      (usedEph == ephLast) {
     375              eph = ephLast;
     376            }
     377            else if (usedEph == ephPrev) {
     378              eph = ephPrev;
    379379            }
    380380          }
     
    638638//
    639639////////////////////////////////////////////////////////////////////////////
    640 void bncRtnetUploadCaster::processSatellite(t_eph* eph, int GPSweek,
     640void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
    641641                                            double GPSweeks, const QString& prn,
    642642                                            const ColumnVector& rtnAPC,
Note: See TracChangeset for help on using the changeset viewer.