Changeset 214 in ntrip for trunk/BNC


Ignore:
Timestamp:
Oct 6, 2006, 5:12:52 PM (18 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM/RTCM2.cpp

    r210 r214  
    10591059void RTCM2::Decode(char* buffer, int bufLen) {
    10601060
    1061   rtcm2::RTCM2packet PP;
    1062   rtcm2::RTCM2_Obs   ObsBlock;
    1063  
    10641061  _buffer.append(buffer, bufLen);
    10651062
     
    10691066
    10701067  while(true) {
    1071     PP.getPacket(_buffer);
    1072     if (!PP.valid()) break;
    1073 
    1074     if ( PP.ID()==18 || PP.ID()==19 ) {   
    1075       ObsBlock.extract(PP);
    1076       if (!ObsBlock.valid()) continue;
     1068    _PP.getPacket(_buffer);
     1069    if (!_PP.valid()) break;
     1070
     1071    if ( _PP.ID()==18 || _PP.ID()==19 ) {   
     1072      _ObsBlock.extract(_PP);
     1073      if (!_ObsBlock.valid()) continue;
    10771074
    10781075      int    epochWeek;
    10791076      double epochSecs;
    1080       ObsBlock.resolveEpoch(refWeek, refSecs, epochWeek, epochSecs);
     1077      _ObsBlock.resolveEpoch(refWeek, refSecs, epochWeek, epochSecs);
    10811078       
    1082       for (int iSat=0; iSat < ObsBlock.nSat; iSat++) {
    1083         if (ObsBlock.PRN[iSat] <= 32) {
     1079      for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) {
     1080        if (_ObsBlock.PRN[iSat] <= 32) {
    10841081          Observation* obs = new Observation();
    10851082
    1086           obs->SVPRN          = ObsBlock.PRN[iSat];
     1083          obs->SVPRN          = _ObsBlock.PRN[iSat];
    10871084          obs->GPSWeek        = epochWeek;
    10881085          obs->GPSWeeks       = (int) epochSecs;
    1089           obs->sec            = ObsBlock.secs;
     1086          obs->sec            = _ObsBlock.secs;
    10901087          obs->pCodeIndicator = 0;
    1091           obs->C1 = ObsBlock.rng_C1[iSat];
    1092           obs->P2 = ObsBlock.rng_P2[iSat];
    1093           obs->L1 = ObsBlock.resolvedPhase_L1(iSat);
    1094           obs->L2 = ObsBlock.resolvedPhase_L2(iSat);
     1088          obs->C1 = _ObsBlock.rng_C1[iSat];
     1089          obs->P2 = _ObsBlock.rng_P2[iSat];
     1090          obs->L1 = _ObsBlock.resolvedPhase_L1(iSat);
     1091          obs->L2 = _ObsBlock.resolvedPhase_L2(iSat);
    10951092
    10961093          m_lObsList.push_back(obs);
     
    10981095      }
    10991096
    1100       ObsBlock.clear();
     1097      _ObsBlock.clear();
    11011098    }
    11021099  }
  • trunk/BNC/RTCM/RTCM2.h

    r207 r214  
    3838#include <vector>
    3939
    40 // ---------------- begin added by LM --------------------------------------
    41 #include "GPSDecoder.h"
    42 class RTCM2 : public GPSDecoder {
    43   public:
    44     RTCM2();
    45     ~RTCM2();
    46     void Decode(char* buffer = 0, int bufLen = 0);
    47   private:
    48     string _buffer;
    49 };
    50 // ----------------- end added by LM ---------------------------------------
    51 
    5240//
    5341// namespace rtcm2
     
    337325}; // End of namespace rtcm2
    338326
     327// ---------------- begin added by LM --------------------------------------
     328#include "GPSDecoder.h"
     329class RTCM2 : public GPSDecoder {
     330  public:
     331    RTCM2();
     332    ~RTCM2();
     333    void Decode(char* buffer = 0, int bufLen = 0);
     334  private:
     335    string _buffer;
     336    rtcm2::RTCM2_Obs   _ObsBlock;
     337    rtcm2::RTCM2packet _PP;
     338};
     339// ----------------- end added by LM ---------------------------------------
     340
    339341#endif  // include blocker
  • trunk/BNC/bncgetthread.cpp

    r207 r214  
    8383  hlp.setPath(mountPoint.path());
    8484
    85   if (hlp.path().isEmpty()) {
    86     hlp.setPath("/");
    87   }
    88 
    89   QByteArray  reqStr = "GET " + hlp.path().toAscii() +
    90                        " HTTP/1.0\r\n"
    91                        "User-Agent: NTRIP BNC 1.0\r\n"
    92                        "Authorization: Basic " +
    93                        userAndPwd.toBase64() + "\r\n\r\n";
     85  QByteArray reqStr;
     86  if ( proxyHost.isEmpty() ) {
     87   if (hlp.path().indexOf("/") != 0) hlp.setPath("/");
     88   reqStr = "GET " + hlp.path().toAscii() +
     89            " HTTP/1.0\r\n"
     90            "User-Agent: NTRIP BNC 1.0\r\n"
     91            "Authorization: Basic " +
     92            userAndPwd.toBase64() + "\r\n\r\n";
     93   } else {
     94   reqStr = "GET " + hlp.toEncoded() +
     95            " HTTP/1.0\r\n"
     96            "User-Agent: NTRIP BNC 1.0\r\n"
     97            "Authorization: Basic " +
     98            userAndPwd.toBase64() + "\r\n\r\n";
     99  }
    94100
    95101  msg += reqStr;
  • trunk/BNC/bncutils.cpp

    r210 r214  
    6060  QTime time = QTime::currentTime();
    6161
    62   double deltat = date.toJulianDay() - 2400000.5 - 44244.0 +
     62  double deltat = double(date.toJulianDay()) - 2444244.0 +
    6363           ((( time.msec() / 1000.0
    6464             + time.second() ) / 60.0
Note: See TracChangeset for help on using the changeset viewer.