Thursday 9 February 2017

Planning a GPS Survey Part 1: Understanding the GPS Navigation Message, Almanac and Ephemeris


Professor Chinmaya S Rathore

This article is Part 1 of a three part series. In Part 2 we discuss Dilution of Precision Errors and in Part 3, bring everything together and review a great online GPS survey planning tool. Figures in this article can be enlarged by clicking on them.


Figure 1
Image credit: Paulsava , Wikimedia Commons
The Global Positioning System or the GPS is in wide use today. As many are aware, GPS is a currently a constellation of 32 satellites (minimum 24 are required for global coverage) operated by the USA that orbit the earth at 20200 km in circular orbits oriented in six planes (Figure 1). This arrangement ensures that a minimum of 6 satellites are always visible in the sky from any place on earth, day or night. Other Global Navigation Satellite Systems (GNSS) are the Russian GLONASS (live & fully operational), the European Union’s Galileo (live but at the time of writing, yet to achieve full operational capability) and the Chinese BeiDou (live but at the timing of writing, yet to achieve full operational capability). Using Global Positioning services provided by the GPS constellation wherein each satellite is identified by a unique SVN or PRN number, GPS receivers can accurately compute their 3 Dimensional position (Latitude, Longitude and Altitude) on earth. More holistically stated, the GPS provides Positioning, Navigation and Timing (PNT) services. The GPS is a passive system in that the GPS receivers just receive codes and messages broadcasted from GPS satellites permitting them to determine their position without transmitting anything back to the GPS satellites (i.e. one-way communication from satellite to GPS receiver much like a TV broadcasting tower and TV sets receiving signals).

The intention of this article is not to serve as a GPS primer. Rather it is assumed that the reader is already familiar with how the GPS system works and this article then goes on further to provide a brief conceptual explanation of the GPS Navigation Code and discuss the purpose of almanac and ephemeris in positioning. Coupled with Part 2 and 3 of this article wherein we discuss Dilution of Precision (DOP) errors, this offering aims to review concepts and tools required to effectively plan GPS surveys with a view to maximize the probability of collecting accurate positional information in the field.

The GPS Navigation code or message is one of the three basic codes (the Precision or P-Code and the Coarse acquisition or C/A code being the other two) that the satellite and receivers exchange for determining a positioning solution.  The navigation message provides the GPS receivers with some of the most critical bits of information for position determination. Figure 2 presents an overview of the significant contents of the GPS navigation message.

The full navigation message is transmitted as a collection of 25 frames by each satellite in the GPS constellation. As can be seen in Figure 2, each frame in the message is composed of 5 distinct parts called subframes which are numbered 1 to 5. Each subframe in turn is composed of ten 30 bit words making the length of a subframe equal to 300 bits (30 bits x 10 words). It takes 6 seconds for the satellite to transmit 1 subframe at a transmission rate of 50 bits per second (300 bits to transmit @ 50 bits / second = 6 seconds for transmission of 1 subframe) and 30 seconds to transmit one full frame (6 seconds per subframe x  5 subframes = 30 seconds). Each active satellite repeats this navigation message endlessly in a never-ending loop.

Figure 2

The first two words in each subframe are (a) the TLM or Telemetry word which is used for synchronization and testing for the beginning of each subframe and (b) the HOW or the Handover Word which contains a GPS time counter that is incremented at the start of each subframe indicating the start time for the next frame. It also carries the subframe number (1-5). Broadly speaking, the HOW word apart from other things that it does, plays an important part in the receiver determining when the signal left the satellite. Following the TLM and HOW words, each subframe has a different information payload. Subframe 1, after the TLM and HOW words, carries clock correction, satellite week (Week number in reference to  6th January 1980 which has been designated as Week 0) and satellite health ( 000 indicates that all parameters OK i.e. a healthy satellite, anything other than 000 indicates issues) etc. Subframes 2 and 3 carry what is known as ephemeris data and subframes 4 and 5, carry the almanac data. Interestingly, subframes 4 & 5 have 25 pages each, which means that rather than have a total of 300 bits as is the case with subframes 1, 2 and 3, subframes 4 & 5 which carry the almanac information, each have 300 x 25 bits or 7500 bits each.

