Changeset 5589 in ntrip for trunk/BNC


Ignore:
Timestamp:
Dec 1, 2013, 4:45:20 PM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/RTRover
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTRover/bncrtrover.cpp

    r5588 r5589  
    448448      continue;
    449449    }
     450
     451    processFrontEpoch();
     452  }
     453}
    450454   
    451     // Copy observations into rtrover_satObs structures
    452     // ------------------------------------------------
    453     t_epoData* frontEpoData = _epochs.front();
    454     _epochs.erase(_epochs.begin());
    455    
    456     int numSatRover = frontEpoData->_obsRover.size();
    457     rtrover_satObs satObsRover[numSatRover];
    458     for (int ii = 0; ii < numSatRover; ii++) {
    459       const t_obs& obsBnc = frontEpoData->_obsRover[ii];
    460       rtrover_satObs& satObs = satObsRover[ii];
    461       copyObs(obsBnc, satObs);
    462     }
    463    
    464     int numSatBase = frontEpoData->_obsBase.size();
    465     rtrover_satObs satObsBase[numSatBase];
    466     for (int ii = 0; ii < numSatBase; ii++) {
    467       const t_obs& obsBnc = frontEpoData->_obsBase[ii];
    468       rtrover_satObs& satObs = satObsBase[ii];
    469       copyObs(obsBnc, satObs);
    470     }
    471    
    472     delete frontEpoData;
    473    
    474     // Process single epoch
    475     // --------------------
    476     rtrover_output output;
    477     rtrover_processEpoch(numSatRover, satObsRover, numSatBase, satObsBase, &output);
    478    
    479     // Write output
    480     // ---------------------
    481     _outputFile.write(output._log);
    482     _outputFile.flush();
    483    
    484     // Free memory
    485     // -----------
    486     rtrover_freeOutput(&output);
    487     for (int ii = 0; ii < numSatRover; ii++) {
    488       rtrover_satObs& satObs = satObsRover[ii];
    489       delete [] satObs._obs;
    490     }
    491     for (int ii = 0; ii < numSatBase; ii++) {
    492       rtrover_satObs& satObs = satObsBase[ii];
    493       delete [] satObs._obs;
    494     }
    495   }
    496 }
     455//
     456////////////////////////////////////////////////////////////////////////////
     457void t_bncRtrover::processFrontEpoch() {
     458
     459  // Copy observations into rtrover_satObs structures
     460  // ------------------------------------------------
     461  t_epoData* frontEpoData = _epochs.front();
     462  _epochs.erase(_epochs.begin());
     463 
     464  int numSatRover = frontEpoData->_obsRover.size();
     465  rtrover_satObs satObsRover[numSatRover];
     466  for (int ii = 0; ii < numSatRover; ii++) {
     467    const t_obs& obsBnc = frontEpoData->_obsRover[ii];
     468    rtrover_satObs& satObs = satObsRover[ii];
     469    copyObs(obsBnc, satObs);
     470  }
     471 
     472  int numSatBase = frontEpoData->_obsBase.size();
     473  rtrover_satObs satObsBase[numSatBase];
     474  for (int ii = 0; ii < numSatBase; ii++) {
     475    const t_obs& obsBnc = frontEpoData->_obsBase[ii];
     476    rtrover_satObs& satObs = satObsBase[ii];
     477    copyObs(obsBnc, satObs);
     478  }
     479 
     480  delete frontEpoData;
     481 
     482  // Process single epoch
     483  // --------------------
     484  rtrover_output output;
     485  rtrover_processEpoch(numSatRover, satObsRover, numSatBase, satObsBase, &output);
     486 
     487  // Write output
     488  // ---------------------
     489  _outputFile.write(output._log);
     490  _outputFile.flush();
     491 
     492  // Free memory
     493  // -----------
     494  rtrover_freeOutput(&output);
     495  for (int ii = 0; ii < numSatRover; ii++) {
     496    rtrover_satObs& satObs = satObsRover[ii];
     497    delete [] satObs._obs;
     498  }
     499  for (int ii = 0; ii < numSatBase; ii++) {
     500    rtrover_satObs& satObs = satObsBase[ii];
     501    delete [] satObs._obs;
     502  }
     503}
  • trunk/BNC/src/RTRover/bncrtrover.h

    r5525 r5589  
    2929    std::vector<t_obs> _obsBase;
    3030  };
     31  void processFrontEpoch();
    3132  QMutex                  _mutex;
    3233  QByteArray              _mode;
Note: See TracChangeset for help on using the changeset viewer.