P(Y)-code Buffer class. Applied Research Laboratories, The University of Texas at Austin August 2003
CodeBuffer is a helper class designed to store P-code information. Six seconds of code for a particular satellite is stored in each object. The satellite is identified by PRNID and the beginning time is specified in a CommonTime object. The code is stored in an array of unsigned long (assumed 32-bit) integers. The time order started with the MSB of first word of the buffer ([0]) and runs through the LSB of the last word of the buffer.
The size of the buffer is probably the most notable feature of this class. 1.5s (one Z-count) of P(Y)-code is 15,345,000 bits. Therefore, 6 seconds is equal to 4 Z-counts or 4 * 15,345,000 bits = 61,380,000 bits. These bits are stored in 1,918,125 unsigned long integers. The fact that 61,380,000 is evenly divisble by 32 is not a coincidence, but part of the design. The constant NUM_6SEC_WORDS is used to hold the value 1,918,125 and located in PCodeConst.h.
Definition at line 73 of file CodeBuffer.hpp.
#include <CodeBuffer.hpp>
Public Member Functions | |
CodeBuffer (const int SVPRNID) | |
Defines the type of code held in the buffer. More... | |
unsigned long | getBit (const long i) const |
const gnsstk::CommonTime & | getCurrentTime () |
Accessor returning the current time. More... | |
int | getPRNID () |
Accessor returing the PRN ID of the buffer. More... | |
codeType | getPYFlag () |
Accessor returning the type of code in the buffer (P or Y) More... | |
CodeBuffer & | operator= (const CodeBuffer &c) |
const unsigned long & | operator[] (const int i) const |
unsigned long & | operator[] (int i) |
Set or return the designated word of the code buffer. More... | |
CodeBuffer & | operator^= (const CodeBuffer &cb) |
void | updateBufferStatus (const codeType PYFlag) |
void | updateBufferStatus (const gnsstk::CommonTime &dt, const codeType PYFlag) |
~CodeBuffer () | |
Protected Member Functions | |
CodeBuffer (const CodeBuffer &c) | |
Protected Attributes | |
unsigned long * | buffer |
gnsstk::CommonTime | currentTime |
codeType | POrYCode |
int | PRNID |
gnsstk::CodeBuffer::CodeBuffer | ( | const int | SVPRNID | ) |
Defines the type of code held in the buffer.
Instantiate and initialize a code buffer for a particular satellite.
Definition at line 44 of file CodeBuffer.cpp.
|
inline |
Definition at line 134 of file CodeBuffer.hpp.
|
protected |
|
inline |
Given a bit number between 0 and (NUM_6SEC_WORDS * MAX_BIT) - 1, return the value of the bit as a right justified unsigned long word (0x00000000 or 0x00000001).
Definition at line 151 of file CodeBuffer.hpp.
|
inline |
Accessor returning the current time.
Definition at line 103 of file CodeBuffer.hpp.
|
inline |
Accessor returing the PRN ID of the buffer.
Definition at line 109 of file CodeBuffer.hpp.
|
inline |
Accessor returning the type of code in the buffer (P or Y)
Definition at line 106 of file CodeBuffer.hpp.
CodeBuffer & gnsstk::CodeBuffer::operator= | ( | const CodeBuffer & | c | ) |
Definition at line 53 of file CodeBuffer.cpp.
Definition at line 146 of file CodeBuffer.hpp.
|
inline |
Set or return the designated word of the code buffer.
Definition at line 141 of file CodeBuffer.hpp.
|
inline |
Perform an exclusive-or operation on the bits contained in this instance of CodeBuffer and the instance referenced by cb.
Definition at line 135 of file CodeBuffer.hpp.
Update the time associated with the buffer and the designation of the data contained in the buffer as P-code or Y-code. In this case, the time is not being changed, but the code flag may be changed.
Definition at line 100 of file CodeBuffer.hpp.
void gnsstk::CodeBuffer::updateBufferStatus | ( | const gnsstk::CommonTime & | dt, |
const codeType | PYFlag | ||
) |
Update the time associated with the buffer and the designation of the data contained in the buffer as P-code or Y-code.
Definition at line 65 of file CodeBuffer.cpp.
|
protected |
Definition at line 128 of file CodeBuffer.hpp.
|
protected |
Definition at line 130 of file CodeBuffer.hpp.
|
protected |
Definition at line 131 of file CodeBuffer.hpp.
|
protected |
Definition at line 129 of file CodeBuffer.hpp.