FICData9.cpp

Go to the documentation of this file.
00001 #pragma ident "$Id: FICData9.cpp 3140 2012-06-18 15:03:02Z susancummins $"
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110, 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 "GNSSconstants.hpp"
00053 #include "GPSWeekSecond.hpp"
00054 #include "FICData9.hpp"
00055 
00056 #include <cmath>
00057 
00058 namespace gpstk
00059 {
00060    using namespace std;
00061    using namespace gpstk;
00062 
00063    const double FICData9::UNUSED = 0.0;
00064 
00065    FICData9::FICData9( const gpstk::FICData109 rawsf, const gpstk::EngEphemeris ee )
00066    {
00067       int i;
00068       blockNum = 9;
00069 
00070       firstFiveItems( 1, rawsf, ee );
00071       GPSWeekSecond gpstime(ee.getTransmitTime());
00072       f.push_back( (double) gpstime.week );
00073       f.push_back( (double) ee.getCodeFlags() );
00074       f.push_back( (double) ee.getAccFlag() );
00075       f.push_back( (double) ee.getHealth() );
00076       f.push_back( (double) (ee.getIODC() * 2048) );
00077       f.push_back( (double) ee.getL2Pdata() );
00078       f.push_back( ee.getTgd() );
00079       f.push_back( ee.getToc() );
00080       f.push_back( ee.getAf2() );
00081       f.push_back( ee.getAf1() );
00082       f.push_back( ee.getAf0() );
00083 
00084          // Two unused
00085       f.push_back( UNUSED );
00086       f.push_back( UNUSED );
00087       f.push_back( (double) ee.getTracker() );
00088       f.push_back( (double) ee.getPRNID() );
00089 
00090       firstFiveItems( 2, rawsf, ee );
00091       f.push_back( (double) (ee.getIODE() * 2048) );
00092       f.push_back( ee.getCrs() );
00093       f.push_back( ee.getDn() );
00094       f.push_back( ee.getM0() );
00095       f.push_back( ee.getCuc() );
00096       f.push_back( ee.getEcc() );
00097       f.push_back( ee.getCus() );
00098       f.push_back( ee.getAhalf() );
00099       f.push_back( ee.getToe() );
00100       f.push_back( (double) ee.getFitInt() );
00101 
00102          // Five unused
00103       for (i=0;i<5;++i) f.push_back( UNUSED );
00104 
00105       firstFiveItems( 3, rawsf, ee );
00106       f.push_back( ee.getCic() );
00107       f.push_back( ee.getOmega0() );
00108       f.push_back( ee.getCis() );
00109       f.push_back( ee.getI0() );
00110       f.push_back( ee.getCrc() );
00111       f.push_back( ee.getW() );
00112       f.push_back( ee.getOmegaDot() );
00113       f.push_back( (double) (ee.getIODE() * 2048) );
00114       f.push_back( ee.getIDot() );
00115 
00116          // Six unused
00117       for (i=0;i<6;++i) f.push_back( UNUSED );
00118    }
00119 
00120    void FICData9::firstFiveItems( const short sfNum,
00121                                   const gpstk::FICData109 rawsf,
00122                                   const gpstk::EngEphemeris ee )
00123    {
00124       int ndx = 2 + ((sfNum-1) * 10);
00125       long word01 = rawsf.i[ ndx ];
00126       long preamble = word01 >> 22;
00127       f.push_back( (double) preamble );
00128       f.push_back( (double) ee.getTLMMessage(sfNum) );
00129       f.push_back( ee.getHOWTime(sfNum) );
00130       f.push_back( (double) ee.getASAlert(sfNum) );
00131       f.push_back( (double) sfNum );
00132    }
00133 
00134 }   // namespace

Generated on Tue May 21 03:31:08 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1