Atec
Atec
Overview
This document describes the programs, scripts, and algorithms for processing GPS
data collected in low earth orbit (LEO) into absolute total electron content (TEC)
along LEO–GPS links. This includes estimation of the LEO differential code biases
(DCBs). The document also describes the computation of pseudo-range local multi-
path patterns, which are used to calibrate the pseudo-range data for the TEC estima-
tion. The pseudo-range local multipath calibration helps the TEC estimation partly
through improved cycle-slip detection and correction, and partly through improved
phase/pseudo-range leveling. Within CDAAC, the module has been named atec and
consists of several Perl scripts and Fortran programs/subroutines. The Perl scripts
can be considered the main drivers, matching up different file types, performing minor
computational tasks, and writing output to NetCDF files. The Fortran programs and
related subroutines are called from Perl scripts when more heavy-duty computations
are necessary.
Below is an overview of the atec module architecture for both real-time (RT) process-
ing and post-processing (PP).
corDcb
mulCal2ascii.pl mulCal brnPol leoOrb leoDcb
brnFil
codDcb updateTEC.pl leoDcb
PP
brnFil
podTec/ionTec
The yellow rounded boxes are Perl scripts within the atec module. The rectangular
1
boxes denotes different file types. The cyan and pink boxes are file types generated
by the atec module, but the pink file types are not generated/used in the CDAAC
production. The blue/violet boxes are other file types/directory generated within
CDAAC and used by the atec module. The red boxes are file types generated outside
CDAAC (fetched by CDAAC from various sources around the world) and used by the
atec module.
The Perl script named atec.pl can be considered the core of the atec module. It
takes care of the processing of raw GPS data into TEC arcs. The script named
makeMulCal.pl is not used in daily operations, but is used for calculation of pseudo-
range multipath patterns. These patterns are used in the daily operations. Once
in a while (usually months in between) the patterns can be updated by running
makeMulCal.pl. The estimation of the daily averaged LEO DCBs are done by the
script named makeLeoDcb.pl. In the real-time processing, this script is kicked off
automatically once a day. In post-processing, the makeLeoDcb.pl script is run after
running atec.pl. The output files of atec.pl, either podTec or ionTec files, are then
updated by subsequently running the script named updateTEC.pl. Two other scripts,
catDCBs.pl and mulCal2ascii.pl are not essential scripts, and they are not used
in the daily processing. They can be used to convert leoDcb files and mulCal files,
respectively, into columnar ASCII files which are easy to plot using the interactive
plotting program named gnuplot.
Below, each of these scripts and related Fortran codes are described in detail.
1 atec.pl
checkOrbit
readStation
AtecTools.pm readDcb
Dplib.pm findDcbFiles
PubFile.pm location
TimeClass.pm readobs.f
Tempdir.pm readleo.f
SP3.pm readgps.f
Tools.pm readatt.f sinzero.f
atec.pl OccTable.pm orbitint.f cubicbesl.f
DBif.pm framerot.f linreg.f
atec_edit.f linintpol.f
Dutil sinc.f
PDL readcal.f
PDL::NetCDF rearc.f
Getopt::Long midval.f
File::Basename slipreg.f
writearcs.f
limits.inc
The yellow boxes indicate Perl script/module and subroutines within the atec module.
2
The green boxes indicate Fortran code and subroutines within the atec module. The
brown boxes indicate other Perl modules, not within the atec module. Some of these
may have underlying dependencies not included in the diagram. The AtecTools.pm
module also depends on some of the brown modules. The gray boxes indicate open-
source code, not within the atec module. Some of these may have underlying depen-
dencies not included in the diagram.
The atec.pl script generates absolute Total Electron Content (podTec or ionTec)
files for a whole dump/day given a RINEX 2.20 (podObs or ionObs) observation
file. It matches up the RINEX observations with SP3 orbit files (leoOrb/leoPor
and igsOrb/iguOrb) and attitude files (leoAtt or chpAcc). It also uses files from the
previous dump/day to ensure continuity across the dump/day boundary. The detec-
tion of outliers and cycle-slip correction is handed over to a Fortran code atec edit.f
executed from the atec.pl script. The output is a bunch of NetCDF files containing
continuous arcs of TEC, elevation viewing angle, SNRs, and satellite positions in ECF
Cartesian coordinates.
3
1.4 Input data:
4
• iguOrb YYYY.DDD.HH.MM.UUUU sp3 (for real-time processing)
igsOrb YYYY.DDD.HH.MM.UUUU sp3 (for post-processing)
codOrb YYYY.DDD.HH.MM.UUUU sp3 (alternative for post-processing)
SP3 level 1a file including GPS orbit information. The atec.pl script reads:
5
• brnFil/MISSION.NN.STA
ASCII ‘config’ file including information about Bernese satellite and antenna
names. The AtecTools.pm module (readStation; cf. section 1.1) reads:
– PRN
– GPS DCB value (ns)
– RMS of GPS DCB value (ns)
• mulCal YYYY.DDD.LLL.TT nc
NetCDF ‘config’ file including 3D data for pseudo-range local multipath calibra-
tion. The readcal.f code (cf. section 1.1) reads:
6
• edit.parms#
Fortran namelist file including tunable parameters for processing the data. The
atec edit.f code (cf. section 1.1) reads:
7
• podTec IIII.YYYY.DDD.HH.MM.UUUU.GGG.TT SSSS.VVVV nc (low rate data)
ionTec IIII.YYYY.DDD.HH.MM.UUUU.GGG.TT SSSS.VVVV nc (medium rate data)
NetCDF level 1b file including total electron content (TEC) data between LEO
and GPS satellites. The atec.pl script reads:
8
∗ day: Day of month of arc start (GPS time)
∗ hour: Hour of day of arc start (GPS time)
∗ minute: Minute of hour of arc start (GPS time)
∗ second: Second of day of arc start (GPS time)
∗ duration: Duration of arc in seconds
∗ attflag: Flag indicating if attitude data were used in processing
∗ podflag: Flag indicating if precise or predicted LEO orbits were used
∗ predorb age: Age in days of predicted orbit (-999 if precise orbits)
∗ predorb rms: RMS of predicted orbit (km; -999 if precise orbits)
∗ parmsfile: Name of input parameter file
∗ calfile: Name of multipath calibration file
∗ dcb units: Indicating the unit of the following DCB values
∗ leodcb flag: Flag indicating if arc is LEO DCB calibrated
∗ leodcb age: Age in days of LEO DCB value (-999 if not calibrated)
∗ leodcb: LEO DCB value (TECU; -999 if not calibrated)
∗ leodcb rms: RMS of LEO DCB value (TECU; -999 if not calibrated)
∗ gpsdcb flag: Flag indicating if arc is GPS DCB calibrated
∗ gpsdcb age: Age in days of GPS DCB value (-999 if not calibrated)
∗ gpsdcb: GPS DCB value (TECU; -999 if not calibrated)
∗ gpsdcb rms: RMS of GPS DCB value (TECU; -999 if not calibrated)
∗ leveling err: Standard error of phase-to-code leveling (TECU)
∗ tecmin: Minimum TEC in arc (TECU)
∗ tecmax: Maximum TEC in arc (TECU)
∗ elevmin: Minimum elevation angle (TECU)
∗ elevmax: Maximum elevation angle (TECU)
∗ tecsinmax: TEC times the sine of elevation at maximum elevation (TECU)
∗ elev tecmax: Elevation at maximum TEC (deg)
∗ alt elevmax: Altitude of LEO at maximum elevation (km)
∗ lat elevmax: Latitude of LEO at maximum elevation (deg)
∗ lon elevmax: Longitude of LEO at maximum elevation (deg)
∗ lct elevmax: Local time of LEO at maximum elevation (hr)
∗ alt tecmax: Altitude of LEO at maximum TEC (km)
∗ lat tecmax: Latitude of LEO at maximum TEC (deg)
∗ lon tecmax: Longitude of LEO at maximum TEC (deg)
∗ lct tecmax: Local time of LEO at maximum TEC (hr)
∗ alt start: Altitude of LEO at starttime (km)
∗ lat start: Latitude of LEO at starttime (deg)
∗ lon start: Longitude of LEO at starttime (deg)
∗ lct start: Local time of LEO at starttime (hr)
∗ alt stop: Altitude of LEO at stoptime (km)
∗ lat stop: Latitude of LEO at stoptime (deg)
∗ lon stop: Longitude of LEO at stoptime (deg)
∗ lct stop: Local time of LEO at stoptime (hr)
1. Initial steps
9
4. Identifying corresponding orbit and attitude files
11. Calculating the extrema of the TEC and other useful output parameters
The first steps of atec.pl are to determine, from system environment variables, the
mission ID and whether the script is running in real-time or in post-processing mode.
The command-line options are obtained and it is determined whether some combina-
tions may not be possible. The program is imediately terminated if one of the following
combinations were chosen:
• Trying to use attitude data for either GPS/MET or SAC-C - attitude data are
not available for these missions
• Trying to use attitude data for CHAMP in near real-time processing - attitude
data are not available for CHAMP in near real-time
• Trying to use predicted orbits in post-processing mode - predicted orbits are not
available for post processing
After this check, the mulCal file for the given LEO and antenna ID is indentified and
checked for existence, the edit.parms# file is identified and checked for existence, and
the subtype (SSSS) and version (VVVV) numbers to be attached to the output filenames
are determined.
A temporary directory is created to serve as the platform for file exchange between
atec.pl and atec edit.f.
The start time, end time, and antenna boresight vector are read from the RINEX file.
The program is terminated if the boresight vector is missing.
Subroutines:
Dplib::protoMission – Provides the proto mission name given a CDAAC mission.
GetOptions – Reads command-line options.
PubFile->new – Creates a new PubFile object. Used to handle CDAAC filename
structures.
10
PubFile->parse – Parses a CDAAC filename and returns a PubFile object.
Dplib::simplefn – Provides the filename for a given CDAAC path name.
GetVersion::GetVersion – Determines the subtype and version of output files.
Tempdir->new – Creates a temporary directory and returns the directory name.
The spacecraft (S/C) to boresight (B/S) quaternion is calculated given the antenna
boresight vector in the spacecraft frame. This quaternion relates the orientation of the
B/S frame to the S/C frame, and is used later on to determine off-boresight angles of
LEO-GPS links – which in turn is necessary for monitoring and calibration of pseudo-
range local multipath. The B/S frame, given by unit vectors (xbs , ybs , zbs ) with
coordinates in the S/C frame, is defined for a given antenna as follows:
ybs is a unit vector in the direction of the vector product between the nominal nadir
of the S/C (which is zsc for COSMIC and CHAMP) and xbs . If xbs is parallel to
the nadir/zenith (e.g., CHAMP has a zenith antenna), then ybs ≡ −ysc .
zbs is a unit vector given by the vector product between xbs and ybs .
1p
qw = 1 + x1 + y2 + z3 , (2)
2
1 p
qx = sign(y3 − z2 ) 1 + x1 − y2 − z3 , (3)
2
1 p
qy = sign(z1 − x3 ) 1 − x1 + y2 − z3 , (4)
2
1 p
qz = sign(x2 − y1 ) 1 − x1 − y2 + z3 . (5)
2
Subroutines:
Dutil::mat2quat – Converts a rotation matrix to a quaternion.
Dutil::quatinv – Gives the conjugate of a quaternion.
11
1.6.3 Determining which RINEX files to use from previous dumps
RINEX files from previous dumps containing data within 90 minutes before the start
time of the input RINEX file is identified to make sure to include the beginning of
data arcs that may cross the dump/day boundary. Up to four RINEX files are allowed.
Having more than four should happen only if the combined duration of the three first
ones is less than 90 minutes. That should not happen very often (if ever) with current
CDAAC missions. The start time and end time of each RINEX file are read and stored
for later use. The atec.pl script is terminated if any of the RINEX files are longer
than 24 hours.
Subroutines:
TimeClass->new – Creates a new TimeClass object. Used to convert date and time
to GPS seconds since January 6, 1980, and vice versa.
Tools::findPrevDump – Finds the dump ID of a previous dump given a current dump.
PubFile->new – Creates a new PubFile object. Used to handle CDAAC filename
structures.
Orbit and attitude files corresponding to the RINEX files are identified. In the case
that predicted LEO orbits are to be used, the latest available predictions are chosen.
Start and end times are read and stored for later use. If there are gaps of more than
one minute between LEO orbit files, those before the gap(s) are discarded.
Subroutines:
PubFile->new – Creates a new PubFile object. Used to handle CDAAC filename
structures.
PubFile->parse – Parses a CDAAC filename and returns a PubFile object.
TimeClass->new – Creates a new TimeClass object. Used to convert date and time
to GPS seconds since January 6, 1980, and vice versa.
OccTable::findGpsFiles – Finds GPS orbit files covering the time span of a given
dump.
The predicted LEO orbits (if chosen by the user instead of precise orbits) are checked
against the raw navigation solution. This is done to avoid completely wrong orbits in
case of orbit maneuvering which is not taken into account in the LEO orbit predictions.
The 3D RMS of predicted positions relative to navigation solutions (where navigation
solutions are available) are calculated based on simple linear interpolation. Outliers
more than 3 times the RMS are discarded. LEO orbit prediction files with a resulting
RMS larger than 5 km are discarded. The atec.pl script is terminated if the navigation
solution is not available, or if all leoPor files fails the test.
12
Subroutines:
Tools::readAtt – Reads and returns data from a leoAtt or chpAcc file.
AtecTools::checkOrbit – Checks a LEO SP3 file against a set of valid navigation
solutions (i.e., gaps are allowed but not -999 values).
PubFile->parse – Parses a CDAAC filename and returns a PubFile object.
SP3::readSP3 – Reads an SP3 file and returns times, positions, and velocities.
The quaternions read from either leoAtt or chpAcc files are so-called ITOE-to-S/C
quaternions. An ITOE-to-S/C quaternion, qitoe2sc , describes a frame rotation from the
ITOE (Inertial True-of-Epoch) frame to the S/C (spacecraft) frame. That is, a vector
v in the ITOE frame has coordinates v0 in the S/C frame when applying the quaternion
operator v0 = qitoe2sc
∗ vqitoe2sc . Since the satellite orbits in the SP3 files are in Earth
Centered Fixed (ECF) coordinates, and we are interested in the lines of sight of GPS
satellites as seen from the B/S (boresight) frame, these quaternions are converted to
ECF-to-B/S quaternions. With such quaternions, the coordinates of vectors along
LEO-GPS links in the ECF frame can be easily transformed to coordinates in the
B/S frame. Directions of lines of sight in the B/S frame are used for monitoring and
calibration of local multipath.
For each attitude sampling time (disregarding missing or bad values) the ITOE-to-B/S
quaternion, qitoe2bs , is obtained by a quaternion multiplication between the ITOE-to-
S/C quaternion from the leoAtt or chpAcc file and the S/C-to-B/S quaternion found
in section 1.6.2:
qitoe2bs = qitoe2sc qsc2bs . (6)
The ITOE-to-B/S quaternion is then converted to an ECF-to-B/S quaternion by a
coordinate transformation from the ITOE frame to the ECF frame. This coordinate
transformation is not trivial and is performed by a Bernese routine using the most
recent brnPol file containing information about Earth’s nutation. The Bernese rou-
tine allows the calculation of the ITOE axes unit vectors (xitoe , yitoe , zitoe ) in ECF
coordinates. The matrix, Recf2itoe , describing the rotation from ITOE coordinates to
ECF coordinates is then given by
T x1 x2 x3
Recf2itoe = xitoe yitoe zitoe = y1 y 2 y 3 . (7)
z1 z2 z3
13
The ECF-to-B/S quaternion, qecf2bs is now obtained by a quaternion multiplication
between the ECF-to-ITOE quaternion and the ITOE-to-B/S quaternion:
zll is a unit vector in the opposite direction of the satellite position vector.
yll is a unit vector in the direction of the vector product between the satellite position
vector and its velocity vector (or opposite if the --flip options is set).
xll is a unit vector given by the vector product between yll and zll .
Having the LL frame in the coordinates of the ITOE frame, the LL frame in the
coordinates of the ECF frame could be obtained by a frame rotation from ITOE to
ECF coordinates. However, a simpler approach, although an approximation, is to
define the LL frame as above, but with reference to the ECF frame instead of the
ITOE frame. This would not work for a geostationary satellite, where the velocity of
the satellite in ECF coordinates is – naturally – zero, and yll would be erroneously
undefined, but the error we make is small for a LEO satellite. Thus, in the case where
attitude information is not available (or deliberately not used) we assume that
rleo
zsc = − , (13)
|rleo |
rleo × ṙleo
ysc = (or opposite if --flip) , (14)
|rleo × ṙleo |
xsc = ysc × zsc , (15)
where the coordinates of the LEO position, rleo , and the velocity, ṙleo , refer to the ECF
frame.
The matrix, Recf2sc , describing the rotation from ECF coordinates to S/C coordinates
is given by
T x1 x2 x3
Recf2sc = xsc ysc zsc = y1 y2 y3 . (16)
z1 z 2 z3
14
The components (qw , qx , qy , qz ) of qecf2sc = qw + iqx + jqy + kqz is then calculated as
1p
qw = 1 + x1 + y2 + z3 , (17)
2
1 p
qx = sign(y3 − z2 ) 1 + x1 − y2 − z3 , (18)
2
1 p
qy = sign(z1 − x3 ) 1 − x1 + y2 − z3 , (19)
2
1 p
qz = sign(x2 − y1 ) 1 − x1 − y2 + z3 . (20)
2
Finally, the ECF-to-B/S quaternion, qecf2bs is obtained by a quaternion multiplica-
tion between the ECF-to-S/C quaternion and the S/C-to-B/S quaternion found in
section 1.6.2:
qecf2bs = qecf2sc qsc2bs . (21)
Subroutines:
SP3::readSP3 – Reads an SP3 file and returns times, positions, and velocities.
Dutil::mat2quat – Converts a rotation matrix to a quaternion.
Dutil::quatinv – Gives the conjugate of a quaternion.
Dutil::quatmult – Performs a quaternion multiplication.
Tools::readAtt – Reads and returns data from a leoAtt or chpAcc file.
Tools::cachefid – Finds brnPol files falling withing a given time span, and returns
a data structure giving all files along with the start and stop times.
Dutil::ITOEtoECF – Makes an ITOE to ECF coordinate transformation. Returns the
coordinates of a position vector (and optionally the velocity vector) in the ECF frame
given the coordinates in the ITOE frame.
The ECF-to-B/S quaternions together with the solar array drive angle (which indicate
the orientation of solar panels) are written to a temporary file named leoAtt quat.
Start and end times in GPS seconds for each file to be read by atec edit.f is written to
another temporary file named infile list. An example of the content of infile list
is given here:
869788800.000 869875199.000 /pub/cosmic/level1a/podObs/2007.211/podObs 2007.211.004.01.01 rnx
869875200.000 869961599.000 /pub/cosmic/level1a/podObs/2007.212/podObs 2007.212.004.01.01 rnx
869788800.000 869886000.000 /pub/cosmic/level1b/leoOrb/leoOrb 2007.211.004.01 2007.3200 sp3
869875200.000 869961060.000 /pub/cosmic/level1b/leoOrb/leoOrb 2007.212.004.01 2007.3200 sp3
869788800.000 869874300.000 /pub/cosmic/level1a/igsOrb/igsOrb 2007.211.00.00.1440 sp3
869875200.000 869960700.000 /pub/cosmic/level1a/igsOrb/igsOrb 2007.212.00.00.1440 sp3
15
869961600.000 870047100.000 /pub/cosmic/level1a/igsOrb/igsOrb 2007.213.00.00.1440 sp3
869788804.004 869961585.004 /tmp/atec.pl12873/leoAtt quat
Input files:
• The name of a temporary directory where the program will look for a file named
infile list. This file lists the start and end times and full path names for the
following files to be read (cf. section 1.6.7)
Output files:
• Either a bunch of files (to the temporary directory) containing arcs of data with
calibrated TEC, SNRs, and orbits
• Or five files (also to the temporary directory; one file for each of C1, P1, P2, S1,
SA) with one dump/day worth of multipath calibration data and average SNRs
The output files are in ASCII format and read by atec.pl for further processing.
16
1.6.9 Calibrating data for the LEO and GPS DCBs
The most recent LEO DCB and its RMS for the given LEO ID and antenna ID are
read from a previous leoDcb file. If the most recent LEO DCB is more than five days
old, data are not calibrated, and the leodcb flag is set to 0. Similarly, the GPS DCB
and its RMS for each PRN are read from a previous corDcb/codDcb file. For a given
PRN, if the most recent GPS DCB is more than five days old, data are not calibrated,
and the gpsdcb flag is set to 0.
Since the DCBs in the leoDcb and corDcb/codDcb files are in nano-seconds, a con-
cf 2 f22
version to TECU is necessary. The conversion factor is given by C (f12 −f 2 , where f1
0 1 2)
and f2 are the two GPS frequencies for the L1 and L2 signals, respectively, c is the
speed of light, and C0 = e2 /(8π 2 mε0 ) ≈ 40.3082 m3 /s2 is a constant where ε0 is the
permittivity of vacuum, m is the electron mass, and e is the elementary charge. That
is:
1 ns = 2.853336681 TECU . (22)
The LEO DCB (if leodcb flag = 1) and the GPS DCB (if gpsdcb flag = 1) are
then added to the uncalibrated TEC. For each arc of data, the leodcb age and the
gpsdcb age indicates the age in days of the LEO DCB and the GPS DCB, respectively.
Subroutines:
AtecTools::readStation – Reads and returns the Bernese satellite and antenna
name, given a CDAAC LEO ID and antenna ID.
AtecTools::findDcbFiles – Returns leoDcb or corDcb/codDcb files not more than
a given number of days older than a given date.
AtecTools::readDcb – Reads DCBs and their associated RMS values as a function of
PRN / STATION NAME (a 22 character string) from a leoDcb or corDcb/codDcb file.
PubFile->parse – Parses a CDAAC filename and returns a PubFile object.
TimeClass->new – Creates a new TimeClass object. Used to convert date and time
to GPS seconds since January 6, 1980, and vice versa.
Each new data arc (filename) is checked for arc overlap with previously generated arcs
(processed in a previous dump). In some cases overlap is allowed to avoid discontinu-
ities between dumps/days, e.g., because of a different LEO or GPS DCB used for two
consequtive dumps/days, or because the leveling of phases to pseudo-ranges could be
different when the last part of an arc (in the new dump/day) is taken into account. The
following rule applies: Filenames containing different data from the same arc (because
the first piece of the arc has already been processed earlier) must have the same start
time in the filename, and the latest arc must have a longer duration in the filename.
This should automatically be the case under normal circumstances where there are no
differences in the processing from one dump/day to another. However, when, e.g., a
new parmsfile is taken into use, and successive dumps/days are processed with differ-
ent parmsfiles, the rule of having the same start time in the filename (when there is
overlap) could potentially be broken (the rule of the latest arc having a longer duration
17
in the filename is ensured in atec edit.f). A given arc with a given start time, is
checked against all previously generated files starting within 90 minutes before the
start time of the given arc. If arc overlap is found that does not comply with the
rule, the newly generated arc is discarded. If a new arc is longer than 90 minutes
duration it is discarded (this probably never happens in practice, but is necessary to
ensure that such very long arcs are not overlooked when arcs from the next dump/day
are checked).
The checking for arc overlap in this way is done in an effort to provide the best quality
of data arcs that crosses the dump/day boundary, while at the same time ensuring
that previously processed files are not overwritten, and that overlap (for arcs where
the first piece has already been processed in a previous dump/day) is easy to identify
from the filenames: In case of arc overlap, there should only be a difference in the
file duration (the UUUU field), and the file with the longest duration should generally
contain the more accurate data.
Subroutines:
TimeClass->new – Creates a new TimeClass object. Used to convert date and time
to GPS seconds since January 6, 1980, and vice versa.
PubFile->new – Creates a new PubFile object. Used to handle CDAAC filename
structures.
Dplib::simplefn – Provides the filename for a given CDAAC path name.
PubFile->parse – Parses a CDAAC filename and returns a PubFile object.
PDL::NetCDF->new – Opens a NetCDF file and returns an object that can be used for
reading and writing.
2 makeMulCal.pl
AtecTools.pm checkOrbit
Dplib.pm readobs.f
PubFile.pm readleo.f
TimeClass.pm readgps.f
Tempdir.pm readatt.f sinzero.f
SP3.pm orbitint.f cubicbesl.f
makeMulCal.pl Tools.pm framerot.f linreg.f
OccTable.pm linintpol.f
atec_edit.f sinc.f
Dutil readcal.f
PDL rearc.f
PDL::NetCDF midval.f
Getopt::Long slipreg.f
writecal.f
limits.inc
18
The yellow boxes indicate Perl script/module and subroutines within the atec module.
The green boxes indicate Fortran code and subroutines within the atec module. The
brown boxes indicate other Perl modules, not within the atec module. Some of these
may have underlying dependencies not included in the diagram. The AtecTools.pm
module also depends on some of the brown modules. The grey boxes indicate open-
source code, not within the atec module. Some of these may have underlying depen-
dencies not included in the diagram.
The makeMulCal.pl script creates a multipath calibration file based on RINEX (podObs
or ionObs) observation files, SP3 (leoOrb/leoPor and igsOrb/iguOrb) orbit files, and
attitude (leoAtt or chpAcc) files, given a timespan and mission on the command-line
as well as a series of options. The output is a NetCDF file containing information
to reduce multipath effects on C1, P1 and P2 for a given LEO and antenna ID. The
detection of outliers and cycle-slip correction of the RINEX data is handed over to a
Fortran code atec edit.f executed from the makeMulCal.pl script.
YYYY.DDD-YYYY.DDD is the time span used to generate the multipath calibration file
MISSION is the name of the CDAAC mission
--prefix=filetype specifies the filetype podObs or ionObs, but only one of them (default is
--prefix=podObs)
--leo=# specifies the leo ID (default is --leo=1)
--ant=# specifies the antenna ID (default is --ant=0)
--post specifies that post-processed files should be used or . . .
--real to use real-time generated files (default is --post)
--att specifies that attitude data should be used (default is --att)
--pod specifies that precise LEO orbits should be used or . . .
--nopod to use predicted LEO orbits, but only if --real is set (default is --pod)
--flip specifies to turn the definition of the s/c frame 180 deg when the --noatt
option is set (default is --noflip)
--tmpdir=dirpath specifies the full path where to create (possibly overwrite) a “temporary”
directory named localtmp which will not be deleted after execution. Output
NetCDF file is put in dirpath/MISSION/... (default is to create a tem-
porary directory in /tmp that will be deleted automatically after execution,
and to put NetCDF output file in /PUB/MISSION/...)
--parmsfile=filename gives the name of the parameter filename to be passed on to the Fortran
program (default is --parmsfile=edit.parms1)
19
--calfile=filename gives the name of the input calibration filename to be passed on to the
Fortran program (default is --calfile=mulCal 1980.006.001.00 nc)
--datesfile=filename gives the name of a file containing dates to avoid for whatever reason (default
is no file)
20
– pve: Navigation solution in ECF coordinates (km)
21
– LEO position in ECF coordinates (km)
• mulCal YYYY.DDD.LLL.TT nc
NetCDF ‘config’ file including 3D data for pseudo-range local multipath calibra-
tion. The readcal.f code (cf. section 2.1) reads:
• edit.parms#
Fortran namelist file including tunable parameters for processing the data. The
atec edit.f code (cf. section 2.1) reads:
22
∗ mfit: Number of points to be fitted across a cycle-slip in the cycle-slip detection
algorithm (default is 20 data points)
∗ jderiv: The derivative order of the regularization (default is 2)
∗ postfac: Threshold of the number of standard deviations of the post-fit residual
P2-P1 noise during cycle-slip correction (default is 150)
∗ sigmax: Maximum threshold for the post-fit RMS error (default is 1 TECU)
∗ calphase: The L1 phase observable used (’L1’ or ’LA’) (default is ’LA’)
∗ calcode: The P1 pseudo-range observable used in the ’wide-lane’ (’C1’ or ’P1’)
(default is ’C1’)
– &output tunable parameters
∗ mulcal: Write out multipath calibration data file (default is .false.)
∗ abstec: Write out TEC arc files (default is true.)
∗ rawobs: Write read-in RINEX observations to standard output (default is .false.),
∗ orbits: Write read-in and interpolated orbits to standard output (default is .false.)
∗ wqlane: Write the ’wide-lane’ and the ’Q-lane’ to standard output for all arcs (default
is .false.)
∗ crvfit: Write the ionospheric combinations and the fitted curves across cycle-slips
to standard output (default is .false.)
∗ cslips: Write the location and number of cycles for each cycle-slip to standard
output (default is .false.)
∗ tecsmp: Write all the TEC arcs, pseudo-range local multipath, and off-boresight
angles to standard output (default is .false.)
– &grid tunable parameters
∗ grid0: The ‘lower left’ corner of the 3D grid for the pseudo-range local multipath
calibration file to be created (default is -100, -100, 0 (deg))
∗ lgrid: The number of grid points in each dimension (default is 201, 201, 1)
∗ dgrid: The grid resolution (default is 1, 1, 360 (deg))
• mulCal YYYY.DDD.LLL.TT nc
NetCDF ‘config’ file including 3D data for pseudo-range local multipath calibra-
tion. The makeMulCal.pl script (via PDL::NetCDF; cf. section 2.1) writes:
23
∗ antenna id: Id of the LEO antenna
∗ attflag: Flag indicating if attitude data were used in processing
∗ podflag: Flag indicating if precise or predicted LEO orbits were used
∗ parmsfile: Name of input parameter file
∗ calfile: Name of input multipath calibration file
3 makeLeoDcb.pl
AtecTools.pm readStation
Dplib.pm readDcb
PubFile.pm
TimeClass.pm
Tempdir.pm
makeLeoDcb.pl GetVersion.pm
atec_dcb1.f readdcb.f
atec_dcb2.f readtec.f
Dutil limits.inc
PDL
Getopt::Long
The yellow boxes indicate Perl script/module and subroutines within the atec module.
The green boxes indicate Fortran code and subroutines within the atec module. The
brown boxes indicate other Perl modules, not within the atec module. Some of these
may have underlying dependencies not included in the diagram. The AtecTools.pm
module also depends on some of the brown modules. The grey boxes indicate open-
source code, not within the atec module. Some of these may have underlying depen-
dencies not included in the diagram.
In real-time processing the makeLeoDcb.pl script creates a daily file with LEO Dif-
ferential Code Biases (DCBs) based on podTec and/or ionTec files generated for one
day (say, doy 100). It is supposed to be kicked off every day by a corDcb file usually
comming in about nine hours (UTC) into the next day (doy 101). The raw DCB es-
timation for each LEO and antenna ID is handed over to Fortran codes atec dcb1.f
and atec dcb2.f (the latter only if there is more than one antenna on a satellite)
executed from the makeLeoDcb.pl script. The final daily value (for doy 100) is based
on this raw (noisy) estimate as well as the already generated DCBs from a number of
previous days back (doy 99, 98, 97, etc. . . ). Thus the final daily value is smoothed
using a regularization method including previous DCBs. In post-processing the raw
daily DCBs are estimated for a whole date range using codDcb files instead of corDcb
files, and the regularization is performed over this range of days.
24
3.3 Usage and command-line options:
25
– Global attributes
∗ prn id: Id of the GPS satellite
∗ leodcb flag: Flag indicating if arc is LEO DCB calibrated
∗ leodcb: LEO DCB value (TECU; -999 if not calibrated)
∗ gpsdcb flag: Flag indicating if arc is GPS DCB calibrated
∗ gpsdcb: GPS DCB value (TECU; -999 if not calibrated)
• brnFil/MISSION.NN.STA
ASCII ‘config’ file including information about Bernese satellite and antenna
names. The AtecTools.pm module (readStation; cf. section 3.1) reads:
– PRN
– GPS DCB value (ns)
26
– Header information
∗ Year and day of year
∗ Time stamp indicating when file was created
– Bernese LEO ID and antenna ID
– LEO DCB value (ns)
– RMS of LEO DCB value (ns)
4 updateTEC.pl
readStation
AtecTools.pm readDcb
Dplib.pm findDcbFiles
PubFile.pm
updateTEC.pl TimeClass.pm
DBif.pm
PDL
PDL::NetCDF
Getopt::Long
The yellow boxes indicate Perl script/module and subroutines within the atec mod-
ule. The brown boxes indicate other Perl modules, not within the atec module.
Some of these may have underlying dependencies not included in the diagram. The
AtecTools.pm module also depends on some of the brown modules. The grey boxes
indicate open-source code, not within the atec module. Some of these may have
underlying dependencies not included in the diagram.
The updateTEC.pl script updates podTec/ionTec NetCDF files for a given daterange.
It is meant to be used in post-processing where LEO DCB values are calculated after
the generation of the podTec/ionTec files for a daterange (usually one month). The
update affects several global attributes as well as the TEC vector data. Also the
database is updated unless the --nodb option is specified. If the --bydump option
is specified (default) then the arcs crossing the midnight right before the daterange
(those will have dump yr/doy being the first date in the daterange) will be updated
as well. If the --byday option is specified, those files with arcs crossing the midnight
right before the daterange will instead be deleted (including their database entry if
any).
27
YYYY.DDD-YYYY.DDD is the time span in post-processing mode
MISSION is the name of the CDAAC mission
--prefix=filetype specifies list of filetypes seperated by commas (default is --prefix=podTec,ionTec)
--db specifies that the database should be populated (default is --db)
--bydump specifies that files should be updated based on dump yr/doy or . . .
--byday specifies that files should be updated based on arcyr/arcdoy (default is --bydump)
--pub=pubdir specifies where to find the podTec/ionTec files (default is --pub=/pub)
• brnFil/MISSION.NN.STA
ASCII ‘config’ file including information about Bernese satellite and antenna
names. The AtecTools.pm module (readStation; cf. section 4.1) reads:
28
∗ DDD: day of year
– PRN
– GPS DCB value (ns)
– RMS of GPS DCB value (ns)
29
5 catDCBs.pl
AtecTools.pm readDcb
catDCBs.pl PubFile.pm
TimeClass.pm
Getopt::Long
The yellow boxes indicate Perl script/module and subroutines within the atec mod-
ule. The brown boxes indicate other Perl modules, not within the atec module.
Some of these may have underlying dependencies not included in the diagram. The
AtecTools.pm module also depends on the brown modules. The grey box indicates
open-source code, not within the atec module. It may have underlying dependencies
not included in the diagram.
6 mulCal2ascii.pl
Dplib.pm
mulCal2ascii.pl PDL
PDL::NetCDF
The yellow box indicates a Perl script within the atec module. The brown box indicates
a Perl module, not within the atec module. It may have underlying dependencies not
included in the diagram. The grey boxes indicate open-source code, not within the
atec module. Some of these may have underlying dependencies not included in the
diagram.
30
6.2 Short description:
6.3 Usage:
References
Blewitt, G., 1990: An automatic editing algorithm for GPS data. Geophys. Res. Lett.,
17, 199–202.
Kuipers, J. B., 2002: Quaternions and Rotation Sequences. Princeton University Press,
Princeton.
31