Changeset 4414 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Jul 8, 2012, 7:40:58 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM/GPSDecoder.cpp

    r4413 r4414  
    150150  // ---
    151151  if (satSys == 'G') {
    152     if      (rnxStr == "C1C")                     retVal = GNSSENTRY_C1DATA; 
    153     else if (rnxStr == "C1P" || rnxStr == "C1W")  retVal = GNSSENTRY_P1DATA; 
    154     else if (rnxStr == "C1N")                     retVal = GNSSENTRY_C1NDATA;
    155     else if (rnxStr == "L1C")                     retVal = GNSSENTRY_L1CDATA;
    156     else if (rnxStr == "L1P" || rnxStr == "L1W")  retVal = GNSSENTRY_L1PDATA;
    157     else if (rnxStr == "L1N")                     retVal = GNSSENTRY_L1NDATA;
    158     else if (rnxStr == "D1C")                     retVal = GNSSENTRY_D1CDATA;
    159     else if (rnxStr == "D1P" || rnxStr == "D1W")  retVal = GNSSENTRY_D1PDATA;
    160     else if (rnxStr == "D1N")                     retVal = GNSSENTRY_D1NDATA;
    161     else if (rnxStr == "S1C")                     retVal = GNSSENTRY_S1CDATA;
    162     else if (rnxStr == "S1P" || rnxStr == "S1W")  retVal = GNSSENTRY_S1PDATA;
    163     else if (rnxStr == "S1N")                     retVal = GNSSENTRY_S1NDATA;
    164 
    165     else if (rnxStr == "C2C" || rnxStr == "C2X")  retVal = GNSSENTRY_C2DATA; 
    166     else if (rnxStr == "C2P" || rnxStr == "C2W")  retVal = GNSSENTRY_P2DATA; 
    167     else if (rnxStr == "L2C" || rnxStr == "L2X")  retVal = GNSSENTRY_L2CDATA;
    168     else if (rnxStr == "L2P" || rnxStr == "L2W")  retVal = GNSSENTRY_L2PDATA;
    169     else if (rnxStr == "D2C" || rnxStr == "D2X")  retVal = GNSSENTRY_D2CDATA;
    170     else if (rnxStr == "D2P" || rnxStr == "D2W")  retVal = GNSSENTRY_D2PDATA;
    171     else if (rnxStr == "S2C" || rnxStr == "S2X")  retVal = GNSSENTRY_S2CDATA;
    172     else if (rnxStr == "S2P" || rnxStr == "S2W")  retVal = GNSSENTRY_S2PDATA;
    173 
    174     else if (rnxStr == "C5")                      retVal = GNSSENTRY_C5DATA; 
    175     else if (rnxStr == "D5")                      retVal = GNSSENTRY_D5DATA; 
    176     else if (rnxStr == "L5")                      retVal = GNSSENTRY_L5DATA; 
    177     else if (rnxStr == "S5")                      retVal = GNSSENTRY_S5DATA; 
     152    if      (rnxStr.indexOf(QRegExp("C1[CSLX]")) == 0) retVal = GNSSENTRY_C1DATA; 
     153    else if (rnxStr.indexOf("C1") == 0)                retVal = GNSSENTRY_P1DATA;
     154    else if (rnxStr.indexOf(QRegExp("L1[CSLX]")) == 0) retVal = GNSSENTRY_L1CDATA;
     155    else if (rnxStr.indexOf("L1") == 0)                retVal = GNSSENTRY_L1PDATA;
     156    else if (rnxStr.indexOf(QRegExp("D1[CSLX]")) == 0) retVal = GNSSENTRY_D1CDATA;
     157    else if (rnxStr.indexOf("D1") == 0)                retVal = GNSSENTRY_D1PDATA;
     158    else if (rnxStr.indexOf(QRegExp("S1[CSLX]")) == 0) retVal = GNSSENTRY_S1CDATA;
     159    else if (rnxStr.indexOf("S1") == 0)                retVal = GNSSENTRY_S1PDATA;
     160
     161    else if (rnxStr.indexOf(QRegExp("C2[CSLX]")) == 0) retVal = GNSSENTRY_C2DATA; 
     162    else if (rnxStr.indexOf("C2") == 0)                retVal = GNSSENTRY_P2DATA;
     163    else if (rnxStr.indexOf(QRegExp("L2[CSLX]")) == 0) retVal = GNSSENTRY_L2CDATA;
     164    else if (rnxStr.indexOf("L2") == 0)                retVal = GNSSENTRY_L2PDATA;
     165    else if (rnxStr.indexOf(QRegExp("D2[CSLX]")) == 0) retVal = GNSSENTRY_D2CDATA;
     166    else if (rnxStr.indexOf("D2") == 0)                retVal = GNSSENTRY_D2PDATA;
     167    else if (rnxStr.indexOf(QRegExp("S2[CSLX]")) == 0) retVal = GNSSENTRY_S2CDATA;
     168    else if (rnxStr.indexOf("S2") == 0)                retVal = GNSSENTRY_S2PDATA;
     169
     170    else if (rnxStr.indexOf("C5") == 0)                retVal = GNSSENTRY_C5DATA; 
     171    else if (rnxStr.indexOf("D5") == 0)                retVal = GNSSENTRY_D5DATA; 
     172    else if (rnxStr.indexOf("L5") == 0)                retVal = GNSSENTRY_L5DATA; 
     173    else if (rnxStr.indexOf("S5") == 0)                retVal = GNSSENTRY_S5DATA; 
    178174  }
    179175
     
    181177  // -------
    182178  else if (satSys == 'R') {
    183     if      (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA; 
    184     else if (rnxStr == "C1P") retVal = GNSSENTRY_P1DATA; 
    185     else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA;
    186     else if (rnxStr == "L1P") retVal = GNSSENTRY_L1PDATA;
    187     else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA;
    188     else if (rnxStr == "D1P") retVal = GNSSENTRY_D1PDATA;
    189     else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA;
    190     else if (rnxStr == "S1P") retVal = GNSSENTRY_S1PDATA;
    191 
    192     else if (rnxStr == "C2C") retVal = GNSSENTRY_C2DATA; 
    193     else if (rnxStr == "C2P") retVal = GNSSENTRY_P2DATA; 
    194     else if (rnxStr == "L2C") retVal = GNSSENTRY_L2CDATA;
    195     else if (rnxStr == "L2P") retVal = GNSSENTRY_L2PDATA;
    196     else if (rnxStr == "D2C") retVal = GNSSENTRY_D2CDATA;
    197     else if (rnxStr == "D2P") retVal = GNSSENTRY_D2PDATA;
    198     else if (rnxStr == "S2C") retVal = GNSSENTRY_S2CDATA;
    199     else if (rnxStr == "S2P") retVal = GNSSENTRY_S2PDATA;
     179    if      (rnxStr == "C1C")           retVal = GNSSENTRY_C1DATA; 
     180    else if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_P1DATA; 
     181    else if (rnxStr == "L1C")           retVal = GNSSENTRY_L1CDATA;
     182    else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1PDATA;
     183    else if (rnxStr == "D1C")           retVal = GNSSENTRY_D1CDATA;
     184    else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1PDATA;
     185    else if (rnxStr == "S1C")           retVal = GNSSENTRY_S1CDATA;
     186    else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA;
     187
     188    else if (rnxStr == "C2C")           retVal = GNSSENTRY_C2DATA; 
     189    else if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_P2DATA; 
     190    else if (rnxStr == "L2C")           retVal = GNSSENTRY_L2CDATA;
     191    else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_L2PDATA;
     192    else if (rnxStr == "D2C")           retVal = GNSSENTRY_D2CDATA;
     193    else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_D2PDATA;
     194    else if (rnxStr == "S2C")           retVal = GNSSENTRY_S2CDATA;
     195    else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_S2PDATA;
    200196  }
    201197
     
    203199  // -------
    204200  else if (satSys == 'E') {
    205     if      (rnxStr == "C1") retVal = GNSSENTRY_C1DATA;   
    206     else if (rnxStr == "L1") retVal = GNSSENTRY_L1CDATA; 
    207     else if (rnxStr == "D1") retVal = GNSSENTRY_D1CDATA; 
    208     else if (rnxStr == "S1") retVal = GNSSENTRY_S1CDATA; 
    209 
    210     else if (rnxStr == "C5") retVal = GNSSENTRY_C5DATA;   
    211     else if (rnxStr == "L5") retVal = GNSSENTRY_L5DATA;   
    212     else if (rnxStr == "D5") retVal = GNSSENTRY_D5DATA;   
    213     else if (rnxStr == "S5") retVal = GNSSENTRY_S5DATA;   
    214     else if (rnxStr == "C6") retVal = GNSSENTRY_C6DATA;   
    215 
    216     else if (rnxStr == "L6") retVal = GNSSENTRY_L6DATA;   
    217     else if (rnxStr == "D6") retVal = GNSSENTRY_D6DATA;   
    218     else if (rnxStr == "S6") retVal = GNSSENTRY_S6DATA;   
    219 
    220     else if (rnxStr == "C7") retVal = GNSSENTRY_C5BDATA; 
    221     else if (rnxStr == "L7") retVal = GNSSENTRY_L5BDATA; 
    222     else if (rnxStr == "D7") retVal = GNSSENTRY_D5BDATA; 
    223     else if (rnxStr == "S7") retVal = GNSSENTRY_S5BDATA; 
    224 
    225     else if (rnxStr == "C8") retVal = GNSSENTRY_C5ABDATA;
    226     else if (rnxStr == "L8") retVal = GNSSENTRY_L5ABDATA;
    227     else if (rnxStr == "D8") retVal = GNSSENTRY_D5ABDATA;
    228     else if (rnxStr == "S8") retVal = GNSSENTRY_S5ABDATA;
     201    if      (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_C1DATA;   
     202    else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1CDATA; 
     203    else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1CDATA; 
     204    else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1CDATA; 
     205
     206    else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA;   
     207    else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA;   
     208    else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA;   
     209    else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA;   
     210
     211    else if (rnxStr.indexOf("C6") == 0)  retVal = GNSSENTRY_C6DATA;   
     212    else if (rnxStr.indexOf("L6") == 0) retVal = GNSSENTRY_L6DATA;   
     213    else if (rnxStr.indexOf("D6") == 0) retVal = GNSSENTRY_D6DATA;   
     214    else if (rnxStr.indexOf("S6") == 0) retVal = GNSSENTRY_S6DATA;   
     215
     216    else if (rnxStr.indexOf("C7") == 0) retVal = GNSSENTRY_C5BDATA; 
     217    else if (rnxStr.indexOf("L7") == 0) retVal = GNSSENTRY_L5BDATA; 
     218    else if (rnxStr.indexOf("D7") == 0) retVal = GNSSENTRY_D5BDATA; 
     219    else if (rnxStr.indexOf("S7") == 0) retVal = GNSSENTRY_S5BDATA; 
     220
     221    else if (rnxStr.indexOf("C8") == 0) retVal = GNSSENTRY_C5ABDATA;
     222    else if (rnxStr.indexOf("L8") == 0) retVal = GNSSENTRY_L5ABDATA;
     223    else if (rnxStr.indexOf("D8") == 0) retVal = GNSSENTRY_D5ABDATA;
     224    else if (rnxStr.indexOf("S8") == 0) retVal = GNSSENTRY_S5ABDATA;
    229225  }
    230226
     
    232228  // ----
    233229  else if (satSys == 'J') {
    234     if      (rnxStr == "C1N") retVal = GNSSENTRY_C1NDATA;   
    235     else if (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA;   
    236     else if (rnxStr == "C1Z") retVal = GNSSENTRY_CSAIFDATA;
    237     else if (rnxStr == "L1N") retVal = GNSSENTRY_L1NDATA;   
    238     else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA;   
    239     else if (rnxStr == "L1Z") retVal = GNSSENTRY_LSAIFDATA;
    240     else if (rnxStr == "D1N") retVal = GNSSENTRY_D1NDATA;   
    241     else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA;   
    242     else if (rnxStr == "D1Z") retVal = GNSSENTRY_DSAIFDATA;
    243     else if (rnxStr == "S1N") retVal = GNSSENTRY_S1NDATA;   
    244     else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA;   
    245     else if (rnxStr == "S1Z") retVal = GNSSENTRY_SSAIFDATA;
    246 
    247     else if (rnxStr == "C2" ) retVal = GNSSENTRY_C2DATA;   
    248     else if (rnxStr == "L2" ) retVal = GNSSENTRY_L2CDATA;   
    249     else if (rnxStr == "D2" ) retVal = GNSSENTRY_D2CDATA;   
    250     else if (rnxStr == "S2" ) retVal = GNSSENTRY_S2CDATA;   
    251 
    252     else if (rnxStr == "C5" ) retVal = GNSSENTRY_C5DATA;   
    253     else if (rnxStr == "L5" ) retVal = GNSSENTRY_L5DATA;   
    254     else if (rnxStr == "D5" ) retVal = GNSSENTRY_D5DATA;   
    255     else if (rnxStr == "S5" ) retVal = GNSSENTRY_S5DATA;   
    256 
    257     else if (rnxStr == "C6" ) retVal = GNSSENTRY_C6DATA;   
    258     else if (rnxStr == "D6" ) retVal = GNSSENTRY_D6DATA;   
    259     else if (rnxStr == "L6" ) retVal = GNSSENTRY_L6DATA;   
    260     else if (rnxStr == "S6" ) retVal = GNSSENTRY_S6DATA;   
     230    if      (rnxStr.indexOf("C1") == 0)  retVal = GNSSENTRY_C1DATA;   
     231    else if (rnxStr.indexOf("L1") == 0)  retVal = GNSSENTRY_L1CDATA; 
     232    else if (rnxStr.indexOf("D1") == 0)  retVal = GNSSENTRY_D1CDATA; 
     233    else if (rnxStr.indexOf("S1") == 0)  retVal = GNSSENTRY_S1CDATA; 
     234
     235    else if (rnxStr.indexOf("C2") == 0)  retVal = GNSSENTRY_C5BDATA; 
     236    else if (rnxStr.indexOf("L2") == 0)  retVal = GNSSENTRY_L5BDATA; 
     237    else if (rnxStr.indexOf("D2") == 0)  retVal = GNSSENTRY_D5BDATA; 
     238    else if (rnxStr.indexOf("S2") == 0)  retVal = GNSSENTRY_S5BDATA; 
     239
     240    else if (rnxStr.indexOf("C5") == 0)  retVal = GNSSENTRY_C5DATA;   
     241    else if (rnxStr.indexOf("L5") == 0)  retVal = GNSSENTRY_L5DATA;   
     242    else if (rnxStr.indexOf("D5") == 0)  retVal = GNSSENTRY_D5DATA;   
     243    else if (rnxStr.indexOf("S5") == 0)  retVal = GNSSENTRY_S5DATA;   
     244
     245    else if (rnxStr.indexOf("C6") == 0)  retVal = GNSSENTRY_C6DATA;   
     246    else if (rnxStr.indexOf("L6") == 0)  retVal = GNSSENTRY_L6DATA;   
     247    else if (rnxStr.indexOf("D6") == 0)  retVal = GNSSENTRY_D6DATA;   
     248    else if (rnxStr.indexOf("S6") == 0)  retVal = GNSSENTRY_S6DATA;   
    261249  }
    262250
     
    264252  // ----
    265253  else if (satSys == 'S') {
    266     if      (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA; 
    267     else if (rnxStr == "C1P") retVal = GNSSENTRY_P1DATA; 
    268     else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA;
    269     else if (rnxStr == "L1P") retVal = GNSSENTRY_L1PDATA;
    270     else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA;
    271     else if (rnxStr == "D1P") retVal = GNSSENTRY_D1PDATA;
    272     else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA;
    273     else if (rnxStr == "S1P") retVal = GNSSENTRY_S1PDATA;
    274 
    275     else if (rnxStr == "C5" ) retVal = GNSSENTRY_C5DATA; 
    276     else if (rnxStr == "L5" ) retVal = GNSSENTRY_L5DATA; 
    277     else if (rnxStr == "D5" ) retVal = GNSSENTRY_D5DATA; 
    278     else if (rnxStr == "S5" ) retVal = GNSSENTRY_S5DATA; 
     254    if      (rnxStr == "C1C")           retVal = GNSSENTRY_C1DATA; 
     255    else if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_P1DATA; 
     256    else if (rnxStr == "L1C")           retVal = GNSSENTRY_L1CDATA;
     257    else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1PDATA;
     258    else if (rnxStr == "D1C")           retVal = GNSSENTRY_D1CDATA;
     259    else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1PDATA;
     260    else if (rnxStr == "S1C")           retVal = GNSSENTRY_S1CDATA;
     261    else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA;
     262
     263    else if (rnxStr.indexOf("C5") == 0)  retVal = GNSSENTRY_C5DATA;  
     264    else if (rnxStr.indexOf("L5") == 0)  retVal = GNSSENTRY_L5DATA;  
     265    else if (rnxStr.indexOf("D5") == 0)  retVal = GNSSENTRY_D5DATA;  
     266    else if (rnxStr.indexOf("S5") == 0)  retVal = GNSSENTRY_S5DATA;  
    279267  }
    280268
     
    282270  // -------
    283271  else if (satSys == 'C') {
    284     if      (rnxStr == "C2I") retVal = GNSSENTRY_CB1DATA;
    285     else if (rnxStr == "L2I") retVal = GNSSENTRY_LB1DATA;
    286     else if (rnxStr == "D2I") retVal = GNSSENTRY_DB1DATA;
    287     else if (rnxStr == "S2I") retVal = GNSSENTRY_SB1DATA;
    288 
    289     else if (rnxStr == "C6I") retVal = GNSSENTRY_CB3DATA;
    290     else if (rnxStr == "L6I") retVal = GNSSENTRY_LB3DATA;
    291     else if (rnxStr == "D6I") retVal = GNSSENTRY_DB3DATA;
    292     else if (rnxStr == "S6I") retVal = GNSSENTRY_SB3DATA;
    293 
    294     else if (rnxStr == "C7I") retVal = GNSSENTRY_CB2DATA;
    295     else if (rnxStr == "L7I") retVal = GNSSENTRY_LB2DATA;
    296     else if (rnxStr == "D7I") retVal = GNSSENTRY_DB2DATA;
    297     else if (rnxStr == "S7I") retVal = GNSSENTRY_SB2DATA;
     272    if      (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_CB1DATA;
     273    else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_LB1DATA;
     274    else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_DB1DATA;
     275    else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_SB1DATA;
     276
     277    else if (rnxStr.indexOf("C6") == 0) retVal = GNSSENTRY_CB3DATA;
     278    else if (rnxStr.indexOf("L6") == 0) retVal = GNSSENTRY_LB3DATA;
     279    else if (rnxStr.indexOf("D6") == 0) retVal = GNSSENTRY_DB3DATA;
     280    else if (rnxStr.indexOf("S6") == 0) retVal = GNSSENTRY_SB3DATA;
     281
     282    else if (rnxStr.indexOf("C7") == 0) retVal = GNSSENTRY_CB2DATA;
     283    else if (rnxStr.indexOf("L7") == 0) retVal = GNSSENTRY_LB2DATA;
     284    else if (rnxStr.indexOf("D7") == 0) retVal = GNSSENTRY_DB2DATA;
     285    else if (rnxStr.indexOf("S7") == 0) retVal = GNSSENTRY_SB2DATA;
    298286  }
    299287
Note: See TracChangeset for help on using the changeset viewer.