Figure 3
When a GPS receiver is switched on, it needs to get a fix on a minimum of three satellites for it to compute a 2D solution ( display the latitude and longitude) and four satellites to compute a 3D solution (display latitude, longitude and altitude). But how does the GPS receiver know which satellites from the constellation are overhead and where to look for them in the sky? The almanac solves this problem. The almanac has coarse orbital movement parameters of all GPS satellites in the constellation. As each satellite is identified by a unique PRN number, the GPS receiver, using the almanac, can figure out which satellites from the GPS constellation are visible over the area in which the GPS receiver is operating. These positions, calculated using satellite orbital data in the almanac, are not the exact locations of satellites but good enough for the receiver to know which satellites are currently above it and in which direction and at what approximate altitude they are likely to be found. The output of using a valid almanac would probably manifest on a GPS receiver display like that shown in Figure 3. If you visualize yourself at the central dot in figure 3, your GPS receiver, with the help of the almanac, knows which satellites are overhead but it cannot compute a, accurate position yet with this coarse orbital information.
Figure 4

Notice all satellites show as cold and all signal bars would be hollow. To get a position fix, the receiver must get the ephemeris data from individual satellites. The ephemeris data, unlike the almanac, provides very detailed orbital parameters for each individual satellite permitting the GPS receiver to calculate its distance from individual satellites in view. When the receiver collects the ephemeris data from a total of three satellites, it calculates its distance from these three satellites and gets a 2D fix displaying latitude and longitude as shown in Figure 4 (as more satellites are acquired, positioning accuracy improves and altitude data is also displayed resulting in a 3D fix). 

Now let us rewind back to the discussion on the navigation message content and look once again at the navigation message in Figure 2. It can be seen that subframes 2 & 3 contain ephemeris data for the satellite that is broadcasting this message but subframes 4 & 5 contain almanac data for ALL the satellites in the constellation (satellites 1-25 in frame 5 and 25-32 in frame 4). So in summary, the navigation message, which is being continually broadcast by each active satellite in the GPS constellation, has one component – the ephemeris – that has precise orbital information unique to the broadcasting satellite and another component – the almanac – which has coarse orbital information about ALL satellites in the constellation. In other words, the almanac information in the navigation message of all satellites is the same while the ephemeris information is different for each satellite.

When a GPS satellite broadcasts the navigation message, it transmits 300 bits of subframe 1, then 300 bits of subframe 2 followed by 300 bits of subframe 3 and then 300 bits of Page 1 of subframe 4 and then 300 bits of Page 1 of Subframe 5 completing transmission of 1 full frame. All this totals up to 1500 bits for a frame comprising of the first 5 subframes. However as 24 pages of subframe 4 & 5 have yet to be sent, the transmission resumes again for frame 2 of the message and subframes 1,2,3  are transmitted as before but this time around with page 2 of subframes 4 & 5. This process continues repeatedly until all 25 frames of the navigation message are transmitted completing the broadcast of the full navigation message which adds up to 1500 x 25 or 37500 bits in total. As the transmission rate is 50 bits per second, some quick back of the envelope calculations show us that it takes 37500 / 50 or 750 seconds or 12.5 minutes (750 / 60) for a GPS satellite to broadcast the full navigation message. The following animation video conceptually illustrates the transmission sequence described above. As can be inferred from the above calculations, the ephemeris data is repeated every 30 seconds (5 subframes @ 6 seconds per subframe and then ephemeris data in subframes 2 & 3 gets transmitted again) while the full navigation message containing the full almanac repeats every 12.5 minutes.




Once downloaded in the GPS receiver, the almanac data remains valid for 180 days even though it is typically refreshed (uploaded) by ground stations to each satellite in the GPS constellation, every 24 hours. What this effectively means is that downloaded once by your GPS receiver from any of the GPS constellation satellite and stored internally in non-volatile memory of the receiver unit, the almanac need not necessarily be downloaded again provided the receiver is within 200 miles or 320 kilometers of where the almanac was downloaded the first. This long persistence and validity of the almanac saves the GPS receiver significant amount of time to locate satellites that are likely to be overhead after being switched on. However, as the almanac data is not sufficient to accurately determine location, the receiver unit needs to get current ephemeris data from satellites overhead. As compared to the almanac, the ephemeris data deteriorates quickly and is valid only for a period of 2 to 4 hours. It is typically refreshed or uploaded to respective satellites every 2 hours by the GPS ground segment stations (recall that unlike the almanac which is common to all satellites’ ephemeris information is different for each satellite).

