Global Positioning System Reference
In-Depth Information
MATLAB Code
A.1
Structure of the Code
The generic one-channel receiver is shown in Figure 5.1. The actual data flow and
the MATLAB functions used by the software receiver are depicted in Figure A.1.
Below we mention a short description of the single structures of the receiver
and the variables that conduct the behavior of the software receiver.
First, a small section (few ms) at the start of the data file is read and is passed
to the acquisition M -file. The acquisition M -file looks for any presence of GPS
signals. It estimates the frequency and the C/A code phase for every present GPS
signal. The results are stored in the structure acqResults .
Next, the function preRun reads the acquisition results and initializes all soft-
ware channels. If the number of available satellites is less than the number of
channels, the unused channels are disabled. The same function also clears all pro-
cessing results from possible previous runs. Thus, it prepares a clean environment
for the following run.
After initialization of channels, a block of signal samples is read from the
recorded file and is passed to the tracking function track . The tracking function
tracks signals for all enabled channels, detects bit boundaries, stores bits of the
navigation data, and decodes the data. Decoded ephemerides are stored in the
structure eph . Tracking results (outputs from correlators, discriminators, etc.) are
storedinthestructure trackResults .In settings one may specify for how long the
tracking should proceed.
After the tracking is finished, the function postNavigation is launched to pro-
cess the signal. It identifies the start of a subframe, determines the signal trans-
Search WWH ::




Custom Search