FICData62.cpp

Go to the documentation of this file.
00001 #pragma ident "$Id: FICData62.cpp 70 2006-08-01 18:36:21Z ehagen $"
00002 
00003 
00004 
00005 //============================================================================
00006 //
00007 //  This file is part of GPSTk, the GPS Toolkit.
00008 //
00009 //  The GPSTk is free software; you can redistribute it and/or modify
00010 //  it under the terms of the GNU Lesser General Public License as published
00011 //  by the Free Software Foundation; either version 2.1 of the License, or
00012 //  any later version.
00013 //
00014 //  The GPSTk is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 //  GNU Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with GPSTk; if not, write to the Free Software Foundation,
00021 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //  
00023 //  Copyright 2004, The University of Texas at Austin
00024 //
00025 //============================================================================
00026 
00027 //============================================================================
00028 //
00029 //This software developed by Applied Research Laboratories at the University of
00030 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00031 //Department of Defense. The U.S. Government retains all rights to use,
00032 //duplicate, distribute, disclose, or release this software. 
00033 //
00034 //Pursuant to DoD Directive 523024 
00035 //
00036 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00037 //                           release, distribution is unlimited.
00038 //
00039 //=============================================================================
00040 
00041 
00042 
00043 
00044 
00045 
00051 #include "StringUtils.hpp"
00052 #include "icd_200_constants.hpp"
00053 #include "DayTime.hpp"
00054 #include "FICData62.hpp"
00055 
00056 #include <cmath>
00057 
00058 namespace gpstk
00059 {
00060    using namespace std;
00061    using namespace gpstk;
00062 
00063    const double FICData62::UNUSED_F = 0.0;
00064    const long FICData62::UNUSED_I = 0;
00065    
00066    FICData62::FICData62( const gpstk::FICData162 fic162  )
00067    {
00068       blockNum = 62;
00069 
00070       double output[60];
00071       bool stat = EngNav::subframeConvert(      &(fic162.i[1]), 
00072                                             (int) fic162.i[14], 
00073                                                         output );  
00074       
00075       if (stat==false)
00076       {
00077          // need to throw something here
00078          return;         
00079       }
00080       
00081       short format = EngNav::getSubframePattern( &(fic162.i[1]) );
00082       
00083       i.push_back( fic162.i[13] );
00084       i.push_back( (long) (output[2] - 6.0) );
00085       i.push_back( UNUSED_I );
00086       i.push_back( (long) output[6] );
00087       i.push_back( (long) format );
00088       i.push_back( fic162.i[14] );
00089       
00090       
00091       short maxNdx;
00092       switch (format)
00093       {
00094          case 4: maxNdx = 20; break;
00095          case 5: maxNdx = 32; break;         
00096          case 6: maxNdx = 14; break;         
00097          case 7: maxNdx = 14; break;         
00098          case 8: maxNdx = 23; break;         
00099          case 9: maxNdx = 47; break;         
00100          case 10:maxNdx = 29; break;
00101         
00102          default:
00103             // THROW SOMETHING
00104             break;
00105       }
00106       for (int ndx=0;ndx<maxNdx;++ndx)
00107       {
00108          f.push_back( output[ndx] );
00109       }
00110    }
00111 }   // namespace

Generated on Tue Jan 6 03:31:19 2009 for GPS ToolKit Software Library by  doxygen 1.3.9.1