So let’s put all this together into a few ground rules if you are planning a GPS survey. If you haven’t switched on your GPS receiver for many months or if you have moved the receiver say 300 or more Kilometers away from where it was last used, your almanac and ephemeris data is in all likelihood out of date and your GPS receiver will have to practically start afresh. When switched on in such a situation, it will first try locating any one satellite overhead and when it locates any one satellite, it will try to acquire a valid copy of the almanac. We know from before that it takes 12.5 minutes to download the full almanac. 

Once the GPS receiver has the almanac, it knows which satellites are overhead and where to look for them and then it can start receiving and decoding ephemeris data from individual satellites in view, which can be done rather quickly. This situation, where both alamanc and ephemeris data are invalid and a fresh download is required to get a fix, is called a factory start. The time that it takes for the GPS receiver to acquire satellites and display your position is called Time to First Fix or. It is important to note that during the above factory start situation, the GPS receiver should be kept stationary till it gets a fix because during that period if some data is not received correctly, another attempt will be made by the receiver to download data and that will invariably cost more time. There may be another situation where the GPS receiver has a valid almanac, but has out of date ephemeris data. In this case, you should get a first fix rather quickly like within a minute or two as ephemeris data repeats very frequently. This is called a cold start.  The final situation is when you have a current copy of both almanac and ephemeris (like using the GPS receiver after switch off within 2-4 hours), where you would likely get a first fix within a few seconds. This is a warm start. The following animation video tries to synoptically capture the situation and summarize the navigation message, almanac and the ephemeris concept.




The above also applies to your smartphone if you are using a GPS app and are in a factory start situation in an area that does not have a cell phone signal or Wi-Fi connectivity i.e. the GPS receiver in your phone is on its own or unassisted to directly retrieve data from the GPS satellites. In situations where there is internet connectivity, the cell phone can get the almanac and ephemeris data as a file download from the service providers servers rather than download them directly from the satellites. This leads to a much faster first fix and this arrangement is called A-GPS or assisted GPS. Various GPS receiver manufacturers keep innovating with equipment and use clever tricks to speed up TTFF. However, it is instructive to understand what is generally happening behind the scenes.

So planning a GPS survey, it is important to be aware of the above considerations if you are conducting the survey at a faraway location than where your GPS receiver was used last. It might be best on relocation to the study area that the receiver is operated at those coordinates some time ahead of the survey such that the receiver has current almanac and ephemeris data. During this process, you must put the receiver at one location without moving it until it gets a fix. If a smartphone GPS app is to be used for collecting coordinates, it might be best to operate the same in nearby areas where data connectivity is present to quickly update almanacs and ephemeris (A-GPS can also provide specially prepared extended ephemeris file which may be valid for 7 days or more). You can then move to areas where there is no network connectivity and where the phone GPS will have to operate on its own without any assistance.

Hope this article has helped in building a better understanding of the GPS navigation message, the role of almanac and ephemeris in GPS positioning and why under certain conditions, getting a first fix may take longer than what patience permits in today’s racy world of instant gratification!

In Part 2 of this article, I discuss DOP errors and why they are important for planning GPS surveys.


-------------------------------------------
Supplementary Notes

1. SVN is Space Vehicle Number . PRN refers to Psuedo Random Noise Number which is the satellite's unique PRN code. These are two different numbers each being unique to every satellite in the GPS constellation. As this article primarily concentrates on the almanac and GPS receivers, the PRN number has been referred to frequently in text and the animation video as it is more important in the context of this article. The board idea being communicated is that the receiver can identify individual satellites using these numbers. GPS satellites also have other identifiers like inter range operation number, orbital position number, catalog number, but they are not relevant to this article.

2.Click here to download this weeks GPS almanac. The current week number in the almanac is the number of weeks between 6th January 1980 and the current date modulo 1024. For example, the week of 10th February 2017 when this article was written is week 911.

3. Ephemerides is plural of ephemeris.

4. It is worthwhile to point out that GPS receivers automatically keep downloading recent versions of the almanac as required whenever the receiver is used for more than 12.5 minutes.

5. India also has a functional regional GPS system comprising of 7 satellites called IRNSS (operational name NavIC) but its coverage is restricted to in and around the Indian sub-continental region.

6.The GPS is truly a modern technological marvel. I consider it a great example of both human foresight and tenacity. Even though it is nowadays taken for granted and used without much thought, it is an incredibly complex system. Explanations in this article aim to provide a general conceptual understanding of some aspects of positioning and have deliberately glossed over fine detail.




No comments:

Post a Comment