#include <CodeBuffer.hpp>
Collaboration diagram for CodeBuffer:

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 81 of file CodeBuffer.hpp.
Public Member Functions | |
| CodeBuffer (const int SVPRNID) | |
| Instantiate and initialize a code buffer for a particular satellite. | |
| ~CodeBuffer () | |
| CodeBuffer & | operator= (const CodeBuffer &c) |
| void | updateBufferStatus (const gpstk::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. | |
| void | updateBufferStatus (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. | |
| const gpstk::CommonTime & | getCurrentTime () |
| Accessor returning the current time. | |
| codeType | getPYFlag () |
| Accessor returning the type of code in the buffer (P or Y). | |
| int | getPRNID () |
| Accessor returing the PRN ID of the buffer. | |
| unsigned long & | operator[] (int i) |
| Set or return the designated word of the code buffer. | |
| const unsigned long & | operator[] (const int i) const |
| unsigned long | getBit (const long i) const |
| 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).. | |
| CodeBuffer & | operator^= (const CodeBuffer &cb) |
| Perform an exclusive-or operation on the bits contained in this instance of CodeBuffer and the instance referenced by cb. | |
Protected Member Functions | |
| CodeBuffer (const CodeBuffer &c) | |
Protected Attributes | |
| unsigned long * | buffer |
| int | PRNID |
| gpstk::CommonTime | currentTime |
| codeType | POrYCode |
|
|
Instantiate and initialize a code buffer for a particular satellite.
Definition at line 44 of file CodeBuffer.cpp. References CodeBuffer::buffer, CodeBuffer::currentTime, CodeBuffer::POrYCode, and CodeBuffer::PRNID. |
|
|
|
|
|
Accessor returning the current time.
Definition at line 111 of file CodeBuffer.hpp. |
|
|
Accessor returing the PRN ID of the buffer.
Definition at line 117 of file CodeBuffer.hpp. |
|
|
Accessor returning the type of code in the buffer (P or Y).
Definition at line 114 of file CodeBuffer.hpp. References gpstk::codeType. |
|
|
Definition at line 53 of file CodeBuffer.cpp. References CodeBuffer::buffer, CodeBuffer::currentTime, CodeBuffer::POrYCode, and CodeBuffer::PRNID. |
|
|
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 108 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.
Definition at line 65 of file CodeBuffer.cpp. References CodeBuffer::currentTime, and CodeBuffer::POrYCode. Referenced by SVPCodeGen::getCurrentSixSeconds(). |
|
|
Definition at line 136 of file CodeBuffer.hpp. Referenced by CodeBuffer::CodeBuffer(), CodeBuffer::getBit(), CodeBuffer::operator=(), CodeBuffer::operator[](), and CodeBuffer::operator^=(). |
|
|
Definition at line 138 of file CodeBuffer.hpp. Referenced by CodeBuffer::CodeBuffer(), CodeBuffer::operator=(), and CodeBuffer::updateBufferStatus(). |
|
|
Definition at line 139 of file CodeBuffer.hpp. Referenced by CodeBuffer::CodeBuffer(), CodeBuffer::operator=(), and CodeBuffer::updateBufferStatus(). |
|
|
Definition at line 137 of file CodeBuffer.hpp. Referenced by CodeBuffer::CodeBuffer(), and CodeBuffer::operator=(). |
1.3.9.1