Nav-Soft an OpenSource Software GNSS company.

Home > Hardware Rx

A quick Introduction to the GPS software.

The receiver locates and locks on to upto 12 satellites, and once it has acquired 4 or more satellites and downloaded the ephemeris data from them the receiver uses the last measurement of pseudorange to calculate a position fix as well as velocity and clock drift information.

Overall Program Structure.

The Novatel SuperStarII receiver runs ECOS, the Embedded Configurable Operating System, in particular the Rom monitor program RedBoot to load the GPS code. The receiver control program is written in C and runs as a series of threads under the control of the ECOS kernel scheduler and is compiled along with ECOS libraries and API's.

The threads are created, prioritized and allocated memory during the start-up phase. Setting up the comms channels and reading data from the RTC and Non-Volatile memory also occurs before the threads are started.

The next operation that occurs in the start-up phase is the setting of the start mode HOT, WARM or COLD.

The mode is dependant on the state of Almanac and Ephemeris data in NVM and having a valid RTC value and last known position. The Superstar II has a RTC with a backup Capacitor that lasts for a few days, after this a register is set inside the RTC to indicate loss of power and hence an invalid clock value.

The last step of the setup routine is to configure two hardware interrupts. The first is the correllation interrupt which reads the hardware correlator channel registers and then calls the main tracking routine.This is programmed to occur approximately every 0.5 ms to avoid the possibility of missing reading the data when a correlation measurement completes.The hardware keeps a running total of the cross-correlation of the satellite and receiver signals which repeat themselves roughly every millisecond. The exact repetition interval depends on the doppler frequency which will speed up or delay the signal by a small fraction.

The second is the measurement interrupt which reads the measurement hardware registers and then calls the measurement thread.This is programmed to take place every 100ms or 10 times a second.

The tracking routine acquires and locks onto the signals from the individual satellites and then tells the message thread when there is navigation data to be decoded.

The message thread decodes the structure of the navigation message depending on whether the satellite on the channel is a NavStar sat or a WAAS sat, then wakes up the ephemeris thread

The ephemeris thread then checks the type of the message frame and calls a specific routine to decipher the details of the navigation data and write the results out to the correct receiver navigation structure for internal storage, Ephemeris, Almanac, UTC and Iono respectively.

If the satellite the channel is assigned to is one of the WAAS/EGNOS geostationary ones, then different logic is used to check for frame lock and to decode the messages due to the different structure of the signal error coding and the message. The WAAS logic is covered seperately.

The measurement interrupt wakes the measurement thread once it has read the hardware registers, this thread then calculates pseudorange, phase change, doppler and accumulated delta range using the data from the hardware registers. If enough valid measurements are available, i,e. 4 or more, it wakes up the position thread which calculates the position, velocity and time (PVT) of the receiver.

The display thread runs on a 1 second timer and is woken up if none of the above higher priority threads are running. This thread reads the 2 input channels and outputs information about the actions of the receiver and handles the display of various internal, message, decoded navigation data and the position calculation results.

Finally the allocation thread which allocates satellites to the measurement channels, this thread is set to run on a timer about every 10 seconds. The allocation routine determines if there are enough valid Almanacs and a position to calculate the doppler of satellites that are above the horizon, otherwise it will cycle through the full potential doppler shift range -5000 to +5000 Hz and all the healthy satellites. The maximum doppler shift is +/- 3000 Hz plus an allowance for the possible offset of the tcxo frequency.

Back to Top of Page