Changeset 2291 in ntrip


Ignore:
Timestamp:
Feb 12, 2010, 6:56:44 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r2107 r2291  
    400400        co.SatRefDatum       = DATUM_ITRF;
    401401     
     402        struct Bias bias;
     403        memset(&bias, 0, sizeof(bias));
     404        bias.GPSEpochTime      = (int)GPSweeks;
     405        bias.GLONASSEpochTime  = (int)fmod(GPSweeks, 86400.0)
     406                               + 3 * 3600 - gnumleap(year, month, day);
     407
    402408        for (int ii = 0; ii < lines.size(); ii++) {
    403409
    404410          QString      prn;
    405           ColumnVector xx(8); xx = 0.0;
     411          ColumnVector xx(10); xx = 0.0;
    406412          t_eph*       ep = 0;
    407413     
     
    412418            if ( _ephList.contains(prn) ) {
    413419              in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5)
    414                  >> xx(6) >> xx(7) >> xx(8);
     420                 >> xx(6) >> xx(7) >> xx(8) >> xx(9) >> xx(10);
    415421              xx(1) *= 1e3;     // x-crd
    416422              xx(2) *= 1e3;     // y-crd
     
    419425              xx(5) *= 1e-6;    // rel. corr.
    420426                                // xx(6), xx(7), xx(8) ... PhaseCent - CoM
     427                                // xx(9) P1-C1 DCB, xx(1) P1-P2 DCB
    421428
    422429              t_ephPair* pair = _ephList[prn];
     
    457464              _caster.at(ic)->printAscii(outLine);
    458465            }
     466
     467            struct Bias::BiasSat* biasSat = 0;
     468            if      (prn[0] == 'G') {
     469              biasSat = bias.Sat + bias.NumberOfGPSSat;
     470              ++bias.NumberOfGPSSat;
     471            }
     472            else if (prn[0] == 'R') {
     473              biasSat = bias.Sat + CLOCKORBIT_NUMGPS + bias.NumberOfGLONASSSat;
     474              ++bias.NumberOfGLONASSSat;
     475            }
     476
     477            if (biasSat) {
     478              //// TODO: fill biasSat structure
     479            }
    459480          }
    460481        }
     
    472493
    473494          int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
     495          if (len > 0) {
     496            if (_caster.at(ic)->ic() == 1) { emit(newOutBytes1(len));}
     497            if (_caster.at(ic)->ic() == 2) { emit(newOutBytes2(len));}
     498            if (_caster.at(ic)->ic() == 3) { emit(newOutBytes3(len));}
     499            _caster.at(ic)->write(obuffer, len);
     500          }
     501        }
     502
     503        if ( _caster.at(ic)->usedSocket() &&
     504             (bias.NumberOfGPSSat > 0 || bias.NumberOfGLONASSSat > 0) ) {
     505          char obuffer[CLOCKORBIT_BUFFERSIZE];
     506
     507          int len = MakeBias(&bias, BTYPE_AUTO, 0, obuffer, sizeof(obuffer));
    474508          if (len > 0) {
    475509            if (_caster.at(ic)->ic() == 1) { emit(newOutBytes1(len));}
Note: See TracChangeset for help on using the changeset viewer.