AntexReader.cpp

Go to the documentation of this file.
00001 #pragma ident "$Id: AntexReader.cpp 2100 2009-08-26 18:49:14Z architest $"
00002 
00008 //============================================================================
00009 //
00010 //  This file is part of GPSTk, the GPS Toolkit.
00011 //
00012 //  The GPSTk is free software; you can redistribute it and/or modify
00013 //  it under the terms of the GNU Lesser General Public License as published
00014 //  by the Free Software Foundation; either version 2.1 of the License, or
00015 //  any later version.
00016 //
00017 //  The GPSTk is distributed in the hope that it will be useful,
00018 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //  GNU Lesser General Public License for more details.
00021 //
00022 //  You should have received a copy of the GNU Lesser General Public
00023 //  License along with GPSTk; if not, write to the Free Software Foundation,
00024 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 //
00026 //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2009
00027 //
00028 //============================================================================
00029 
00030 
00031 #include "AntexReader.hpp"
00032 
00033 
00034 using namespace std;
00035 using namespace gpstk::StringUtils;
00036 
00037 namespace gpstk
00038 {
00039 
00040 
00041       // Let's define Antex formatting strings.
00042    const string AntexReader::versionString      = "ANTEX VERSION / SYST";
00043    const string AntexReader::pcvTypeString      = "PCV TYPE / REFANT";
00044    const string AntexReader::commentString      = "COMMENT";
00045    const string AntexReader::endOfHeader        = "END OF HEADER";
00046 
00047    const string AntexReader::startOfAntenna     = "START OF ANTENNA";
00048    const string AntexReader::typeSerial         = "TYPE / SERIAL NO";
00049    const string AntexReader::calibrationMethod  = "METH / BY / # / DATE";
00050    const string AntexReader::incrementAzimuth   = "DAZI";
00051    const string AntexReader::zenithGrid         = "ZEN1 / ZEN2 / DZEN";
00052    const string AntexReader::numberFreq         = "# OF FREQUENCIES";
00053    const string AntexReader::validFrom          = "VALID FROM";
00054    const string AntexReader::validUntil         = "VALID UNTIL";
00055    const string AntexReader::sinexCode          = "SINEX CODE";
00056    const string AntexReader::startOfFreq        = "START OF FREQUENCY";
00057    const string AntexReader::antennaEcc         = "NORTH / EAST / UP";
00058    const string AntexReader::endOfFreq          = "END OF FREQUENCY";
00059    const string AntexReader::startOfFreqRMS     = "START OF FREQ RMS";
00060    const string AntexReader::antennaEccRMS      = "NORTH / EAST / UP";
00061    const string AntexReader::endOfFreqRMS       = "END OF FREQ RMS";
00062    const string AntexReader::endOfAntenna       = "END OF ANTENNA";
00063 
00064 
00065 
00066       // Parse a single header line. Returns label.
00067    string AntexReader::parseHeaderLine( const std::string& line )
00068       throw(InvalidAntex)
00069    {
00070 
00071          // Get label. Remove trailing and leading blanks
00072       string label( strip( line.substr(60,20) ) );
00073 
00074 
00075          // Process version line
00076       if( label == versionString )
00077       {
00078          version = asDouble( line.substr(0,8) );
00079          char sys( line[20] );
00080 
00081          switch (sys)
00082          {
00083             case ' ':
00084             case 'G':
00085                system = SatID::systemGPS;
00086                break;
00087             case 'R':
00088                system = SatID::systemGlonass;
00089                break;
00090             case 'E':
00091                system = SatID::systemGalileo;
00092                break;
00093             case 'M':
00094                system = SatID::systemMixed;
00095                break;
00096             default:
00097                InvalidAntex e("Invalid GNSS system in Antex header.");
00098                GPSTK_THROW(e);
00099          }
00100 
00101          return label;
00102 
00103       }  // End of 'if( label == versionString )...'
00104 
00105 
00106          // Process PCV type line
00107       if( label == pcvTypeString )
00108       {
00109          char pcvt( line[0] );
00110 
00111          switch (pcvt)
00112          {
00113             case 'A':
00114                type = absolute;
00115                break;
00116             case 'R':
00117                type = relative;
00118                refAntena = strip( line.substr(20,20) );
00119                if( refAntena == "" )
00120                {
00121                   refAntena = "AOAD/M_T";
00122                }
00123                refAntenaSerial = strip( line.substr(40,20) );
00124                break;
00125             default:
00126                InvalidAntex e("Invalid PCV type in Antex header.");
00127                GPSTK_THROW(e);
00128          }
00129 
00130          return label;
00131 
00132       }  // End of 'if( label == pcvTypeString )...'
00133 
00134 
00135          // Process comments lines
00136       if( label == commentString )
00137       {
00138 
00139             // Get comment and put into 'commentList'
00140          commentList.push_back( strip( line.substr(0,60) ) );
00141 
00142          return label;
00143 
00144       }  // End of 'if( label == commentString )...'
00145 
00146 
00147          // Just in case none of the previous cases applied
00148       return label;
00149 
00150 
00151    }  // End of method 'AntexReader::parseHeaderLine()'
00152 
00153 
00154 
00155       // Fill most Antenna data
00156    Antenna AntexReader::fillAntennaData( const std::string& firstLine )
00157    {
00158 
00159          // These flags take care of "Valid From" and "Valid Until"
00160       bool validFromPresent(false);
00161       bool validUntilPresent(false);
00162 
00163          // Create 'Antenna' object to be returned
00164       Antenna antenna;
00165 
00166          // Fill antenna with information in first line
00167       antenna.setAntennaType( strip( firstLine.substr(0,15) ) );
00168       antenna.setAntennaRadome( strip( firstLine.substr(16,4) ) );
00169       antenna.setAntennaSerial( strip( firstLine.substr(20,20) ) );
00170 
00171       antenna.setAntennaData( Antenna::cnnn,
00172                               strip( firstLine.substr(40,10) ) );
00173       antenna.setAntennaData( Antenna::cosparID,
00174                               strip( firstLine.substr(50,10) ) );
00175 
00176          // Read the rest of data
00177       std::string line;
00178 
00179          // Read one line from file
00180       formattedGetLine(line, true);
00181 
00182       std::string label( strip( line.substr(60,20) ) );
00183 
00184          // Repeat until 'endOfAntenna' line
00185       while( label != endOfAntenna )
00186       {
00187 
00188             // Process 'calibrationMethod' line
00189          if( label == calibrationMethod )
00190          {
00191                // Get antenna calibration method
00192             antenna.setAntennaCalMethod( strip( line.substr(0,20) ) );
00193                // Get antenna calibration agency
00194             antenna.setAntennaData( Antenna::agency,
00195                                     strip( line.substr(20,20) ) );
00196                // Get number of individual antennas calibrated
00197             antenna.setAntennaData( Antenna::numAntennas,
00198                                     strip( line.substr(40,6) ) );
00199                // Get calibration date
00200             antenna.setAntennaData( Antenna::date,
00201                                     strip( line.substr(50,10) ) );
00202 
00203          }  // End of 'if( label == calibrationMethod )...'
00204 
00205             // Process 'incrementAzimuth' line
00206          if( label == incrementAzimuth )
00207          {
00208             antenna.setDazi( asDouble( strip( line.substr(2,6) ) ) );
00209          }
00210 
00211             // Process 'zenithGrid' line
00212          if( label == zenithGrid )
00213          {
00214             antenna.setZen1( asDouble( strip( line.substr(2,6) ) ) );
00215             antenna.setZen2( asDouble( strip( line.substr(8,6) ) ) );
00216             antenna.setDzen( asDouble( strip( line.substr(14,6) ) ) );
00217          }
00218 
00219             // Process 'numberFreq' line
00220          if( label == numberFreq )
00221          {
00222             antenna.setNumFreq( asInt( strip( line.substr(0,6) ) ) );
00223          }
00224 
00225             // Process 'validFrom' line
00226          if( label == validFrom )
00227          {
00228                // Get validity as Year, Month, Day, Hour, Min, Sec
00229             DayTime valFrom( asInt( strip( line.substr(0,6) ) ),
00230                             asInt( strip( line.substr(6,6) ) ),
00231                             asInt( strip( line.substr(12,6) ) ),
00232                             asInt( strip( line.substr(18,6) ) ),
00233                             asInt( strip( line.substr(24,6) ) ),
00234                             asDouble( strip( line.substr(30,13) ) ) );
00235 
00236             antenna.setAntennaValidFrom( valFrom );
00237 
00238                // Mark that we found "Valid From"
00239             validFromPresent = true;
00240          }
00241 
00242             // Process 'validUntil' line
00243          if( label == validUntil )
00244          {
00245                // Get validity as Year, Month, Day, Hour, Min, Sec
00246             DayTime valUntil( asInt( strip( line.substr(0,6) ) ),
00247                              asInt( strip( line.substr(6,6) ) ),
00248                              asInt( strip( line.substr(12,6) ) ),
00249                              asInt( strip( line.substr(18,6) ) ),
00250                              asInt( strip( line.substr(24,6) ) ),
00251                              asDouble( strip( line.substr(30,13) ) ) );
00252 
00253             antenna.setAntennaValidUntil( valUntil );
00254 
00255                // Mark that we found "Valid Until"
00256             validUntilPresent = true;
00257          }
00258 
00259             // Process 'sinexCode' line
00260          if( label == sinexCode )
00261          {
00262                // Get antenna Sinex Code
00263             antenna.setAntennaData( Antenna::sinexCode,
00264                                     strip( line.substr(0,10) ) );
00265          }
00266 
00267             // Process 'commentString' line
00268          if( label == commentString )
00269          {
00270                // Add antenna comment
00271             antenna.addAntennaComments( strip( line.substr(0,60) ) );
00272          }
00273 
00274 
00275             // Process frequency info
00276          if( label == startOfFreq )
00277          {
00278 
00279                // Get frequency indicator
00280             std::string freqString( strip( line.substr(3,3) ) );
00281 
00282                // Set frequency type
00283             Antenna::frequencyType freq;
00284 
00285             if( freqString == "G01" ) freq = Antenna::G01;
00286             else if( freqString == "G02" ) freq = Antenna::G02;
00287             else if( freqString == "G05" ) freq = Antenna::G05;
00288             else if( freqString == "R01" ) freq = Antenna::R01;
00289             else if( freqString == "R02" ) freq = Antenna::R02;
00290             else if( freqString == "E01" ) freq = Antenna::E01;
00291             else if( freqString == "E05" ) freq = Antenna::E05;
00292             else if( freqString == "E07" ) freq = Antenna::E07;
00293             else if( freqString == "E08" ) freq = Antenna::E08;
00294             else if( freqString == "E06" ) freq = Antenna::E06;
00295 
00296                // Read new line and extract label
00297             formattedGetLine(line, true);
00298             label = strip( line.substr(60,20) );
00299 
00300                // Repeat until 'endOfFreq' line
00301             while( label != endOfFreq )
00302             {
00303 
00304                   // Process 'antennaEcc' line
00305                if( label == antennaEcc )
00306                {
00307                      // Add antenna eccentricities, as METERS
00308                   antenna.addAntennaEcc( freq,
00309                               asDouble( strip( line.substr(0,10)  ) ) / 1000.0,
00310                               asDouble( strip( line.substr(10,10) ) ) / 1000.0,
00311                               asDouble( strip( line.substr(20,10) ) ) / 1000.0);
00312                }
00313                else
00314                {
00315                      // Check if this line contains "NOAZI" pattern
00316                   if( strip( line.substr(3,5) ) == "NOAZI" )
00317                   {
00318                         // We need a vector to store values
00319                      std::vector<double> pcVec;
00320 
00321                         // Get 'NOAZI' out of our way
00322                      stripFirstWord(line);
00323 
00324                         // Extract values (they are in milimeters)
00325                      for(double zen =  antenna.getZen1();
00326                                 zen <= antenna.getZen2();
00327                                 zen += antenna.getDzen() )
00328                      {
00329                         double value( asDouble( stripFirstWord(line) ) );
00330                            // Store values as meters
00331                         pcVec.push_back( (value / 1000.0 ) );
00332                      }
00333 
00334                         // Add pattern to antenna
00335                      antenna.addAntennaNoAziPattern( freq,
00336                                                      pcVec );
00337                   }
00338                   else
00339                   {
00340                         // This part processes azimuth-dependent patterns
00341 
00342                         // We need a vector to store values
00343                      std::vector<double> pcVec;
00344 
00345                         // Get 'azimuth
00346                      double azi( asDouble( stripFirstWord(line) ) );
00347 
00348                         // Extract values (they are in milimeters)
00349                      for(double zen =  antenna.getZen1();
00350                                 zen <= antenna.getZen2();
00351                                 zen += antenna.getDzen() )
00352                      {
00353                         double value( asDouble( stripFirstWord(line) ) );
00354                            // Store values as meters
00355                         pcVec.push_back( (value / 1000.0 ) );
00356                      }
00357 
00358                         // Add pattern to antenna
00359                      antenna.addAntennaPattern( freq,
00360                                                 azi,
00361                                                 pcVec );
00362 
00363                   }  // End of 'if( strip( line.substr(3,5) ) == "NOAZI" )...'
00364 
00365                }  // End of 'if( label == antennaEcc )...'
00366 
00367                   // Read new line and extract label
00368                formattedGetLine(line, true);
00369 
00370                label = strip( line.substr(60,20) );
00371 
00372             }  // End of 'while( label != endOfFreq )...'
00373 
00374          }  // End of 'if( label == startOfFreq )...'
00375 
00376 
00377 
00378             // Process frequency RMS info
00379          if( label == startOfFreqRMS )
00380          {
00381 
00382                // Get frequency indicator
00383             std::string freqString( strip( line.substr(3,3) ) );
00384 
00385                // Set frequency type
00386             Antenna::frequencyType freq;
00387 
00388             if( freqString == "G01" ) freq = Antenna::G01;
00389             else if( freqString == "G02" ) freq = Antenna::G02;
00390             else if( freqString == "G05" ) freq = Antenna::G05;
00391             else if( freqString == "R01" ) freq = Antenna::R01;
00392             else if( freqString == "R02" ) freq = Antenna::R02;
00393             else if( freqString == "E01" ) freq = Antenna::E01;
00394             else if( freqString == "E05" ) freq = Antenna::E05;
00395             else if( freqString == "E07" ) freq = Antenna::E07;
00396             else if( freqString == "E08" ) freq = Antenna::E08;
00397             else if( freqString == "E06" ) freq = Antenna::E06;
00398 
00399                // Read new line and extract label
00400             formattedGetLine(line, true);
00401             label = strip( line.substr(60,20) );
00402 
00403                // Repeat until 'endOfFreqRMS' line
00404             while( label != endOfFreqRMS )
00405             {
00406 
00407                   // Process 'antennaEccRMS' line
00408                if( label == antennaEccRMS )
00409                {
00410                      // Add antenna eccentricities RMS, as METERS
00411                   antenna.addAntennaRMSEcc( freq,
00412                               asDouble( strip( line.substr(0,10)  ) ) / 1000.0,
00413                               asDouble( strip( line.substr(10,10) ) ) / 1000.0,
00414                               asDouble( strip( line.substr(20,10) ) ) / 1000.0);
00415                }
00416                else
00417                {
00418                      // Check if this line contains "NOAZI" pattern RMS
00419                   if( strip( line.substr(3,5) ) == "NOAZI" )
00420                   {
00421                         // We need a vector to store RMS values
00422                      std::vector<double> pcRMS;
00423 
00424                         // Get 'NOAZI' out of our way
00425                      stripFirstWord(line);
00426 
00427                         // Extract values (they are in milimeters)
00428                      for(double zen =  antenna.getZen1();
00429                                 zen <= antenna.getZen2();
00430                                 zen += antenna.getDzen() )
00431                      {
00432                         double value( asDouble( stripFirstWord(line) ) );
00433                            // Store RMS values values as meters
00434                         pcRMS.push_back( (value / 1000.0 ) );
00435                      }
00436 
00437                         // Add pattern RMS to antenna
00438                      antenna.addAntennaNoAziRMS( freq,
00439                                                  pcRMS );
00440                   }
00441                   else
00442                   {
00443                         // This part processes azimuth-dependent patterns RMS
00444 
00445                         // We need a vector to store RMS values
00446                      std::vector<double> pcRMS;
00447 
00448                         // Get 'azimuth
00449                      double azi( asDouble( stripFirstWord(line) ) );
00450 
00451                         // Extract values (they are in milimeters)
00452                      for(double zen =  antenna.getZen1();
00453                                 zen <= antenna.getZen2();
00454                                 zen += antenna.getDzen() )
00455                      {
00456                         double value( asDouble( stripFirstWord(line) ) );
00457                            // Store RMS values as meters
00458                         pcRMS.push_back( (value / 1000.0 ) );
00459                      }
00460 
00461                         // Add pattern RMS to antenna
00462                      antenna.addAntennaPatternRMS( freq,
00463                                                    azi,
00464                                                    pcRMS );
00465 
00466                   }  // End of 'if( strip( line.substr(3,5) ) == "NOAZI" )...'
00467 
00468                }  // End of 'if( label == antennaEccRMS )...'
00469 
00470                   // Read new line and extract label
00471                formattedGetLine(line, true);
00472 
00473                label = strip( line.substr(60,20) );
00474 
00475             }  // End of 'while( label != endOfFreqRMS )...'
00476 
00477          }  // End of 'if( label == startOfFreqRMS )...'
00478 
00479 
00480             // Read another line from file
00481          formattedGetLine(line, true);
00482 
00483             // Get current label
00484          label = strip( line.substr(60,20) );
00485       }
00486 
00487          // Take care of "Valid From" field if it wasn't present
00488       if( !validFromPresent )
00489       {
00490             // Set as "DayTime::BEGINNING_OF_TIME"
00491          antenna.setAntennaValidFrom( DayTime::BEGINNING_OF_TIME );
00492       }
00493 
00494          // Take care of "Valid Until" field if it wasn't present
00495       if( !validUntilPresent )
00496       {
00497             // Set as "DayTime::END_OF_TIME"
00498          antenna.setAntennaValidUntil( DayTime::END_OF_TIME );
00499       }
00500 
00501       return antenna;
00502 
00503    }  // End of method 'Antenna::fillAntennaData()'
00504 
00505 
00506 
00507       // Method to load Antex file header data.
00508    void AntexReader::loadHeader(void)
00509       throw( InvalidAntex,
00510              FFStreamError,
00511              gpstk::StringUtils::StringException )
00512    {
00513 
00514       try
00515       {
00516 
00517          std::string label;
00518 
00519          while( label != endOfHeader )
00520          {
00521             std::string line;
00522 
00523                // Read one line from the file
00524             formattedGetLine(line, true);
00525 
00526                // Process line
00527             label = parseHeaderLine(line);
00528          }
00529 
00530          valid = true;
00531 
00532       }  // End of try block
00533       catch (InvalidAntex& ia)
00534       {
00535          GPSTK_RETHROW(ia);
00536       }
00537       catch (EndOfFile& e)
00538       {
00539          return;
00540       }
00541       catch (...)
00542       {
00543          InvalidAntex ia("Unknown error when reading Antex header.");
00544          GPSTK_THROW(ia);
00545       }
00546 
00547    } // End of method 'AntexReader::loadHeader()'
00548 
00549 
00550 
00551       /* Method to get antenna data from a given model. Just the model,
00552        * without including the radome
00553        *
00554        * @param model      Antenna model, without including radome.
00555        *
00556        * @note Antenna model case is NOT relevant.
00557        *
00558        * @warning The antenna returned will be the first one in the Antex
00559        * file that matches the condition.
00560        */
00561    Antenna AntexReader::getAntennaNoRadome(const string& model)
00562       throw(ObjectNotFound)
00563    {
00564 
00565          // Flag that signals if we found the antenna
00566       bool antennaFound(false);
00567 
00568          // Create 'Antenna' object to be returned
00569       Antenna antenna;
00570 
00571          // We need to read the data stream (file) from the beginning
00572       FFTextStream::open( fileName.c_str(), std::ios::in );
00573 
00574          // Strip radome, change to upper case and strip leading and
00575          // trailing spaces
00576       string uModel( strip( upperCase( model.substr(0,15) ) ) );
00577 
00578          // Getting antennas out of Antex file is a costly process, so this
00579          // object will keep a "buffer" called 'antennaMap' where all antennas
00580          // previously looked up are stored.
00581          // Then, let's look first into this "buffer"
00582       AntennaDataMap::const_iterator it1( antennaMap.find(uModel) );
00583       if( it1 != antennaMap.end() )
00584       {
00585 
00586             // Return the first antenna found. Note that there several
00587             // different maps in cascade.
00588          RadSerCalValAntMap::const_iterator it2( (*it1).second.begin() );
00589          SerCalValAntMap::const_iterator it3( (*it2).second.begin() );
00590          CalValAntMap::const_iterator it4( (*it3).second.begin() );
00591          ValAntMap::const_iterator it5( (*it4).second.begin() );
00592 
00593             // we found the antenna
00594          antenna = (*it5).second;
00595          antennaFound = true;
00596 
00597       }  // End of 'if( it1 != antennaMap.end() )...'
00598 
00599 
00600          // Antenna is not in 'antennaMap': Let's look for it in file
00601       if( !antennaFound )
00602       {
00603 
00604          try
00605          {
00606 
00607                // Repeat until antenna is found or End Of File
00608             while( !antennaFound )
00609             {
00610 
00611                std::string label;
00612                std::string line;
00613 
00614                   // Look for 'typeSerial' line
00615                while( label != typeSerial )
00616                {
00617                      // Read one line from file
00618                   formattedGetLine(line, true);
00619 
00620                      // Get label
00621                   label = strip( line.substr(60,20) );
00622                }
00623 
00624                   // Check if model matches. Read only model, not radome
00625                if( uModel == strip( line.substr(0,15) ) )
00626                {
00627 
00628                      // We found the antenna. Fill it with data
00629                   antenna = fillAntennaData( line );
00630 
00631                      // Insert antenna into buffer 'antennaMap'
00632                   antennaMap[ antenna.getAntennaType()      ]
00633                             [ antenna.getAntennaRadome()    ]
00634                             [ antenna.getAntennaSerial()    ]
00635                             [ antenna.getAntennaCalMethod() ]
00636                             [ antenna.getAntennaValidFrom() ] = antenna;
00637 
00638                   antennaFound = true;
00639 
00640                }  // End of 'if( uModel == strip( line.substr(0,15) ) )...'
00641 
00642             }  // End of 'while( !antennaFound )...'
00643 
00644          }  // End of try block
00645          catch( InvalidAntex& ia )
00646          {
00647 
00648                // We need to close this data stream
00649             (*this).close();
00650 
00651             GPSTK_RETHROW(ia);
00652          }
00653          catch( EndOfFile& e )
00654          {
00655                // We need to close this data stream
00656             (*this).close();
00657 
00658             ObjectNotFound notFound("Antenna not found in Antex file.");
00659             GPSTK_THROW(notFound);
00660          }
00661          catch(...)
00662          {
00663                // We need to close this data stream
00664             (*this).close();
00665 
00666             InvalidAntex ia("Unknown error when reading Antex header.");
00667             GPSTK_THROW(ia);
00668          }
00669 
00670       }  // End of 'if( !antennaFound )...'
00671 
00672 
00673          // We need to close this data stream
00674       (*this).close();
00675 
00676          // Return antenna
00677       return antenna;
00678 
00679    }  // End of method 'AntexReader::getAntennaNoRadome()'
00680 
00681 
00682 
00683       /* Method to get antenna data from a given IGS model.
00684        *
00685        * @param model      IGS antenna model
00686        *
00687        * @note Antenna model case is NOT relevant.
00688        *
00689        * @note IGS antenna model combines antenna type and radome.
00690        *
00691        * @warning The antenna returned will be the first one in the Antex
00692        * file that matches the condition.
00693        *
00694        * @warning If IGS model doesn't include radome, method
00695        * 'getAntennaNoRadome()' will be automatically called.
00696        */
00697    Antenna AntexReader::getAntenna(const string& model)
00698       throw(ObjectNotFound)
00699    {
00700 
00701          // Flag that signals if we found the antenna
00702       bool antennaFound(false);
00703 
00704          // Create 'Antenna' object to be returned
00705       Antenna antenna;
00706 
00707 
00708          // We need to read the data stream (file) from the beginning
00709       FFTextStream::open( fileName.c_str(), std::ios::in );
00710 
00711          // Change input to upper case and strip leading and trailing spaces
00712       string uModel( strip( upperCase( model.substr(0,15) ) ) );
00713 
00714          // Check if we have radome data here. If not, call alternative method
00715       if( model.size() < 17 )
00716       {
00717             // We need to close this data stream
00718          (*this).close();
00719 
00720          return getAntennaNoRadome(uModel);
00721       }
00722 
00723          // Get radome
00724       string uRadome( strip( upperCase( model.substr(16,4) ) ) );
00725 
00726          // Getting antennas out of Antex file is a costly process, so this
00727          // object will keep a "buffer" called 'antennaMap' where all antennas
00728          // previously looked up are stored.
00729          // Then, let's look first into this "buffer"
00730       AntennaDataMap::const_iterator it1( antennaMap.find(uModel) );
00731       if( it1 != antennaMap.end() )
00732       {
00733 
00734          RadSerCalValAntMap::const_iterator it2( (*it1).second.find(uRadome) );
00735 
00736          if( it2 != (*it1).second.end() )
00737          {
00738 
00739                // Return the first antenna found. Note that there several
00740                // different maps in cascade.
00741             SerCalValAntMap::const_iterator it3( (*it2).second.begin() );
00742             CalValAntMap::const_iterator it4( (*it3).second.begin() );
00743             ValAntMap::const_iterator it5( (*it4).second.begin() );
00744 
00745                // we found the antenna
00746             antenna = (*it5).second;
00747             antennaFound = true;
00748 
00749          }  // End of 'if( it2 != (*it1).second.end() )...'
00750 
00751       }  // End of 'if( it1 != antennaMap.end() )'
00752 
00753 
00754          // Antenna is not in 'antennaMap': Let's look for it in file
00755       if( !antennaFound )
00756       {
00757 
00758          try
00759          {
00760 
00761                // Repeat until antenna is found or End Of File
00762             while( !antennaFound )
00763             {
00764 
00765                std::string label;
00766                std::string line;
00767 
00768                   // Look for 'typeSerial' line
00769                while( label != typeSerial )
00770                {
00771                      // Read one line from file
00772                   formattedGetLine(line, true);
00773 
00774                      // Get label
00775                   label = strip( line.substr(60,20) );
00776                }
00777 
00778                   // Check if model matches. Read only model, not radome
00779                if( uModel == strip( line.substr(0,15) ) )
00780                {
00781 
00782                      // Check if radome matches
00783                   if( uRadome == strip( line.substr(16,4) ) )
00784                   {
00785 
00786                         // We found the antenna. Fill it with data
00787                      antenna = fillAntennaData( line );
00788 
00789                         // Insert antenna into buffer 'antennaMap'
00790                      antennaMap[ antenna.getAntennaType()      ]
00791                                [ antenna.getAntennaRadome()    ]
00792                                [ antenna.getAntennaSerial()    ]
00793                                [ antenna.getAntennaCalMethod() ]
00794                                [ antenna.getAntennaValidFrom() ] = antenna;
00795 
00796                      antennaFound = true;
00797 
00798                   }  // End of 'if( uModel == strip( line.substr(0,15) ) )...'
00799 
00800                } // End of 'if( uModel == strip( line.substr(0,15) ) )...'
00801 
00802             }  // End of 'while( !antennaFound )...'
00803 
00804          }  // End of try block
00805          catch( InvalidAntex& ia )
00806          {
00807 
00808                // We need to close this data stream
00809             (*this).close();
00810 
00811             GPSTK_RETHROW(ia);
00812          }
00813          catch( EndOfFile& e )
00814          {
00815                // We need to close this data stream
00816             (*this).close();
00817 
00818             ObjectNotFound notFound("Antenna not found in Antex file.");
00819             GPSTK_THROW(notFound);
00820          }
00821          catch(...)
00822          {
00823                // We need to close this data stream
00824             (*this).close();
00825 
00826             InvalidAntex ia("Unknown error when reading Antex header.");
00827             GPSTK_THROW(ia);
00828          }
00829 
00830       }  // End of 'if( !antennaFound )...'
00831 
00832 
00833          // We need to close this data stream
00834       (*this).close();
00835 
00836          // Return antenna
00837       return antenna;
00838 
00839    }  // End of method 'AntexReader::getAntenna()'
00840 
00841 
00842 
00843       /* Method to get antenna data from a given IGS model and serial.
00844        *
00845        * @param model      IGS antenna model
00846        * @param serial     Antenna serial number.
00847        *
00848        * @note Antenna model and serial number case is NOT relevant.
00849        *
00850        * @note IGS antenna model combines antenna type and radome.
00851        *
00852        * @warning The antenna returned will be the first one in the Antex
00853        * file that matches the conditions.
00854        */
00855    Antenna AntexReader::getAntenna( const string& model,
00856                                     const string& serial )
00857       throw(ObjectNotFound)
00858    {
00859 
00860          // Flag that signals if we found the antenna
00861       bool antennaFound(false);
00862 
00863          // Create 'Antenna' object to be returned
00864       Antenna antenna;
00865 
00866 
00867          // We need to read the data stream (file) from the beginning
00868       FFTextStream::open( fileName.c_str(), std::ios::in );
00869 
00870          // Change input to upper case and strip leading and trailing spaces
00871       string uModel( strip( upperCase( model.substr(0,15) ) ) );
00872 
00873          // Check if we have radome information here
00874       string uRadome;
00875       if( model.size() >= 17 )
00876       {
00877          uRadome = strip( upperCase( model.substr(16,4) ) );
00878       }
00879 
00880          // Get serial
00881       string uSerial( strip( upperCase( serial ) ) );
00882 
00883          // Getting antennas out of Antex file is a costly process, so this
00884          // object will keep a "buffer" called 'antennaMap' where all antennas
00885          // previously looked up are stored.
00886          // Then, let's look first into this "buffer"
00887       AntennaDataMap::const_iterator it1( antennaMap.find(uModel) );
00888       if( it1 != antennaMap.end() )
00889       {
00890 
00891          RadSerCalValAntMap::const_iterator it2( (*it1).second.find(uRadome) );
00892 
00893          if( it2 != (*it1).second.end() )
00894          {
00895 
00896             SerCalValAntMap::const_iterator it3( (*it2).second.find(uSerial) );
00897 
00898             if( it3 != (*it2).second.end() )
00899             {
00900 
00901                   // Return the first antenna found. Note that there several
00902                   // different maps in cascade.
00903                CalValAntMap::const_iterator it4( (*it3).second.begin() );
00904                ValAntMap::const_iterator it5( (*it4).second.begin() );
00905 
00906                   // we found the antenna
00907                antenna = (*it5).second;
00908                antennaFound = true;
00909 
00910             }  // End of 'if( it3 != (*it2).second.end() )...'
00911 
00912          }  // End of 'if( it2 != (*it1).second.end() )...'
00913 
00914       }  // End of 'if( it1 != antennaMap.end() )'
00915 
00916 
00917          // Antenna is not in 'antennaMap': Let's look for it in file
00918       if( !antennaFound )
00919       {
00920 
00921             // Antenna is not in 'antennaMap': Let's look for it in file
00922          try
00923          {
00924 
00925                // Repeat until antenna is found or End Of File
00926             while( !antennaFound )
00927             {
00928 
00929                std::string label;
00930                std::string line;
00931 
00932                   // Look for 'typeSerial' line
00933                while( label != typeSerial )
00934                {
00935                      // Read one line from file
00936                   formattedGetLine(line, true);
00937 
00938                      // Get label
00939                   label = strip( line.substr(60,20) );
00940                }
00941 
00942                   // Check if model matches. Read only model, not radome
00943                if( uModel == strip( line.substr(0,15) ) )
00944                {
00945 
00946                      // Check if radome matches
00947                   if( uRadome == strip( line.substr(16,4) ) )
00948                   {
00949 
00950                         // Check if serial matches
00951                      if( uSerial == strip( line.substr(20,20) ) )
00952                      {
00953 
00954                            // We found the antenna. Fill it with data
00955                         antenna = fillAntennaData( line );
00956 
00957                            // Insert antenna into buffer 'antennaMap'
00958                         antennaMap[ antenna.getAntennaType()      ]
00959                                   [ antenna.getAntennaRadome()    ]
00960                                   [ antenna.getAntennaSerial()    ]
00961                                   [ antenna.getAntennaCalMethod() ]
00962                                   [ antenna.getAntennaValidFrom() ] = antenna;
00963 
00964                         antennaFound = true;
00965 
00966                      }  // End of 'if( uSerial == strip( line.substr(20,20) ) )'
00967 
00968                   }  // End of 'if( uModel == strip( line.substr(0,15) ) )...'
00969 
00970                } // End of 'if( uModel == strip( line.substr(0,15) ) )...'
00971 
00972             }  // End of 'while( !antennaFound )...'
00973 
00974          }  // End of try block
00975          catch( InvalidAntex& ia )
00976          {
00977 
00978                // We need to close this data stream
00979             (*this).close();
00980 
00981             GPSTK_RETHROW(ia);
00982          }
00983          catch( EndOfFile& e )
00984          {
00985                // We need to close this data stream
00986             (*this).close();
00987 
00988             ObjectNotFound notFound("Antenna not found in Antex file.");
00989             GPSTK_THROW(notFound);
00990          }
00991          catch(...)
00992          {
00993                // We need to close this data stream
00994             (*this).close();
00995 
00996             InvalidAntex ia("Unknown error when reading Antex header.");
00997             GPSTK_THROW(ia);
00998          }
00999 
01000       }  // End of 'if( !antennaFound )...'
01001 
01002 
01003          // We need to close this data stream
01004       (*this).close();
01005 
01006          // Return antenna
01007       return antenna;
01008 
01009    }  // End of method 'AntexReader::getAntenna()'
01010 
01011 
01012 
01013       /* Method to get antenna data from a given IGS model and serial, and
01014        * for a specific epoch.
01015        *
01016        * @param model      IGS antenna model
01017        * @param serial     Antenna serial number.
01018        * @param epoch      Validity epoch.
01019        *
01020        * @note Antenna model and serial number case is NOT relevant.
01021        *
01022        * @note IGS antenna model combines antenna type and radome.
01023        *
01024        * @warning The antenna returned will be the first one in the Antex
01025        * file that matches the conditions.
01026        */
01027    Antenna AntexReader::getAntenna( const string& model,
01028                                     const string& serial,
01029                                     const DayTime& epoch )
01030       throw(ObjectNotFound)
01031    {
01032 
01033          // Flag that signals if we found the antenna
01034       bool antennaFound(false);
01035 
01036          // Create 'Antenna' object to be returned
01037       Antenna antenna;
01038 
01039 
01040          // We need to read the data stream (file) from the beginning
01041       FFTextStream::open( fileName.c_str(), std::ios::in );
01042 
01043          // Change input to upper case and strip leading and trailing spaces
01044       const string uModel( strip( upperCase( model.substr(0,15) ) ) );
01045 
01046          // Check if we have radome information here
01047       string uRadome;
01048       if( model.size() >= 17 )
01049       {
01050          uRadome = strip( upperCase( model.substr(16,4) ) );
01051       }
01052 
01053       const string uSerial( strip( upperCase( serial ) ) );
01054 
01055          // Getting antennas out of Antex file is a costly process, so this
01056          // object will keep a "buffer" called 'antennaMap' where all antennas
01057          // previously looked up are stored.
01058          // Then, let's look first into this "buffer"
01059       AntennaDataMap::const_iterator it1( antennaMap.find(uModel) );
01060       if( it1 != antennaMap.end() )
01061       {
01062 
01063          RadSerCalValAntMap::const_iterator it2( (*it1).second.find(uRadome) );
01064 
01065          if( it2 != (*it1).second.end() )
01066          {
01067 
01068             SerCalValAntMap::const_iterator it3( (*it2).second.find(uSerial) );
01069 
01070             if( it3 != (*it2).second.end() )
01071             {
01072 
01073                   // Return the first antenna found with this model, radome and
01074                   // serial, and start looking from there. Note that
01075                   // calibration value is not taken into account here.
01076                CalValAntMap::const_iterator it4( (*it3).second.begin() );
01077 
01078                while( !antennaFound &&
01079                       it4 != (*it3).second.end() )
01080                {
01081 
01082                      // Let's define a reverse iterator
01083                   ValAntMap::const_reverse_iterator it5(
01084                                                       (*it4).second.rbegin() );
01085 
01086                   while( !antennaFound &&
01087                          it5 != (*it4).second.rend() )
01088                   {
01089 
01090                         // We found the antenna if 'epoch' is between
01091                         // "Valid From" and "Valid Until" fields
01092                      if( epoch >= (*it5).first &&
01093                          epoch <= (*it5).second.getAntennaValidUntil() )
01094                      {
01095                            // We found the antenna
01096                         antenna = (*it5).second;
01097                         antennaFound = true;
01098                      }
01099 
01100                      ++it5;
01101 
01102                   }  // End of 'while( !antennaFound && it5 != ...'
01103 
01104                   ++it4;
01105 
01106                }  // End of 'while( !antennaFound && it4 != ...'
01107 
01108 
01109             }  // End of 'if( it3 != (*it2).second.end() )...'
01110 
01111          }  // End of 'if( it2 != (*it1).second.end() )...'
01112 
01113       }  // End of 'if( it1 != antennaMap.end() )...'
01114 
01115 
01116          // Antenna is not in 'antennaMap': Let's look for it in file
01117       if( !antennaFound )
01118       {
01119 
01120             // Antenna is not in 'antennaMap': Let's look for it in file
01121          try
01122          {
01123 
01124                // Repeat until antenna is found or End Of File
01125             while( !antennaFound )
01126             {
01127 
01128                std::string label;
01129                std::string line;
01130 
01131                   // Look for 'typeSerial' line
01132                while( label != typeSerial )
01133                {
01134                      // Read one line from file
01135                   formattedGetLine(line, true);
01136 
01137                      // Get label
01138                   label = strip( line.substr(60,20) );
01139                }
01140 
01141                   // Check if model matches. Read only model, not radome
01142                if( uModel == strip( line.substr(0,15) ) )
01143                {
01144 
01145                      // Check if radome matches
01146                   if( uRadome == strip( line.substr(16,4) ) )
01147                   {
01148 
01149                         // Check if serial matches
01150                      if( uSerial == strip( line.substr(20,20) ) )
01151                      {
01152 
01153                            // Read the antenna.
01154                         antenna = fillAntennaData( line );
01155 
01156                            // Check if this antenna is valid at 'epoch'
01157                         if( epoch >= antenna.getAntennaValidFrom() &&
01158                             epoch <= antenna.getAntennaValidUntil() )
01159                         {
01160 
01161                               // We found it. Insert antenna into buffer
01162                               // 'antennaMap'
01163                            antennaMap[ antenna.getAntennaType()   ]
01164                                   [ antenna.getAntennaRadome()    ]
01165                                   [ antenna.getAntennaSerial()    ]
01166                                   [ antenna.getAntennaCalMethod() ]
01167                                   [ antenna.getAntennaValidFrom() ] = antenna;
01168 
01169                            antennaFound = true;
01170                         }
01171 
01172                      }  // End of 'if( uSerial == strip( line.substr(20,20) ) )'
01173 
01174                   }  // End of 'if( uModel == strip( line.substr(0,15) ) )...'
01175 
01176                } // End of 'if( uModel == strip( line.substr(0,15) ) )...'
01177 
01178             }  // End of 'while( !antennaFound )...'
01179 
01180          }  // End of try block
01181          catch( InvalidAntex& ia )
01182          {
01183 
01184                // We need to close this data stream
01185             (*this).close();
01186 
01187             GPSTK_RETHROW(ia);
01188          }
01189          catch( EndOfFile& e )
01190          {
01191                // We need to close this data stream
01192             (*this).close();
01193 
01194             ObjectNotFound notFound("Antenna not found in Antex file.");
01195             GPSTK_THROW(notFound);
01196          }
01197          catch(...)
01198          {
01199                // We need to close this data stream
01200             (*this).close();
01201 
01202             InvalidAntex ia("Unknown error when reading Antex header.");
01203             GPSTK_THROW(ia);
01204          }
01205 
01206       }  // End of 'if( !antennaFound )...'
01207 
01208 
01209          // We need to close this data stream
01210       (*this).close();
01211 
01212          // Return antenna
01213       return antenna;
01214 
01215    }  // End of method 'AntexReader::getAntenna()'
01216 
01217 
01218 
01219       /* Method to get antenna data from a given serial and a specific
01220        * epoch.
01221        *
01222        * This method is particularly useful to look for satellite antennas.
01223        *
01224        * @param serial     Antenna serial number.
01225        * @param epoch      Validity epoch.
01226        *
01227        * @note Antenna serial number case is NOT relevant.
01228        *
01229        * @warning The antenna returned will be the first one in the Antex
01230        * file that matches the conditions.
01231        */
01232    Antenna AntexReader::getAntenna( const string& serial,
01233                                     const DayTime& epoch )
01234       throw(ObjectNotFound)
01235    {
01236 
01237          // Flag that signals if we found the antenna
01238       bool antennaFound(false);
01239 
01240          // Create 'Antenna' object to be returned
01241       Antenna antenna;
01242 
01243 
01244          // We need to read the data stream (file) from the beginning
01245       FFTextStream::open( fileName.c_str(), std::ios::in );
01246 
01247       const string uSerial( strip( upperCase( serial ) ) );
01248 
01249          // Getting antennas out of Antex file is a costly process, so this
01250          // object will keep a "buffer" called 'antennaMap' where all antennas
01251          // previously looked up are stored.
01252          // Then, let's look first into this "buffer"
01253       AntennaDataMap::const_iterator it1( antennaMap.begin() );
01254       while( !antennaFound &&
01255              it1 != antennaMap.end() )
01256       {
01257 
01258          RadSerCalValAntMap::const_iterator it2( (*it1).second.begin() );
01259 
01260          while( !antennaFound &&
01261                 it2 != (*it1).second.end() )
01262          {
01263 
01264                // Look for the serial
01265             SerCalValAntMap::const_iterator it3( (*it2).second.find(uSerial) );
01266 
01267             if( it3 != (*it2).second.end() )
01268             {
01269 
01270                   // Return the first antenna found with this model, radome and
01271                   // serial, and start looking from there. Note that
01272                   // calibration value is not taken into account here.
01273                CalValAntMap::const_iterator it4( (*it3).second.begin() );
01274 
01275                while( !antennaFound &&
01276                       it4 != (*it3).second.end() )
01277                {
01278 
01279                      // Let's define a reverse iterator
01280                   ValAntMap::const_reverse_iterator it5(
01281                                                       (*it4).second.rbegin() );
01282 
01283                   while( !antennaFound &&
01284                          it5 != (*it4).second.rend() )
01285                   {
01286 
01287                         // We found the antenna if 'epoch' is between
01288                         // "Valid From" and "Valid Until" fields
01289                      if( epoch >= (*it5).first &&
01290                          epoch <= (*it5).second.getAntennaValidUntil() )
01291                      {
01292                            // We found the antenna
01293                         antenna = (*it5).second;
01294                         antennaFound = true;
01295                      }
01296 
01297                      ++it5;
01298 
01299                   }  // End of 'while( !antennaFound && it5 != ...'
01300 
01301                   ++it4;
01302 
01303                }  // End of 'while( !antennaFound && it4 != ...'
01304 
01305             }  // End of 'if( it3 != (*it2).second.end() )...'
01306 
01307             ++it2;
01308 
01309          }  // End of 'while( !antennaFound && it2 != ...'
01310 
01311          ++it1;
01312 
01313       }  // End of 'while( !antennaFound && it1 != antennaMap.end() )...'
01314 
01315 
01316          // Antenna is not in 'antennaMap': Let's look for it in file
01317       if( !antennaFound )
01318       {
01319 
01320             // Antenna is not in 'antennaMap': Let's look for it in file
01321          try
01322          {
01323 
01324                // Repeat until antenna is found or End Of File
01325             while( !antennaFound )
01326             {
01327 
01328                std::string label;
01329                std::string line;
01330 
01331                   // Look for 'typeSerial' line
01332                while( label != typeSerial )
01333                {
01334                      // Read one line from file
01335                   formattedGetLine(line, true);
01336 
01337                      // Get label
01338                   label = strip( line.substr(60,20) );
01339                }
01340 
01341                   // Check if serial matches
01342                if( uSerial == strip( line.substr(20,20) ) )
01343                {
01344 
01345                      // Read the antenna.
01346                   antenna = fillAntennaData( line );
01347 
01348                      // Check if this antenna is valid at 'epoch'
01349                   if( epoch >= antenna.getAntennaValidFrom() &&
01350                       epoch <= antenna.getAntennaValidUntil() )
01351                   {
01352 
01353                         // We found it. Insert antenna into buffer 'antennaMap'
01354                      antennaMap[ antenna.getAntennaType()      ]
01355                                [ antenna.getAntennaRadome()    ]
01356                                [ antenna.getAntennaSerial()    ]
01357                                [ antenna.getAntennaCalMethod() ]
01358                                [ antenna.getAntennaValidFrom() ] = antenna;
01359 
01360                      antennaFound = true;
01361 
01362                   }
01363 
01364                }  // End of 'if( uSerial == strip( line.substr(20,20) ) )'
01365 
01366             }  // End of 'while( !antennaFound )...'
01367 
01368          }  // End of try block
01369          catch( InvalidAntex& ia )
01370          {
01371 
01372                // We need to close this data stream
01373             (*this).close();
01374 
01375             GPSTK_RETHROW(ia);
01376          }
01377          catch( EndOfFile& e )
01378          {
01379                // We need to close this data stream
01380             (*this).close();
01381 
01382             ObjectNotFound notFound("Antenna not found in Antex file.");
01383             GPSTK_THROW(notFound);
01384          }
01385          catch(...)
01386          {
01387                // We need to close this data stream
01388             (*this).close();
01389 
01390             InvalidAntex ia("Unknown error when reading Antex header.");
01391             GPSTK_THROW(ia);
01392          }
01393 
01394       }  // End of 'if( !antennaFound )...'
01395 
01396 
01397          // We need to close this data stream
01398       (*this).close();
01399 
01400          // Return antenna
01401       return antenna;
01402 
01403    }  // End of method 'AntexReader::getAntenna()'
01404 
01405 
01406 
01407       // Method to open and load Antex file header data.
01408    void AntexReader::open(const char* fn)
01409    {
01410 
01411       fileName = fn;
01412 
01413          // We need to be sure current data stream is closed
01414       (*this).close();
01415 
01416          // Open data stream
01417       FFTextStream::open(fn, std::ios::in);
01418 
01419          // We must be sure that previous antenna data is cleared.
01420       antennaMap.clear();
01421       version = 0.0;
01422       refAntena = "";
01423       refAntenaSerial = "";
01424       commentList.clear();
01425       valid = false;
01426 
01427          // Load header of Antex File
01428       loadHeader();
01429 
01430       return;
01431 
01432    }  // End of method 'AntexReader::open()'
01433 
01434 
01435 
01436       // Method to open and load Antex file header data.
01437    void AntexReader::open(const string& fn)
01438    {
01439 
01440       fileName = fn;
01441 
01442          // We need to be sure current data stream is closed
01443       (*this).close();
01444 
01445          // Open data stream
01446       FFTextStream::open(fn.c_str(), std::ios::in);
01447 
01448          // We must be sure that previous antenna data is cleared.
01449       antennaMap.clear();
01450       version = 0.0;
01451       refAntena = "";
01452       refAntenaSerial = "";
01453       commentList.clear();
01454       valid = false;
01455 
01456          // Load header of Antex File
01457       loadHeader();
01458 
01459       return;
01460 
01461    }  // End of method 'AntexReader::open()'
01462 
01463 
01464 
01465       // Returns if loaded antenna data file is absolute or relative.
01466    bool AntexReader::isAbsolute() const
01467    {
01468       if( type == absolute )
01469       {
01470          return true;
01471       }
01472       else
01473       {
01474          return false;
01475       }
01476 
01477    }  // End of method 'AntexReader::isAbsolute()'
01478 
01479 
01480 
01481       // This methods dumps all data in Antex header.
01482    void AntexReader::dump(ostream& s) const
01483    {
01484 
01485          // Print version
01486       s << "Antex Version " << version << endl;
01487 
01488          // Print satellite system
01489       s << "Satellite system: ";
01490       switch (system)
01491       {
01492          case SatID::systemGPS:
01493             s << "GPS";
01494             break;
01495          case SatID::systemGlonass:
01496             s << "GLONASS";
01497             break;
01498          case SatID::systemGalileo:
01499             s << "Galileo";
01500             break;
01501          case SatID::systemMixed:
01502             s << "Mixed";
01503             break;
01504       }
01505       s << endl;
01506 
01507          // Print PCV type and, if relative, reference antenna type and serial
01508       s << "PCV type: ";
01509       if( type == absolute )
01510       {
01511          s << "Absolute" << endl;
01512       }
01513       else
01514       {
01515          if( type == relative )
01516          {
01517             s << "Relative" << endl;
01518             s << "    Reference antenna type: " << refAntena << ", "
01519               << "Serial number: " << refAntenaSerial << endl;
01520          }
01521          else
01522          {
01523             s << "Unknown" << endl;
01524          }
01525       }
01526       s << endl;
01527 
01528          // Print comments
01529       s << "*** START OF COMMENTS ***" << endl;
01530       for(int i = 0; i < commentList.size(); ++i)
01531       {
01532          s << commentList[i] << endl;
01533       }
01534       s << "*** END OF COMMENTS ***" << endl << endl;
01535 
01536       s << "This data is ";
01537       if( isValid() )
01538       {
01539          s << "VALID";
01540       }
01541       else
01542       {
01543          s << "NOT VALID";
01544       }
01545       s << endl;
01546 
01547    }  // End of method 'AntexReader::dump()'
01548 
01549 
01550 
01551 }  // End of namespace gpstk
01552 
01553 

Generated on Thu Jul 29 03:30:51 2010 for GPS ToolKit Software Library by  doxygen 1.3.9.1