00001 #pragma ident "$Id: GenXSequence.hpp 2943 2011-10-25 17:17:11Z yanweignss $" 00002 00003 00004 00005 // GenXSequence.hpp - Generate X Sequence class. 00006 00007 #ifndef GENXSEQUENCE_HPP 00008 #define GENXSEQUENCE_HPP 00009 00010 //============================================================================ 00011 // 00012 // This file is part of GPSTk, the GPS Toolkit. 00013 // 00014 // The GPSTk is free software; you can redistribute it and/or modify 00015 // it under the terms of the GNU Lesser General Public License as published 00016 // by the Free Software Foundation; either version 2.1 of the License, or 00017 // any later version. 00018 // 00019 // The GPSTk is distributed in the hope that it will be useful, 00020 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 // GNU Lesser General Public License for more details. 00023 // 00024 // You should have received a copy of the GNU Lesser General Public 00025 // License along with GPSTk; if not, write to the Free Software Foundation, 00026 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00027 // 00028 // Copyright 2004, The University of Texas at Austin 00029 // 00030 //============================================================================ 00031 00032 //============================================================================ 00033 // 00034 //This software developed by Applied Research Laboratories at the University of 00035 //Texas at Austin, under contract to an agency or agencies within the U.S. 00036 //Department of Defense. The U.S. Government retains all rights to use, 00037 //duplicate, distribute, disclose, or release this software. 00038 // 00039 //Pursuant to DoD Directive 523024 00040 // 00041 // DISTRIBUTION STATEMENT A: This software has been approved for public 00042 // release, distribution is unlimited. 00043 // 00044 //============================================================================= 00045 00046 00047 #include "gpstkplatform.h" 00048 #include "PCodeConst.hpp" 00049 #include "mergePCodeWords.h" 00050 00051 namespace gpstk 00052 { 00055 00056 // Derived from X2A maximum length (see xconst.hpp) 00057 const int MAX_WORD = 140; 00058 00099 class GenXSequence 00100 { 00101 public: 00126 GenXSequence( const unsigned int initialState, 00127 const unsigned int taps, 00128 const int initialEndOfSequence, 00129 const int max_delay ); 00130 ~GenXSequence( ) {}; 00131 00142 uint32_t operator[] ( int i ); 00143 00145 void setLengthOfSequence( int i ); 00146 00147 private: 00148 void addBitToSequence( uint32_t newBit ); 00149 uint32_t bits[MAX_WORD]; 00150 int lengthOfSequence; 00151 int maxOfSequence; 00152 bool debugPrint; 00153 int word_num; 00154 int bit_num; 00155 }; 00157 } // end of namespace 00158 #endif // GENXSEQUENCE_HPP
1.3.9.1