This paper describes a complex technique with its built-in cycle slip correction procedures that have been developed for ionospheric space research to obtain high-quality and high-precision GPS-derived total electron content (TEC) values. Thus, to correct GPS anomalies while the signatures of space weather features detected in the dual-frequency 30-s rate GPS data are preserved is the main aim of this technique. Its main requirement is to complete fully automatically all the tasks required to turn the observational data to the desired final product. Its major tasks include curve fitting, cycle slip detection and correction in the slant relative TEC data, residual error detection and correction in the vertical TEC data, and vertical TEC data filtering for quantifying data smoothness and GPS phase fluctuations. A detailed description of these two data correction methods is given. Validation tests showing weaknesses and strengths of the methods developed are also included and discussed. Versatility and accuracy of the methods are demonstrated with interesting and real-world examples obtained from smooth midlatitude and from dynamic low- and high-latitude data. Results indicate that errors can be detected and corrected more reliably in the vertical TEC data than in the slant TEC data because of the lower rate of change of vertical TEC over a 30-s sampling period. Future work includes the development of a complex software package wherein the individual FORTRAN algorithms, described in this paper, will be incorporated into one main (FORTRAN, Matlab, or C++) program to provide professional and customized GPS data processing for ionospheric space research.
If you can't find a tool you're looking for, please click the link at the top of the page to "Go to old article view". Alternatively, view our Knowledge Base articles for additional help. Your feedback is important to us, so please let us know if you have comments or ideas for improvement.
 For ionospheric total electron content (TEC) research, the ground-based dual-frequency (L1 = 1.575 GHz and L2 = 1.228 GHz) Global Positioning System (GPS) technique is the principal means of remote sensing the TEC over dry land. Placed in six orbital planes, GPS satellites (27 active plus a few spares) [Makela et al., 2001] are on a 12-hour near circular and 55°-inclined orbit. Situated at around 20,200 km altitude, the orbital height of GPS satellites is well above the F region and mostly above the plasmasphere depending on the position of plasmapause [Kintner and Ledvina, 2005]. Extending from about 50 km to 1200 km, the ionospheric electron density peaks at F2 region heights that generally vary between 250 km and 400 km, but can be much higher or somewhat lower under extreme conditions [Klobuchar, 1996]. From approximately 1200 km, the topside ionosphere continues in the plasmasphere or protonosphere that is a low-density region of mainly ionized hydrogen. Its plasma density varies daily and is controlled by the upward/downward plasma diffusion from/to the ionosphere. During the day, the solar produced ionization diffuses up the magnetic field lines to fill up the closed flux tubes of the plasmasphere. After sunset, the plasmaspheric plasma returns to lower altitudes and helps to maintain the nighttime F region. In this plasma exchange, the ionosphere acts as a source and the plasmasphere as a reservoir [Lunt et al., 1999]. Owing to the presence of free electrons, the ionosphere is a significant error source in GPS ranging with a noteworthy contribution from the plasmasphere particularly at night when the F1 layer disappears. Whereas radio signals propagate with the velocity of light (c) in free space, the ionized medium slows down the group velocity (vg) causing a time delay and accelerates the phase velocity (v) producing a phase advance by equal amounts in a first-order approximation, while vgvϕ remains c2. Both the resultant group delay (ΔT in nanoseconds) and phase advance (Δϕ in cycles) are measurable quantities that are proportional to 1/f2 and 1/f, respectively, where F is the operating frequency, and to the electron density (N in el/m3). Thus the integral of electron density can be computed along the line of sight between the satellite (S) and the receiver (R; see Figure 1) in order to obtain a slant TEC value. The conventional unit for TEC is the TEC unit (TECU) where 1 TECU = 1016 el/m2. The dual-frequency GPS technique utilizes the differential group delay (δΔT in nanoseconds) and differential carrier phase (δΔϕ in cycles) values obtained from the individual group delay (ΔT1 and ΔT2) and carrier phase (Δϕ1 and Δϕ2) measurements on each frequency [Klobuchar, 1996]:
where δΔT is the differential group delay (ns), δΔϕ is the differential carrier phase (cycles), 40.3 is a constant (m3/s2), c = 2.998 * 108 (m/s), m = L1/L2 = 1.2833, L1 = 1.575 GHz, L2 = 1.228 GHz, N ds is the slant TEC, S is the satellite, R is the receiver, N is the electron density (e/m3), and ds is the element of raypath (m).
 In case of differential group delay (see equation (1)), the integral of electron density represents a slant absolute TEC value (SATEC; see equation (3)) due to the absolute group delay measurements made along the line of sight at each frequency:
where SATEC is the slant absolute total electron content (TECU).
 Because of the cycle count ambiguity encountered at both the L1 and the L2 line of sight carrier phase (see equation (2)) measurements [Wells et al., 1986], the integral of electron density obtained from a differential carrier phase measurement (see equation (4)) represents a slant relative TEC (SRTEC) value:
where SRTEC is the slant relative total electron content (TECU).
 Each carrier signal is modulated in order to enable receivers to distinguish the satellites. For civilian users, the C/A (coarse/acquisition) code for the L1 frequency is applied at 1.023 Mbps (megabits per second or MHz). Available only for general users, the P (precise) code modulates both (L1 and L2) frequencies at a higher rate (10.23 Mbps). To guard against fake transmissions of satellite data, antispoofing alters the GPS signals by changing the characteristics of P code by encrypting them into the Y code, called the P(Y) code, which affects some receivers only and is restricted. The performance improvement that has been made available to the civilian community is the elimination of selective availability [Kintner and Ledvina, 2005]. Dual-frequency 30-s rate GPS measurements for the civilian science community are freely available, and are published as daily data files in receiver-independent exchange (RINEX) format by the International Global Navigation Satellite System (GNSS) Service called IGS (ftp://cddis.gsfc.nasa.gov/) and by Geoscience Australia (GA; http://www.ga.gov.au/bin/data_server/).
 There are numerous anomalies in the GPS observational data, and these are identified as random and quasi-random errors. Random errors are known as cycle slips and receiver clock jumps. Cycle slips are discontinuities of an integer number of cycles in the measured carrier phase [Kim and Langley, 2002a], and their typical signatures appear as jumps or spikes. Their main cause is the loss of lock in the carrier tracking loop of a GPS receiver that can be triggered by (1) obstructions of the satellite signal by objects such as trees, buildings or mountains, (2) a low signal-to-noise ratio (SNR) or carrier-to-noise power density ratio (C/NO) owing to unfavorable ionospheric conditions, multipath or low elevation angle, and (3) a response failure in receiver software leading to incorrect signal processing [Hofman-Wellenhof et al., 1997]. Receiver clock jumps occur when receivers attempt to keep their internal clocks synchronized to GPS time by periodically inserting time jumps [Hofman-Wellenhof et al., 1997]. Quasi-random errors are known as multipath, diffraction and scintillation. Multipath effects are caused by reflected waves from the ground and buildings, and are particularly obvious in the differential time delay data mostly at low elevation angles [Klobuchar, 1996]. Localized irregularities in the ionospheric electron density such as plasma patches and bubbles cause both diffraction and scintillation effects by scattering electromagnetic radio waves. Scintillation occurs when irregular phase fluctuations are impressed on transionospheric electromagnetic waves, while amplitude fluctuation develops by a diffraction process as the waves propagate in the free space medium beneath the ionosphere [Briggs and Parkin, 1963]. These effects are most intense in the equatorial region, strong at high latitudes and weak at midlatitudes [Basu et al., 1988]. In a scintillating environment, GPS signals exhibit temporal intensity variations and phase fluctuations causing signal fading and frequency shift, respectively, and leading often to signal loss coupled with cycle slips [Basu et al., 2002]. While random errors can be almost totally removed after they are correctly identified, quasi-random errors have temporal and spatial characteristics that cannot be totally eliminated [Kim and Langley, 2002a, 2002b].
 Today, the application of dual-frequency GPS technique extending from high-precision positioning and navigation to scientific research such as ionospheric space research has been rapidly growing. Thus there is an increased need for accurate and efficient L1/L2 data processing, where both systematic and quasi-random errors represent a major problem [Kim and Langley, 2002a, 2002b]. Manual or even semiautomatic detection and correction of cycle slips and receiver clock jumps are extremely time consuming and can produce erroneous results. Situation can get worse when a wrong automated technique is utilized. Since the first automated techniques of Westrop et al.  and Blewitt , numerous algorithms have been developed, particularly in the last few years, which have been published mainly in technical reports [Gao and Li, 1999; Rizos, 1999; Bisnath et al., 2001; Kim and Langley, 2002a]. Thus, in the space science journal literature, this subject is rare or entirely missing. Further, technical papers are usually written in a not easily accessible fashion for ionospheric space scientists.
 The aim of this paper is to describe in a comprehensive way a GPS data processing technique with its built-in complex error correction procedures. It has been developed for ionospheric space research and put into practice successfully. In order to find an answer for the science question of “How efficient and accurate are these cycle slip corrections?,” an automated technique designed for error detection, identification and correction not only in the slant but in the vertical TEC data as well will be explained, and demonstrated with some interesting low-latitude, midlatitude and high-latitude examples.
2. GPS Database
 For monitoring the low-latitude, midlatitude and high-latitude ionosphere along the Australian east coast, the ground-based dual-frequency GPS receiver stations situated at Guam, Tidbinbilla, Hobart and Macquarie Island (see Figure 2 and Table 1) were considered as data source. The 30-s rate dual-frequency GPS data were retrieved from NASA/JPL (ftp://cddis.gsfc.nasa.gov/pub/gps/data/daily/) via FTP and from the internet Web site of Geoscience Australia (http://www.ga.gov.au/bin/data_server/). High-quality data sets are stored in four types of ASCII data files in RINEX format. These are the observational data files, navigation data files, meteorological data files and total electron content or TEC data files. While data files of the first three types are available from both data centers (NASA/JPL and GA), the TEC data files are provided only by the Australian Regional GPS Network (ARGN) of Geoscience Australia. All RINEX data files are made up of two sections, a header section that is a mandatory label containing global information for the entire file, and a digital data section. This latter section comprises the daily data recorded at every 30 s by the satellites in view that are designated by their pseudo random noise (PRN) numbers. Observational data files contain a set of ionospheric observables such as P1, P2 and C1 measured in meters, and L1 and L2 measured in full cycles. P1, P2 and C1 symbolize pseudorange measurements (in meters) using P code on the L1 and L2 frequencies, and C/A code on the L1 frequency, respectively. L1 and L2 stand for differential carrier phase measurements (in cycles) on the L1 and L2 frequencies, respectively. In case of the TEC data files, the published parameters in TEC units are TR and TS, which stand for TEC from pseudorange and TEC from carrier phase, respectively, plus the azimuth (AZ) and elevation (EL) angles in degrees. Signal-to-noise ratios on the L1 and L2 frequencies are also listed under S1 and S2, respectively.
Table 1. List of GPS Receiver Sites Utilized for Satellite Data Collectiona
Longitude, deg E
Latitude, deg N
Longitude, deg E
Latitude, deg N
PS receiver sites utilized for satellite data collection.
3. Software Package Developed
3.1. Main Tasks
 Several algorithms in Lahey FORTRAN 95 have been developed to obtain high-precision vertical TEC values from the raw 30-s rate GPS data in a routine manner. Their main tasks are to process the raw GPS data, to detect, determine, and correct cycle slips and spikes before curve fitting, to carry out the curve fitting for removing multipath effects, to compute vertical TEC values, to detect and correct residual errors in the vertical TEC data, and finally to filter the vertical TEC data in order to test data smoothness.
3.2. GPS Data Processing
 A prediction algorithm readily available at the University of Queensland, called PREDICT.FOR, was utilized to generate 30-s rate prediction information for all the transmitting satellites operating during a chosen day and for the location of a chosen ground-based receiver station. Its output includes the UT, azimuth and elevation angles, plus the geographic subionospheric coordinates and the cos of the incident ray's zenith angle (χ) computed for an ionospheric altitude of 400 km assumed for a thin layer (see more details in section 3.3). A lengthy file was produced for each receiver site that had to be sorted according to individual satellites designated by their PRN numbers. One file for each satellite was created containing the above listed parameters. A section of one of the Tidbinbilla files, created for satellite PRN-18, is shown in Table 2. For convenience, the universal time (UT) from hours, minutes and seconds was converted to decimal hours during the sorting process.
Table 2. Example of a September Tidbinbilla Prediction File Created for PRN-18 Recording at Around 0000 UT
Universal Time, hours
Angle of Azimuth, deg
Angle of Elevation, deg
Cos Zenith, deg
NASA Catalogue Number
Longitude, deg E
Latitude, deg N
 Two GPS data processing algorithms have been designed to process 7 days of raw GPS data provided by the observational and TEC data files. Called JPLTEC.FOR and AUSTEC.FOR, respectively, these algorithms operate in terms of days at this stage. Their aim is to sort the raw GPS data of 7 days according to PRN numbers into individual files, one for each satellite, and to compute the slant absolute TEC and slant relative TEC values from the observational data files by running JPLTEC.FOR (see details below). For AUSTEC. FOR, the slant values of absolute TEC and relative TEC are readily available as they are listed as TR and TS, respectively, in the TEC data files. For convenience, day numbers are established and the universal time is written in decimal hours. During this sorting process, JPLTEC.FOR and AUSTEC.FOR match the sorted raw GPS TEC data with the prediction data generated by PREDICT.FOR. As an output, a string of files is obtained, one for each satellite containing all the necessary information such as day number, date, time, slant absolute and relative TEC values coupled with all the necessary prediction data such as azimuth, elevation, subionospheric coordinates and cos(χ). An example of such an output file, obtained for GPS PRN-18 from the combination of Tidbinbilla GPS observational and prediction data files, is illustrated in Table 3. These output files are the input files of the curve fitting algorithm, called TECFIT.FOR, that operates in terms of complete passes (see details in section 3.3).
Table 3. Example of a September Tidbinbilla Output File Written by the Sorting Program for PRN-18 Recording at Around 1900 UT During the First Day of the 7-Day Period Processed
Day and Date
Universal Time, hours
Relative TEC, TECU
Absolute TEC, TECU
Angle of Azimuth, deg
Angle of Elevation, deg
Cos Zenith, deg
Longitude, deg E
Latitude, deg N
1 95 9 17
1 95 9 17
1 95 9 17
1 95 9 17
1 95 9 17
1 95 9 17
1 95 9 17
1 95 9 17
1 95 9 17
 When the observational data files are processed, the slant values of absolute TEC and relative TEC have to be computed from the listed observables. According to the total electron content theory, the computation of differential time delay (δΔT; see equations (5) and (6)) and differential carrier phase (δΔϕ; see equation (7)) values are carried out by JPLTEC.FOR in the following way:
where P1 is the measured group path (m) on L1 (P code data), P2 is the measured group path (m) on L2 (P code data), and C1 is the measured group path (m) on L1 (C/A code data):
where Ph1 is the measured carrier phase advance (cycles) on L1, and Ph2 is the measured carrier phase advance (cycles) on L2.
 These derived δΔT and δΔϕ values are substituted into equations (3) and (4), respectively, in order to obtain the corresponding slant values of absolute TEC and relative TEC. For simplicity, the conversion factors of 2.852 (in TECU/ns) and 2.324 (in TECU/cycle) [Klobuchar, 1996] are employed, modifying equations (3) and (4), respectively, as
From this stage onward, the data files produced by JPLTEC.FOR and AUSTEC.FOR have the same format regardless of the type of raw data file. Further, all the other algorithms (yet to be described) operate in terms of complete passes.
3.3. Curve Fitting
 When the slant values of absolute and relative TEC are plotted for a complete pass, it becomes obvious that the absolute values provide a less accurate absolute scale because of the multipath and system noise, while the relative values give an accurate relative scale (see Figure 3). In order to make the most of both measurements and to obtain accurate slant absolute TEC values, called real slant TEC (STEC) values (see details below), the relative curve has to be fitted over the absolute curve. The amount of shift applied is called the offset. Originally, Jorgensen  introduced the procedure of curve fitting. Klobuchar's  pioneering work demonstrated it with up to date GPS data and summarized its major steps. Curve fitting can be accomplished by finding the best fit at the highest elevation angles, for the best outcome, where the multipath and noise effects are lowest. This technique combines the accuracy of phase measurements with the absolute nature of group delay measurements [Lanyi and Roth, 1988; Makela et al., 2001].
 In order to carry out the procedure of curve fitting automatically, an algorithm called TECFIT.FOR has been designed in order to compute an offset (σ in TECU; see equation (10)) for each complete satellite pass. TECFIT.FOR works in terms of complete satellite passes by utilizing the elevation angles and can locate the highest elevation angle of a pass. An arithmetic mean fit is determined by equation (10), in order to compute the magnitude of an offset (σ) where N is the maximum number of data points considered in a 10° range centered over the highest elevation angle of the pass:
where σ is the offset (TECU), i is an integer, N is the maximum number of data points, Di is SATEC (TECU), and Pi is SRTEC (TECU).
 In Figure 3, the concept of curve fitting is illustrated with a complete pass of satellite PRN-9 at Hobart. As the pass started at the end of 20 November 1995 and continued in the following day of 21 November, the modification of UT to UT + 24 was necessary. In this case, the offset (σ) is 63.75 TECU. This fitting procedure provides accurate values of the slant absolute TEC, called the real slant TEC (STEC) in this paper, for a pass by adding the offset to the slant relative TEC values:
where STECi is slant total electron content (TECU).
 This technique's shortfall is that it doesn't correct for the inherited GPS hardware errors, caused by the circuitry in the GPS satellite and receiver hardware, known as satellite (BS) and receiver (BR) biases. Instrumental group delay biases are small time delays experienced by signals traveling from the receiving antenna through the receiver (i.e., receiver bias) and from the satellite transmitter to the satellite antenna (i.e., satellite bias) [Coco et al., 1991; Kim and Langley, 2002b]. In the literature, these errors are called L1–L2 satellite and receiver biases. JPL developed the global ionospheric mapping (GIM) technique to remove both biases [Wilson et al., 1995; Mannucci et al., 1998]. As the data presented in this paper are from IGS stations, the daily L1–L2 code biases (in ns) for satellites and receivers, which are widely available for the GPS user community from the Web site of the University of Bern (http://www.aiub.unibe.ch/download/BSWUSER/ORB/), could be employed. Via the conversion factor of 2.852 (TECU/ns), these code biases were converted from nanoseconds to TEC units. Then, the signed values of satellite and receiver biases were added to the slant absolute TEC values before curve fitting:
where BS is the satellite bias (TECU), and BR is the receiver bias (TECU).
 Finally, to obtain a vertical TEC (VTECi) value, the real STECi value was multiplied by cos χi:
where VTECi is vertical total electron content (TECU), and χi = zenith angle of the incident ray measured at 400 km median ionospheric height.
 The step of obtaining a vertical value can be explained with the real STEC (see equation (11)) that is mapped to the vertical at a pierce point of the raypath (see equation (13)), while the ionosphere is assumed to be a single shell (see Figure 1). In the literature, the single-layer model approximates the ionosphere with a thin spherical shell located at a specific height above the Earth's surface. Usually, this height is assumed to be located between 300 km and 450 km, and is assumed as a simplification to be at a fixed altitude where the ionospheric electron density becomes a maximum [Komjathy and Langley, 1996b]. Since the exact altitude is not known, the median ionospheric height is a significant parameter that affects the estimation of vertical TEC via the angle of zenith. It also plays an important role in the estimation of subionospheric coordinates (see Figure 1) [Komjathy and Langley, 1996a]. In the literature, the 400 km ionospheric height is a commonly adopted value [Camargo et al., 2000; Jakowski et al., 2004] as most of the electron density occurs below 400 km. This widely used 400 km value was utilized in this study.
3.4. Automatic Correction of Slant Relative TEC Values
 Every correction technique's basic idea is to automatically detect, determine and repair cycle slips and spikes in the phase data. There are many different ways to go about it, but the common basis is to produce a time series for the derived quantities and to detect discontinuities in the time series by using time differencing, low-degree polynomial fitting or Kalman filtering [Bisnath, 2000].
 The correction techniques presented here have been developed for GPS data utilized for ionospheric TEC research, of which main aims are to detect space weather features in the data and to observe not only their large-scale but their fine-scale characteristics as well. Thus these correction techniques' main priorities are to correct the slant relative TEC data for accurate curve fitting, to correct the vertical TEC data for residual errors and to preserve the ionospheric signatures of space weather features detected in the data.
 In order to perform the curve fitting accurately, the slant relative TEC curve has to be checked first for GPS anomalies such as cycle slips and spikes. In order to carry out these tasks automatically, a data correction algorithm, called TECFIX.FOR, has been developed. Some typical anomalies occurring with or without data gaps (Figures 4a and 4b) are illustrated with a set of midlatitude Hobart plots. Low to medium magnetic disturbance levels are indicated by the 3-hour interplanetary magnetic activity Kp index of 3− (between 2100 UT and 2400 UT) and 3 (between 2400 UT and 2700 UT) during the pass. In the top plot of Figure 4, the slant relative TEC curve's plotting format is a continuous line (indicated in pink) in order to illustrate the sudden changes in the slant relative TEC data. For observing discontinuities both in the time series and in the slant relative TEC data, the individual data points of the relative curve are plotted as solid dots (indicated in pink) in the middle plot of Figure 4. Also in this graph, the repaired and fitted slant relative TEC curves are plotted in dot style (indicated in blue and yellow, respectively). In Figures 4a and 4b, some magnified sections are shown for demonstrating the accuracy of corrections made to these GPS anomalies. A cycle slip with signal loss is illustrated in of Figure 4a and some spikes are depicted in Figure 4b. Further examples from Hobart, recorded during medium magnetic disturbances, are shown in the top and middle plots of Figure 5. Cycle slips occurring on 20 June 1995 (Kp = 3+ (between 2100 UT and 2400 UT) and Kp = 4+ (between 2400 UT and 2700 UT); see top plots of Figure 5), and spikes with signal loss detected on 20 January 1995 (Kp = 4 (between 0700 UT and 0900 UT) and Kp = 3+ (between 0900 UT and 1200 UT); see middle plots of Figure 5) are illustrated together with the repaired passes.
 Cycle slips and spikes are located by computing the signed values of TEC in TEC units (see equation (14)) and/or the time discontinuities in UT hours (see equation (15)) in the slant relative TEC data:
Both discontinuities are compared to the relevant tolerance values, determined before the automatic correction algorithm was compiled (see details below). If at least one of the discontinuities is larger/smaller than the corresponding positive/negative tolerance value, then a correction is attempted.
 In order to establish suitable tolerance values, the geographic location of the GPS station and the geomagnetic conditions prevailing the 7-day period of interest are considered. For monitoring the prevailing magnetic conditions, the most widely used interplanetary magnetic index, Kp, is plotted for the period investigated. Midlatitude stations such as Tidbinbilla and Hobart provide smooth data under magnetically quiet conditions. However, low-latitude stations like Guam can provide dynamic data even under magnetically quiet conditions, if equatorial plasma bubbles associated with equatorial spread F are present. It is noted here that magnetic storm activity tends to suppress equatorial spread F formation in the early evening. For smooth data, TEC discontinuities greater than +1.5 TECU or less than −1.5 TECU, and UT discontinuities greater than the normal 0.0083-hour sampling period and less than 0.75 hours are cycle slip candidates. Usually, signal loss greater than 0.75 hours, which is quite rare, is ignored. If the quality of fitting is not acceptable because of an uncorrected large signal loss, then the faulty pass is discarded. For dynamic data such as the sub-Antarctic Macquarie Island data recorded under quiet magnetic conditions, the TEC tolerance values are set to ±3.0 TECU while the UT tolerance value remains 0.75 hours. For disturbed conditions, indicated by the larger (Kp > 3+) magnetic indices, the TEC tolerance is usually greater. In difficult cases, trying a few test runs in order to find the most suitable TEC tolerance value has proved to be useful. For the demonstrated example, shown in the bottom plots of Figure 5, the TEC tolerance value was set to ±9.0 TECU.
 Cycle slip and spike sizes in TEC units are determined according to the sign of slant relative TEC gradient that is negative before the elevation angle reaches its maximum and positive afterward. During the software development phase, numerous uncorrected raw GPS passes were inspected in order to get an insight of the different types of anomalies occurring in the slant relative TEC data and to design a suitable equation to repair them reliably (see equation (16)). By computing the signed value of a TEC difference at an anomaly situated between data points (i) and (i − 1), and by adding/subtracting the absolute value of previous slant relative TEC difference (obtained from the signed values of SRTECi−1 and SRTECi−2) before/after the maximum elevation angle, the size of an anomaly can be determined in the following way:
 As the graphs of Figures 4 and 5 show, cycle slips and spikes are repaired backward. It means, from the start of a pass to (i − 1) inclusive, all the data points are corrected by adding the signed value of a correction term computed by equation (16). After the correction is completed, the algorithm keeps checking for the next anomaly and repairs it in the above described manner (i.e., by adding the signed value of a correction term to all the previous data points including (i − 1)). A macroflowchart is constructed to illustrate the operation of TECFIX.FOR (see Figure 6). As a result of this correction technique, the slant relative TEC curve becomes moved away from its original position to a new position. Before curve fitting, it is acceptable since the position of slant relative TEC curve is not fixed.
 Applying the appropriate TEC and UT tolerance values is crucial for TECFIX.FOR for providing accurate slant relative TEC values that are suitable for accurate curve fitting. For smooth midlatitude data like those presented in Figure 4 plus in the top and middle plots of Figure 5, this correction procedure on its own provided excellent results requiring many times no further corrections. In the bottom plots of Figure 5, a high-Kp (7+) example of the dynamic Macquarie Island data demonstrates that by estimating appropriate UT and TEC tolerance values, curve fitting can be carried out remarkably well even in extreme cases.
3.5. Validation of Curve Fitting and Slant Data Correction
 Validation of cycle slip and spike corrections in the slant data at this stage was carried out after curve fitting by the visual inspection of the end results. It means that uncorrected and corrected slant relative TEC curves were plotted in time with the slant absolute TEC curve (like Figure 5, right plots) permitting also the inspection of the quality of curve fitting. If the curve fitting was inaccurate because of a large signal loss, then the faulty pass was discarded. It was recognized and understood that not all the GPS anomalies could be corrected at this stage because of the data tolerance. However, the slant relative TEC curve could be fitted even in the most extreme cases (see Figure 5, bottom).
 Computing the vertical TEC values of complete passes served also as a validation test for the accuracy of previously applied correction procedure. After converting the real slant TEC values to vertical TEC values, even the smallest errors, which did not affect the accuracy of curve fitting and were not obvious in the slant relative TEC data because of the large rate of TEC change over a 30-s sampling period, became largely apparent in the vertical TEC data. These residual errors in the vertical TEC data warranted the implementation of a second correction technique.
3.6. Automatic Correction of Vertical TEC Values
 In order to overcome the problem of possible residual errors occurring in the vertical TEC data, a correction algorithm, called VTECFIX.FOR, has been developed. This is an additional correction technique that detects, determines and corrects anomalies in the vertical TEC (VTEC) data. Owing to the significantly smaller rate of vertical TEC change over a 30-s sampling period, residual errors in the vertical TEC data are more evident, and therefore easier to detect and to repair. Three typical examples (PRN-18, −24 and −28) are shown in Figures 7, 8, and 9 with uncorrected (indicated in red) and corrected (indicated in blue) vertical TEC plots obtained from the midlatitude Tidbinbilla and Hobart data. An extreme test case (PRN-22) is illustrated in Figure 10 with the same plotting styles. In order to test the capabilities of VTECFIT.FOR, the slant relative TEC curve of PRN-22 from Hobart was poorly corrected deliberately for obtaining a highly irregularly fragmented vertical TEC curve.
 By inspecting numerous faulty VTEC curves of complete passes, VTEC and UT tolerance values were estimated for residual error corrections and a set of equations (equations (17)–(26)) were designed (see details below). For smooth data from Tidbinbilla, Hobart and Guam, the tolerance values of ±0.135 TECU and 0.1 hours were found reasonable. For the dynamic Macquarie Island data, two sets of tolerance values were estimated. One set with ±0.155 TECU and 0.185 hours for mild and medium disturbances, which was also utilized for the dynamic Guam data, and another set with ±0.3 TECU and 0.3 hours for high magnetic activity. After setting the appropriate tolerance values for a certain station, VTECFIX.FOR looks for erroneous VTEC and UT discontinuities between epochs (i) and (i − 1) by computing the actual signed values of VTEC and UT differences:
If at least one of the discontinuities is larger (or smaller) than the positive (or negative) tolerance value, then the actual VTEC difference becomes an error candidate and a correction is attempted. Next, the algorithm starts the computation of a correction term (i.e., (ΔVTEC)correction) in order to repair the erroneous VTEC discontinuity detected. As a first step, it computes the actual VTEC differences between epochs (i − 3) and (i − 4) (see equation (19)) and between epochs (i + 3) and (i + 2) (see equation (20)):
Then, the algorithm computes an actual average VTEC difference (see equation (21)) by utilizing the previously obtained two actual VTEC differences. This step is necessitated because of the roughness of the data at either end of the discontinuity:
Following this, the algorithm estimates an average VTEC discontinuity:
Then, the program compares the signed value of (ΔVTEC)estimated average to the previously computed (ΔVTEC)actual (see equation (17)), which is the actual VTEC error occurring between epochs (i) and (i − 1), in order to attempt a repair with respect to the correct section (i.e., high elevation angle section) of the pass.
 A Tidbinbilla vertical TEC plot in Figure 7 serves as a good example for demonstrating and for explaining the concept of making corrections with respect to the high elevation angle section of a pass. Figure 7 clearly shows that the correct section of the fragmented VTEC plot is situated where the highest elevation angle of the pass is, since that section of high elevation angles was fitted during the previous curve fitting procedure. On both sides of this correct VTEC section, there is an anomaly to repair with respect to this correct section.
 In order to do any repair automatically and with respect to the correct section, the algorithm compares the signs of (ΔVTEC)actual and (ΔVTEC)estimated average. If both, the (ΔVTEC)actual and the (ΔVTEC)estimated average have the same sign, then VTECFIX.FOR estimates a VTEC discontinuity (see equation (23)) by utilizing the (ΔVTEC2)actual term obtained earlier by equation (20):
If the signs of (ΔVTEC)actual and (ΔVTEC)estimated average are different, then the process of ΔVTEC estimation (see equation (24)) is carried out with (ΔVTEC1)actual obtained before by equation (19):
Following the ΔVTEC estimation (i.e., (ΔVTEC)estimated) obtained either by equation (23) or equation (24), VTECFIX.FOR computes the signed value of an actual correction term (i.e., (ΔVTEC)correction) by subtracting the signed value of estimated VTEC difference from the signed value of actual VTEC difference:
Finally, the algorithm computes the signed value of corrected VTECi called CVTECi in this paper by adding the signed value of correction term to the data point of VTECi:
where CVTECi is the corrected vertical TEC (TECU).
 It depends on the sign of (ΔVTEC)correction, whether the correction is applied forward or backward. Thus the signed value of (ΔVTEC)correction accounts for the type of correction (forward or backward) needs to be carried out.
 In the case of this Tidbinbilla example shown in Figure 7, two correction terms of (ΔVTEC)correction were computed. All the data points became corrected by the first correction term of (ΔVTEC)correction from the beginning of the VTEC plot up to the first anomaly during the first correction. After the completion of this first correction, the algorithm looked for the second anomaly and corrected all the data points from the second anomaly to the end of the pass.
 The next Hobart plot with PRN-24 (see Figure 8) depicts an example in which all the residual errors are situated on the same side of the VTEC curve. Each of them was corrected with respect to the previous VTEC section. More complicated corrections are illustrated with PRN-28 in Figure 9, where the correct section of the plot is the last VTEC curve fragment. Finally, an extreme case with PRN-22 is shown by the last set of Hobart plots of Figures 7–10. There, the corrections were carried out with respect to the beginning of the last VTEC curve fragment. In all these cases, the obtained high accuracy and reliability are apparent. In Figure 11, a macroflowchart shows the operation of VTECFIX.FOR.
3.7. Validation of Vertical TEC Data Correction
 One form of validation test was the visual checking of corrected VTEC line plots. Corrected and uncorrected vertical TEC curves were plotted in the same coordinate system, like the plots illustrated in the right columns of Figures 7–10, in order to view the original and corrected vertical TEC data plots together in UT. Corrected vertical TEC curves were also filtered by computing the rate of change of 30-s vertical TEC values. The filtered data, called 1-min dTEC/dt or dTEC/min data [Aarons et al., 1997], provide an excellent means of testing data smoothness and observing GPS phase fluctuations triggered by plasma irregularities. In order to detrend the filtered data, the filtered data were subjected to the filtering procedure again. The basis of this validation criterion is the following. Anomalies due to uncorrected residual errors in the vertical TEC data randomly introduce large dTEC/min values. Further, plasma irregularities and electron density gradients have their own characteristic and well defined signatures in the filtered data. When such plasma irregularities and electron density gradients are detected in high-quality vertical TEC data containing no residual errors, then the filtered data curves show the expected characteristic signatures (see details below and in section 3.8). If the vertical TEC data contain residual errors, then the filtered data become marred by irregular and large dTEC/min values, and the characteristic signatures become distorted by the corresponding irregular and large dTEC/min amplitudes.
 In Figures 7–10, all the filtered vertical TEC data curves are included in order to further demonstrate the accuracy of vertical TEC correction technique applied. Filtered uncorrected (indicated in red) and filtered corrected (indicated in blue) vertical TEC data curves are displayed under the corresponding vertical TEC plots. Steep TEC gradients cause well defined GPS phase fluctuations (see Figure 7), while a sudden dTEC/min increase is the signature of a residual error (see Figures 7–10). According to the filtered data curves, the correction of PRN-24 from Hobart (see Figure 8) was least successful. Other examples of Figures 7–10 demonstrate that all residual errors became significantly reduced to small magnitudes by the vertical TEC data correction technique applied.
3.8. Space Weather Features Detected in the Vertical TEC Data
 Corrected vertical TEC data, obtained with an accuracy ranging from ±0.135 TECU to ±0.3 TECU (due to data tolerance), enabled the detection of various ionospheric features and the investigation of their finest characteristics such as fine-scale TEC fluctuations. Some examples are shown in Figure 12. In the sub-Antarctic Macquarie Island data of 15 December 1998 the midlatitude trough, which is the manifestation of a sudden depletion of F2 region electron density [Muldrew, 1965], was observed. Obtained from the GPS PRN-27 data, the trough's vertical TEC image is illustrated in geographic latitudes and longitudes as a three dimensional graph and in UT as a line plot (see top plot of Figure 12). Indicated by the filtered data under the line plot, the steep TEC gradients of the trough walls and the fine-scale TEC fluctuations, which are all well visible in both types of vertical TEC plots, produced some minor GPS phase fluctuations (±0.1 TECU/min) between 1348 UT and 1530 UT. Meanwhile, the computed 1-min dTEC/dt is only around ±0.005 TECU/min at the smooth TEC section of the pass, at around 1636 UT. Plasma density irregularities such as high-latitude plasma blobs (see middle plots of Figure 12) over Macquarie Island and equatorial plasma bubbles over Guam (see bottom plots of Figure 12) were observed in the dynamic high- and low-latitude vertical TEC data, respectively. Again, the filtered vertical TEC data were utilized to quantify the resultant GPS phase fluctuations. In the filtered data, the typical signature of highly localized plasma density irregularities is that characteristic burst like appearance [Tsunoda, 1988] that the filtered passes of PRN-24 at around 1348 UT and of PRN-21 at around 1148 UT show (see middle and bottom plots of Figure 12). In both cases, the maximum 1-min dTEC/dt is around ±1.0 TECU/min. At their smoothest sections (at around 1200 UT and 1042 UT, respectively), there is only a minor TECU change per minute (around ±0.005 TECU/min).
4. Conclusions and Future Work
 A complex computerized technique has been developed to obtain 30-s rate vertical GPS TEC values in TECU by processing RINEX observational and TEC data files. It is made up of several tailor-made individual programs and each program executes one or more specific tasks. These programs are written in Lahey FORTRAN 95 and have been described in detail in this paper. For ionospheric space research, this technique provides excellent quality vertical TEC data as a final product in which the ionospheric signatures of space weather features are preserved while GPS anomalies become repaired. After processing the raw GPS data and making corrections for the satellite and receiver biases with JPLTEC.FOR and AUSTEC.FOR, the automatic detection, determination and correction of cycle slips and spikes in the slant TEC data are carried out by TECFIX.FOR before the curve fitting. This first correction technique performs only simple backward corrections in the slant relative TEC data characterized by a large rate of TEC change over a 30-s sampling period. If the tolerance values are set correctly, then accurate curve fitting can be carried out by TECFIT.FOR even in extreme cases. Weaknesses of the first correction technique warrant the automatic checking of vertical TEC data, computed by TECFIT.FOR, for residual errors. For obtaining vertical TEC values, the generation of solar zenith angle predictions for a chosen median ionospheric shell height is an essential step. PREDICT.FOR, readily available at the University of Queensland, provides such predictions. For this study, a 400 km shell height, which is a widely accepted value, is utilized. Within a small error margin of ±0.135 TECU and 0.1 hours for smooth midlatitude data, and of ±0.155 TECU and 0.185 hours or ±0.3 TECU and 0.3 hours for dynamic low- and high-latitude data, all residual errors detected in the vertical TEC data are repaired with respect to the correct section of the VTEC plot. VTECFIX.FOR executes fully automatically this more sophisticated second correction procedure. The achieved higher accuracy of vertical TEC data corrections is due to the smaller rate of change of VTEC over a 30-s sampling period that makes error detection and repair easier. For both correction techniques, the employed error detection and correction models are explained in this paper in an easily accessible fashion and are described with simple macroflowcharts.
 This paper has shown some typical examples to illustrate that even small errors left uncorrected in the slant relative TEC data by the first procedure, because of the tolerance values applied, created a much larger problem in the vertical TEC data. This paper has also explained that by utilizing a more detailed algorithm such as VTECFIX.FOR, all residual errors (according to the tolerance values) could be reduced to significantly smaller values. Excellent quality observations of various space weather features in the vertical TEC data and their filtered 1-min dTEC/dt data curves demonstrate the versatility and accuracy of this second correction software.
 As a future work, improving the quality of prediction data and both data correction algorithms is planned. Mean ionospheric altitude will be selected more carefully, in order to take into account the temporal and spatial variations of ionospheric shell height. Additional features such as automatic estimation of data tolerance will be incorporated into the first correction program. Automated data tolerance estimation can be accomplished by implementing an extra step at the beginning of the first correction program to compute all the signed values of slant relative TEC and UT discontinuities, and by estimating reasonable tolerance values from the maximum and minimum TEC and UT discontinuities encountered. Further, narrowing the high-elevation angle range in order to obtain better fitting will also improve accuracy. Finally, combining the individual Lahey FORTRAN 95 algorithms into one professional user-friendly package is also intended. A main program, which will be written in Lahey FORTRAN 95, Matlab or C/C++, will connect the individual FORTRAN algorithms. Thus the proposed software will be a complex and professional data processing package specifically designed for ionospheric space research, which will be easier to use, and will offer more flexibility and control to users.
 Ildiko Horvath is supported by a University of Queensland postdoctoral fellowship. Special thanks are extended to IGS and Geoscience Australia for the GPS data, to the University of Bern for the satellite and receiver biases, and to WDC-2 at Kyoto (http://swdcdb.kugi.kyoto-u.ac.jp) for the Kp indices.