Sie sind auf Seite 1von 227

GPS

MATLAB GPS SOFTWARE TOOLBOX


USER'S GUIDE AND REFERENCE MANUAL
-- VERSION 3.01 --
Copyright 1996-2001 by Lupash Consulting. All Rights Reserved Worldwide.
COPYRIGHT NOTICE
Copyright 1996-2001 by Lupash (LL) Consulting. All Rights Reserved Worldwide.
This software and related documentation are fully protected by the United States
copyright law. No part of this software and publication may be copied or distributed,
transmitted, transcribed, stored in a retrieval system, or translated into any human or
computer language, in any form and by any means, electronic, mechanical, magnetic,
manual, or otherwise, or disclosed to third parties without the express written
permission of Lupash (LL) Consulting, 2625 Monterey Pl., Fullerton, CA 92833.
TRADEMARK ACKNOWLEDGEMENTS
MATLAB is a registered trademark of The MathWorks, Inc.
IBM Personal System/2, OS/2, and IBM PC/XT/AT/386/486 are trademarks of IBM
Corporation.
MS-DOS, Microsoft FORTRAN, Microsoft C/QuickC and Microsoft Pascal are
trademarks of Microsoft Corporation.
Pentium is a registered trademark of Intel Corporation.
DISCLAIMER OF WARRANTY
We have made every effort to verify that GPS TOOLBOX software is working properly.
However, the software and manual are sold "as is" and without warranties as to
performance or merchantability. LL Consulting shall have no liability or responsibility of
any kind, including special, indirect or consequential damages, arising out of or resulting
from such software or the use or modification thereof. In no event shall LL Consulting be
liable or responsible for any problems that arise from the use of the GPS TOOLBOX
software and manual. This statement shall be construed, interpreted, and governed by the
laws of the state of California.
Preface
- Page iii -
PREFACE
Your Global Positioning System (GPS) engineering support software requirements can be
met efficiently, yet inexpensively, by using the MATLAB GPS Toolbox library of
GPS related m-file modules/programs developed by Lupash Consulting.
This software allows you to perform a variety of mathematical, scientific, and engineering
calculations related to the GPS applications quickly and easily, and it can help you
increase your productivity and improve your competitive position without effort -- at a
price you can afford.
Known as GPS Toolbox, Lupash Consulting's library of GPS related m-files supports a
full range of mathematical and engineering operations required by the implementation of
the GPS applications. It uses MATLAB environment and is operational on IBM Personal
System 2, IBM PC/XT/AT/386/486/Pentium and compatibles.
The current Version 3.x of GPS TOOLBOX library can interface with the entire range of
MathWorks toolboxes and by using MATLAB compilers you can generate high
performance C code from MATLAB m-files. GPS Toolbox gives you dozens of functions
for specific GPS applications, providing an integrated set of tools to speed up your
development and optimize your designs.
Manual Organization
This User's Guide and Reference Manual documents the architecture, functional design
and operational characteristics of GPS Toolbox.
Section 1.0, Getting, Started provides you with general information about the package.
Section 2.0, Architectural Overview and Functional Description, summarizes GPS
Toolbox architecture and functional setup. Functional Description provides you with a
structured, top-down, hierarchical description of the functional modules. Also included
are the library design specifications and list of functions by topics (see Tables 2-1).
Section 3.0, GPS Toolbox Examples, shows you how to use some m-file main programs
contained in the GPS Toolbox into your applications; all programs are ready to be used,
including input data sets. Furthermore, you can use the examples included herein as
starters for your own programs -- a quick and easy way to develop applications.
Section 4.0, Detailed Specifications for GPS Toolbox m-file modules, gives you, for each
GPS Toolbox m-file/module function listed in alphabetical order, the complete sequence
of calling parameters, functional specifications, operating instructions and other technical
details that will help you benefit from this powerful engineering and scientific support
library. Sections 5, Detailed Specifications for GPS Toolbox main programs, follows the
format used in section 4 for documentation of all main programs.
Preface
- Page iv -
Section 6.0 provides you with technical references. Appendix A includes a complete list
of functions and input/output files in alphabetical order. Finally, a user registration form
is included.
Language Implementation and MATLAB environment
MATLAB is a high performance interactive software environment for scientific and
engineering computation and visualization. It is a complete integrated system, well
beyond matrix laboratory, including graphics, programmable modules, a fast
interpreter, many analytical commands, and a possibility to generate high performance C-
code from m-files by using a MATLAB compiler. In MATLAB environment problem
solutions are expressed almost exactly as they are written mathematically. In industrial
settings, MATLAB is used for research and to solve practical engineering and
mathematically problems.
MATLAB has been acclaimed for many of its features and, in particular, for its ability to
allow engineers and scientists to implement algorithms efficiently. It is the environment
of choice for more than 200,000 technical professionals in industry and research around
the world.
In order to preserve the clarity and readability of the m-files, we elected to translate
almost literally the software design algorithms into self-documented code. We tried to be
consistent both in the layout of the programs and in the selection of the variable names.
Where necessary, comments are added to further increase the readability of the code. In
addition, the m-files were written such that they can be easily translated into other
languages, thus extending usefulness to other programming environments.
Version 3.x of GPS TOOLBOX replaces the earlier Version 2.x and incorporates more
than 200 m-files (modules and programs) as well as reference input/output data files,
which greatly expand the capabilities of its predecessor. All m-files are compatible with
MATLAB version 4.0 or higher, and most of them are also compatible with version 3.5
and Student Edition of MATLAB, exceptions are few main programs
We are confident at this point that the old m-file functions are virtually bug-free, and
hope that the newly added m-files (modules and main programs) follow the same pattern.
Should we identify any problems, we will keep you updated through our Technical
Assistance and Product Maintenance service. The source code is royalty free, i.e. the user
can incorporate this software in his/her particular application but is not permitted to resell
the software as is or with changes.
Lawrence Lupash, Ph.D.
Lupash (LL) Consulting
2625 Monterey Place
Fullerton, CA 92833-2084
USA
Table of contents
- Page v-
TABLE OF CONTENTS
Preface......................................................................................................................iii
Table of contents ...................................................................................................... v
1.0 Getting started........................................................................................................1-1
1.1 Package............................................................................................................1-1
1.2 Installation.......................................................................................................1-1
1.3 How to use the MATLAB GPS Toolbox........................................................1-2
2.0 Architectural overview and functional description ............................................2-1
2.1 Library architecture..........................................................................................2-1
2.2 Functional highlights........................................................................................2-2
2.3 Functional description......................................................................................2-3
2.3.1 GPS related constants and conversion factors.......................................2-4
2.3.2 Angle transformations............................................................................2-4
2.3.3 Coordinate transformations...................................................................2-4
(1) Point transformations......................................................................2-4
(2) Matrix transformations....................................................................2-5
(3) Vector transformations....................................................................2-5
2.3.4 Specialized plotting programs...............................................................2-5
2.3.5 Specialized statistics related functions..................................................2-6
2.3.6 GPS time utilities...................................................................................2-6
2.3.7 Specialized GPS data processing functions...........................................2-6
2.3.8 Trajectory and related utilities...............................................................2-7
2.3.9 Satellite position computation...............................................................2-7
2.310 Elevation and azimuth determination and satellite visibility................2-8
2.3.11 DOPs computation, satellite selection and related functions...............2-8
2.3.12 Special signal processing and Kalman filtering functions...................2-8
2.3.13 Pseudorange and deltarange determination and related functions.......2-9
2.3.14 Determination of users position and related functions.......................2-9
2.3.15 RAIM/FDE availability and integrity evaluation and related functions
...........................................................................................................2-10
2.4 List of functions by topics..............................................................................2-10
3.0 GPS Toolbox Examples .........................................................................................3-1
3.1 Matrix coordinate transformation generation...................................................3-2
3.2 Generation of a first order Gauss-Markov process ..........................................3-4
3.3 Generation of a second order Gauss-Markov process......................................3-6
3.4 Covariance analysis by using the conventional and alternate conventional
Kalman filter formulation................................................................................3-9
3.5 GPS time related utility transformations........................................................3-10
3.6 Read Yuma format almanac file and generate two ASCII data only files......3-12
3.7 Read RINEX 2 navigation message and generate three data files..................3-13
3.8 Determination of the WGS-84 geoid height correction.................................3-14
Table of contents
- Page vi
3.9 Generation and plotting of the longitude-latitude WAAS grid......................3-15
3.10 Determination of geodesic based on departure and destination points........3-16
3.11 Determination of great circle dead reckoning trajectory..............................3-19
3.12 Determination of acceleration from the input time/position/velocity data
and execution of relevant trajectory plots....................................................3-20
3.13 Determination of satellite position based on almanac/ephemeris data.........3-24
3.12 Determination of azimuth and elevation angles and execution of related
plots..............................................................................................................3-27
3.15 Determination of DOP quantities and execution of contour plots...............3-32
3.16 Satellite selection based on minimum GDOP criteria..................................3-36
3.17 Determination of iono correction and execution of related graphs..............3-38
3.18 Determination of tropospheric delay correction...........................................3-42
3.19 Determination of user clock errors...............................................................3-43
3.20 Determination of multipath error .................................................................3-44
3.21 Determination of user earth rotation error....................................................3-45
3.22 Computation of position fix through direct and iterative methods..............3-46
3.23 Evaluation of weighted least square navigation solution.............................3-48
3.24 GPS RAIM integrity evaluation...................................................................3-51
3.25 Determination of thresholds used in RAIM/FDE evaluations.....................3-53
3.26 RAIM fault detection availability determination.........................................3-56
3.27 RAIM fault exclusion availability determination.........................................3-61
3.28 GPS error budget determination...................................................................3-65
4.0 Detailed specifications for GPS Toolbox m-file modules....................................4-1
4.01 CEP ................................................................................................................4-1
4.02 CHI2_DOF.....................................................................................................4-1
4.03 CONVCON....................................................................................................4-1
4.04 DHMAX.........................................................................................................4-2
4.05 DOP1..............................................................................................................4-3
4.06 DOP2..............................................................................................................4-3
4.07 ELEVA...........................................................................................................4-3
4.08 ELEVAR........................................................................................................4-4
4.09 ELEVAZ........................................................................................................4-4
4.10 ELIMCOL ......................................................................................................4-5
4.11 ELIMROW.....................................................................................................4-5
4.12 FDNT .............................................................................................................4-5
4.13 FOM...............................................................................................................4-6
4.14 FPBIAS_C......................................................................................................4-6
4.15 FPBIAS_G......................................................................................................4-7
4.16 GAUSS_1.......................................................................................................4-7
4.17 GCNAV..........................................................................................................4-8
4.18 GDOPV..........................................................................................................4-8
4.19 GENRN..........................................................................................................4-9
4.20 GEODES........................................................................................................4-9
4.21 GEOIDH.........................................................................................................4-9
Table of contents
- Page vii
4.22 GMP1...........................................................................................................4-10
4.23 GMP2...........................................................................................................4-10
4.24 GPSCON......................................................................................................4-11
4.25 GPSLSEC.....................................................................................................4-11
4.26 GRIDWAAS................................................................................................4-12
4.27 HMAT..........................................................................................................4-12
4.28 HMATB.......................................................................................................4-12
4.29 HMATBC.....................................................................................................4-13
4.30 HMATC.......................................................................................................4-13
4.31 HPE..............................................................................................................4-14
4.32 IONOC.........................................................................................................4-14
4.33 IONOCON....................................................................................................4-15
4.34 KFCOV ........................................................................................................4-15
4.35 KFCOVA .....................................................................................................4-16
4.36 MBLLW.......................................................................................................4-17
4.37 MCUD..........................................................................................................4-17
4.38 MECEFECI ..................................................................................................4-18
4.39 MECEFENU................................................................................................4-18
4.40 MECEFINS..................................................................................................4-18
4.41 MECEFLLW................................................................................................4-19
4.42 MECIECEF..................................................................................................4-19
4.43 MENUECEF ................................................................................................4-20
4.44 MENULLW..................................................................................................4-20
4.45 MINSECEF..................................................................................................4-20
4.46 MLLWB.......................................................................................................4-21
4.47 MLLWECEF................................................................................................4-21
4.48 MLLWENU..................................................................................................4-22
4.49 MREAST......................................................................................................4-22
4.50 MSC2F.........................................................................................................4-22
4.51 MSF2C.........................................................................................................4-23
4.52 MUDC2F......................................................................................................4-23
4.53 MUDD..........................................................................................................4-24
4.54 MUDF2C......................................................................................................4-24
4.55 MUDM.........................................................................................................4-24
4.56 MUDM1.......................................................................................................4-25
4.57 NCCHI2_10.................................................................................................4-26
4.58 NCCHI2_2...................................................................................................4-27
4.59 NCCHI2_3...................................................................................................4-27
4.60 NCCHI2_4...................................................................................................4-27
4.61 NCCHI2_5...................................................................................................4-28
4.62 NCCHI2_6...................................................................................................4-28
4.63 NCCHI2_7...................................................................................................4-29
4.64 NCCHI2_8...................................................................................................4-29
4.65 NCCHI2_9...................................................................................................4-29
4.66 PIONOC.......................................................................................................4-30
Table of contents
- Page viii
4.67 PRADR ........................................................................................................4-30
4.68 PZ90CON.....................................................................................................4-31
4.69 QRUPA ........................................................................................................4-32
4.70 RAIMFD......................................................................................................4-32
4.71 RAIMST.......................................................................................................4-33
4.72 RANGE........................................................................................................4-34
4.73 RMS.............................................................................................................4-34
4.74 RMS2...........................................................................................................4-34
4.75 RSS...............................................................................................................4-35
4.76 RSSXY .........................................................................................................4-35
4.77 RWALK .......................................................................................................4-35
4.78 SDOP............................................................................................................4-36
4.79 SELECTD....................................................................................................4-36
4.80 SG85CON....................................................................................................4-37
4.81 SLOPEMAX ................................................................................................4-37
4.82 STATUP.......................................................................................................4-38
4.83 SVPALM......................................................................................................4-38
4.84 SVPEPH.......................................................................................................4-39
4.85 SVSEL4........................................................................................................4-39
4.86 SVSEL5........................................................................................................4-40
4.87 SVSEL6........................................................................................................4-41
4.88 SWDOP........................................................................................................4-41
4.89 TADMSRAD...............................................................................................4-42
4.90 TARADDMS...............................................................................................4-42
4.91 TECEFGD....................................................................................................4-42
4.92 TECEFGD2.................................................................................................4-43
4.93 TGDECEF...................................................................................................4-43
4.94 TIMETR......................................................................................................4-44
4.95 TRAJ S.........................................................................................................4-44
4.96 TROPOC1...................................................................................................4-45
4.97 UCLOCK ....................................................................................................4-45
4.98 UERCOR.....................................................................................................4-46
4.99 UPOSD4......................................................................................................4-46
4.100 UPOSDG....................................................................................................4-47
4.101 UPOSIT......................................................................................................4-47
4.102 UVERV......................................................................................................4-47
4.103 VBLLW......................................................................................................4-48
4.104 VECEFECI ..............................................................................................4-48
4.105 VECEFENU...............................................................................................4-49
4.106 VECEFGD.................................................................................................4-49
4.107 VECEFINS.................................................................................................4-50
4.108 VECEFLLW...............................................................................................4-50
4.109 VECEFP90................................................................................................4-50
4.110 VECEFS85................................................................................................4-51
4.111 VECIECEF................................................................................................4-51
Table of contents
- Page ix
4.112 VENUECEF...............................................................................................4-52
4.113 VENUGD...................................................................................................4-52
4.114 VENULLW................................................................................................4-52
4.115 VEP............................................................................................................4-53
4.116 VGDECEF .................................................................................................4-53
4.117 VGDENU...................................................................................................4-54
4.118 VINSECEF.................................................................................................4-54
4.119 VLLWB......................................................................................................4-55
4.120 VLLWECEF...............................................................................................4-55
4.121 VLLWENU................................................................................................4-56
4.122 VP90ECEF.................................................................................................4-56
4.123 VS85ECEF.................................................................................................4-56
4.124 WDOP1......................................................................................................4-57
4.125 WDOP2......................................................................................................4-57
4.126 WDOPV.....................................................................................................4-58
4.127 WGS72CON..............................................................................................4-58
4.128 WGS84CON..............................................................................................4-59
5.0 Detailed specifications for GPS Toolbox m-file main programs........................5-1
5.01 XAMBIG........................................................................................................5-1
5.02 XATRANS.....................................................................................................5-1
5.03 XCEPVEP......................................................................................................5-2
5.04 XCON.............................................................................................................5-2
5.05 XDOP.............................................................................................................5-3
5.06 XEBUDGET ..................................................................................................5-3
5.07 XECEF2GD_COMP......................................................................................5-4
5.08 XELAZ...........................................................................................................5-5
5.09 XELIMRC......................................................................................................5-6
5.10 XFDNT...........................................................................................................5-6
5.11 XFOM............................................................................................................5-7
5.12 XGCDR..........................................................................................................5-7
5.13 XGCNAV.......................................................................................................5-8
5.14 XGDOPV .......................................................................................................5-8
5.15 XGENRN.......................................................................................................5-9
5.16 XGEODES...................................................................................................5-10
5.17 XGEOIDH....................................................................................................5-10
5.18 XGMP1........................................................................................................5-11
5.19 XGMP2........................................................................................................5-12
5.20 XGPSLSEC..................................................................................................5-12
5.21 XGPSTIME..................................................................................................5-13
5.22 XGRIDW.....................................................................................................5-13
5.23 XHMATALL................................................................................................5-14
5.24 XHPE ...........................................................................................................5-14
5.25 XIONOC......................................................................................................5-15
5.26 XKFCOV .....................................................................................................5-16
Table of contents
- Page x
5.27 XMAPDOP..................................................................................................5-17
5.28 XMISDAT....................................................................................................5-18
5.29 XMPATH.....................................................................................................5-18
5.30 XMTRANSF................................................................................................5-19
5.31 XMUDDU....................................................................................................5-20
5.32 XMUD..........................................................................................................5-20
5.33 XOPCR ........................................................................................................5-21
5.34 XPBAR.........................................................................................................5-22
5.35 XPBIAS........................................................................................................5-22
5.36 XPELAZA....................................................................................................5-23
5.37 XPELAZS....................................................................................................5-24
5.38 XPPFWLS....................................................................................................5-25
5.39 XPPVA.........................................................................................................5-26
5.40 XPPVAJ .......................................................................................................5-26
5.41 XPPRADR...................................................................................................5-27
5.42 XPTRANSF .................................................................................................5-28
5.43 XQRUPA .....................................................................................................5-29
5.44 XRAIMDA...................................................................................................5-29
5.45 XRAIMEA ...................................................................................................5-31
5.46 XRAIMFD....................................................................................................5-32
5.47 XRAIMST....................................................................................................5-32
5.48 XREADALM...............................................................................................5-33
5.49 XRINEXN....................................................................................................5-34
5.50 XRWALK ....................................................................................................5-35
5.51 XSAERR......................................................................................................5-35
5.52 XSDOP.........................................................................................................5-36
5.53 XSLOPE.......................................................................................................5-36
5.54 XSORTREC.................................................................................................5-37
5.55 XSTAT.........................................................................................................5-37
5.56 XSTATC......................................................................................................5-38
5.57 XSVPALM...................................................................................................5-38
5.58 XSVPCOMP................................................................................................5-39
5.59 XSVPEPH....................................................................................................5-40
5.60 XSVSEL.......................................................................................................5-41
5.61 XSWDOP.....................................................................................................5-42
5.62 XTRAJ S.......................................................................................................5-42
5.63 XTROPOC1.................................................................................................5-43
5.64 XUCLOCK...................................................................................................5-43
5.65 XUERCOR...................................................................................................5-44
5.66 XUPOSD4....................................................................................................5-45
5.67 XUPOSDG...................................................................................................5-46
5.68 XUPOSIT.....................................................................................................5-46
5.69 XVTRANSF.................................................................................................5-47
5.70 XWDOP.......................................................................................................5-48
5.71 XWDOPV ....................................................................................................5-49
Table of contents
- Page xi-
5.72 XYP1............................................................................................................5-49
5.73 XYP1S..........................................................................................................5-50
5.74 XYP2W........................................................................................................5-51
5.75 XYP3W........................................................................................................5-51
5.76 XYPC2.........................................................................................................5-52
5.77 XYPC2RSS..................................................................................................5-53
5.78 XYPM..........................................................................................................5-53
5.79 XYPRSS.......................................................................................................5-54
5.80 XYPRSS2W.................................................................................................5-54
5.81 XYPPVSTD.................................................................................................5-55
6.0 References ...............................................................................................................6-1
Appendix A. List of functions and input/output files in alphabetical order ........7-1
A.1 List of modules.............................................................................................7-1
A.2 List of main programs..................................................................................7-4
A.3 List of input files..........................................................................................7-5
A.4 List of output files........................................................................................7-7
A.5 List of input and output mat-files.................................................................7-8
Registration form...........................................................................................................8-1
Table of contents
- Page xii-
Chapter 1 Getting Started
- Page 1-1 -
1.0 GETTING STARTED
1.1 Package summary
The GPS TOOLBOX package includes software documentation and program diskette.
The documentation consists essentially of the USER'S GUIDE AND REFERENCE
MANUAL.
The software, referred as the GPS TOOLBOX, is provided on 3"1/2 diskette. The
following files or subdirectories are included:
GPSMOD.M; this subdirectory contains the GPS TOOLBOX m-files modules
(source code),
GPSPRG.M; this subdirectory contains the GPS TOOLBOX m-files main programs
(source code),
GPSINP.DAT; this subdirectory contains the GPS TOOLBOX input ASCII data files
(*.dat) for main programs,
GPSOUT.OUT; this subdirectory contains the GPS TOOLBOX output data files
generated by executing the main and programs with input data files specified in the
subdirectory GPSINP.DAT
GPSIO.MAT; this subdirectory contains the GPS TOOLBOX input/output mat-files
(*.mat) compressed using PKZIP,
README.TXT (optional); this file contains notes about current version, including
changes and upgrades.

The README.TXT file may contain changes and additions, if any, which are not
included in this manual. If a README.TXT file is included, be sure to read it before you
use the software. In case of conflict between the manual and the README.TXT file, the
latter takes precedence.

The GPS TOOLBOX software package version 3.x is fully compatible with earlier
versions and can interface with the entire range of MATLAB toolboxes or personal
application-dependent m-files. At the same time, by using MATLAB compilers one can
generate high performance C code from MATLAB application-dependent m-files, and,
therefore, an efficient executable program can be created by using mixed m-files and C/
FORTRAN/ Pascal modules.


1.2 Installation

To install GPS TOOLBOX, the first thing you should do is to make a copy of the
distribution diskettes, and store the original diskettes in a safe place. You are free to make
backup copies, however, we ask you not to give any of these copies to anyone else.
Chapter 1 Getting Started
- Page 1-2 -


To make the GPS Toolbox m-files accessible to other MATLAB programs copy the file
GPSMOD.M into the desired area.

If you want to check directly some examples install the files included in the subdirectory
GPSPRG.M and run one of the main programs listed in this directory; depending on the
main program used additional m-files modules maybe required as well as input data from
the subdirectory GPSINP.DAT. A complete list of main programs and referenced
input/output files is listed in Table 2-1.

This software is not copy protected. However, you are authorized to make back-up copies
of the software for your archives only, for the sole purpose of protecting your investment
from loss. You are free to move this software from one computer location to another as
long as there is no possibility of it being used at two locations at one time.


1.3 How to use the GPS TOOLBOX

In order to use the GPS TOOLBOX software we recommend the following steps:

create a directory called GPSTOOL, and insert this name into path
copy the m-file modules from GPSMOD.M into the directory GPSTOOL
copy the m-file main programs from GPSPRG.M into the directory GPSTOOL
optional, copy the input data files from GPSINP.DAT and GPSMAT.MAT into the
directory GPSTOOL
optional, copy the output data files from GPSOUT.DAT into the directory GPSTOOL
In a specific application program you need to call only a few of the GPS TOOLBOX m-
file modules, and only the modules you call are linked to your program.
When linking GPS TOOLBOX m-file modules to your application program, you should
not define your own subprograms by the same name as any of the modules used in the
GPS TOOLBOX.
When you invoke the GPS TOOLBOX library modules from your applications, you must
use the same order and type for each argument in the calling sequence as indicated in this
manual.
You can develop multi-language applications. For example, you can compile the desired
m-files with the MATLAB compiler to generate C-modules and then link those modules
with other application dependent C-programs.
Chapter 2 Library architecture
- Page 2-1
2.0 ARCHITECTURAL OVERVIEW AND FUNCTIONAL DESCRIPTION
2.1 Library architecture
Consistent with our modular, structured approach to software development and
implementation, GPS TOOLBOX software has been designed as a system rather than as a
collection of me-too functions.
This provides the ability to link your applications only with those m-file modules that are
really needed, thus allowing you to reduce the size of your executable modules. This is
done automatically when using GPS TOOLBOX.
As an added benefit, you can also "cut-and-paste" just a few functions if this is what you
need for your applications.
The major building functions of the GPS TOOLBOX can be divided in the following
categories:
GPS related constants and conversion factors
Angle transformations
Coordinate transformations
- Point transformation
- Matrix transformation generation
- Vector transformation
Specialized plotting programs
Specialized statistics related functions
GPS time utilities
Specialized GPS data processing functions
Trajectory and related utilities
Satellite position computation
Elevation and azimuth determination, and satellite visibility
DOPs computation, satellite selection and related functions
Special signal processing and Kalman filter functions
Pseudorange and deltarange determination, and related functions
Determination of users position and related functions
RAIM/FDE availability and integrity evaluation and related functions

The m-files are separated in two categories, namely m-file modules and m-file main
programs. The m-file modules are elementary blocks that are incorporating independent
algorithms and most of the times do not call other elementary blocks; in general, each m-
file module is used by one or more main programs and doesnt have input/output
(read/write) interface. The m-file main programs are used as a high level module
incorporating a specific task, e.g. computation of Receiver Autonomous Integrity
Monitoring fault detection availability.
Chapter 2 Functional highlights
- Page 2-2
The functional specifications of these subsystems are provided in section 2.3, while
detailed descriptions of each m-file module and m-file main programs are given in
sections 4 and 5, respectively.

2.2 Functional Highlights

GPS Toolbox Version 3.x consists of various functional modules that perform
mathematical services frequently encountered in GPS related engineering calculations.

These m-file modules and m-file main programs, referred also as functions, are written in
MATLAB language / environment.

GPS Toolbox helps you solve many industrial, scientific, and engineering problems
related to GPS quickly and easily. This is because:

GPS Toolbox modules are elementary building blocks, thus giving you the flexibility
to combine them in many ways to fit your specific application's needs

these functions are input/output free, except some utilities, so they can be attached to
other application's input and output modules

an open-ended strategy was followed which means that you can either complement
the GPS Toolbox services with functions of your own or, alternatively, use GPS
Toolbox modules and programs as add-ons in conjunction with other libraries

the software is written clearly, without gimmicks, and is well documented, thus
making it easy for you to understand the algorithms and to use the code as a starting
point for your own programs.

m-file main programs have associated input data files, and therefore are ready to be
used without any additional users effort; for benchmark testing the correspon-ding
output files are included.

The m-file modules together with main programs are intended for multipurpose use as

a simulation tool. It can generate a realistic simulation for numerous aspects of GPS
applications.

a performance analysis tool. It can execute a variety of data analysis functions
including statistics and graphing.

a starting point for users GPS related applications. The user can modify existent m-
files to suit a specific application without the need to implement elementary building
blocks that are implemented in this toolbox.
Chapter 2 Functional description
- Page 2-3
In addition, the effort was made to implement the most efficient algorithms available in
the technical literature. When appropriate, more than one module performs the same
mathematical computation by using different methods, so you can select the approach that
best meets your specific requirements.

Here is a summary of the most significant features of GPS Toolbox software:

all m-file modules and programs are written in MATLAB language/environment.

all m-file modules are free of input/output statements (except, of course, for those
utilities that require printed output/graph, if any)

all m-file modules are provided with detailed documentation, including scope, usage,
description of parameters, remarks/notes, references, external Matlab macros used,
and date of last update.

all m-file main programs are provided with detailed documentation, including scope,
usage, list of inputs, list of outputs, references, external Matlab macros used, and date
of last update.
2.3 Functional description
The functions included in the GPS TOOLBOX are divided in several categories, each one
is described in a separate paragraph. Each function contains both m-file modules and m-
file main programs.
As naming conventions, the name of a main program starts with the letter X, and the
input/output data files associated with a specific main program, when possible, have the
same name except the extensions. The convention used for the extension is as follows:
dat for input files, out for output files, mat for input/output mat-files, and m for
m-files.
All m-files are presented in alphabetic order in sections 4 for modules and 5 for main
programs. A complete list of functions based on subjects is included in section 2.4
Section 3 contains numerous representative examples, including detail related to the input
and output files.
Appendix A includes a complete list of all functions, i.e. modules and main programs,
and input/output files by alphabetical order.
Overall, there are more than 200 m-files (modules and main programs), and about 100
input *.dat files, output *.out files, and input/output *.mat files.
Chapter 2 Functional description
- Page 2-4
2.3.1 GPS related constants and conversion factors
This function includes the most frequently used GPS related constants and conversion
factors called by other m-files from GPS Toolbox or by application dependent m-files.
The following m-file modules and main programs are included:
setting the most used conversion constants, see CONVCON,
initialization of the most frequently used GPS constants, of the WGS-72 constants,
and of the WGS-84 constants, see GPSCON, WGS72CON, WGS84CON,
initialization of the most frequently used GLONASS constants included in PZ-90 and
SGS-85,
main program displaying constants and conversion factors specified in the above
listed modules, see XCON.
2.3.2 Angle transformations
This function includes the most frequently used angle transformations called by other m-
files from GPS Toolbox or by application dependent m-files. The following m-file
modules and main programs are included:
conversion of degrees/minutes/seconds to/from radians, see TADMSRAD,
TARADDMS,
main program executing angle transformations specified in the above listed modules,
see XATRANSF.
2.3.3 Coordinate transformations
This function includes the most frequently used coordinate transformations called by
other m-files from GPS Toolbox or by application dependent m-files. The following m-
file modules and main programs are included in three categories:
(1) Point transformations
transformation of ECEF coordinates to/from geodetic coordinates for a position point,
see TECEFGD, TCEFGD2, TGDECEF,
main program executing point transformations specified above (by selection), see
XPTRANSF.
main program executing a comparison between two ECEF to geodetic transformation
methods, see XECEF2GD_COMP.
(2) Matrix transformations

transformation matrix of ECEF to/from ENU, of ECEF to/from local level wander
Chapter 2 Functional description
- Page 2-5
azimuth, of ECEF to/from INS, of ENU to/from local level wander azimuth, of local
level wander azimuth to/from GPS body, of ECEF to/from ECI, see MECEFENU,
MENUECEF, MECEFLLW, MLLWECEF, MECEFINS, MINSECEF, MENULLW,
MLLWENU, MLLWB, MBLLW, MECEFECI, MECIECEF,
main program generating matrix transformations specified above (by selection), see
XMTRANSF.
(3) Vector transformations

transformation of ECEF frame to/from ENU frame, of ECEF to/from local level
wander azimuth angle frame, of ECEF frame to/from INS frame, of ENU frame
to/from local level wander azimuth frame, of local level wander azimuth frame
to/from GPS body frame, of ECEF frame to/from geodetic, of ENU to/from geodetic,
for a given vector and a reference point/angles, of ECEF frame to/from ECI, ECEF
to/from PZ-90, and ECEF to/from SGS-85, see VECEFENU, VENUECEF,
VECEFLLW, VLLWECEF, VECEFINS, VINSECEF, VENULLW, VLLWENU,
VLLWB, VBLLW, VECEFGD, VGDECEF, VENUGD, VGDECEF, VECEFECI,
VECIECEF, VECEFP90, VP90ECEF, VECEFS85, VS85ECEF,
main program executing vector transformations specified above (by selection), see
XVTRANSF.
2.3.4 Specialized plotting programs
This function includes specialized plotting used independently to graph ASCII data stored
in user defined files. In all cases the user can select the input files(s), enter from keyboard
the title, x and y labels, insert the computed statistics on the graph window (when
available), and select the manual scaling (when available). The following m-file main
programs are included:
execution of a bar graph for a selected column, see XPBAR,
execution of a x-y plot, with or without statistics and manual scaling, see XYP1 and
XYP1S,
execution of a x-y graph for two selected columns in two different windows
(subplots), with statistics, see XYP2W,
execution of a x-y graph for three selected columns in three different windows
(subplots), with statistics, see XYP3W,
execution of a x-y graph of the difference between columns (from two different files),
with statistics, see XYPC2,
execution of a x-y graph of RSS (root sum square) of the difference of three columns
from two different files, with statistics, see XYPC2RSS,
execution of a x-y graph for the selected multiple columns, see XYPM,
execution of a x-y graph of RSS (root sum square) of three selected columns, with
statistics, see XYPRSS,
Chapter 2 Functional description
- Page 2-6
execution of a x-y graph of RSS (root sum square) of selected columns corresponding
to position and velocity errors, in two windows (subplots) with statistics, see
XYPRSS2W,
execution of a x-y graph for a selected column and the associated envelope (standard
deviation), with statistics, see XYPVSTD.
2.3.5 Specialized statistics related functions
This function includes specialized statistics utilities used by other m-files from GPS
Toolbox or by application dependent m-files, which are not included in the basic
MATLAB. The following m-file modules and main programs are included:
computation of circular error probable and vertical error probable, see CEP, VEP and
XCEPVEP,
computation of Figure-of-merit value based on ICD-059 table, see FOM and XFOM,
computation of root mean square (RMS), root sum square of three/two component
vector sample, computation of running mean, standard deviation and root mean
square for a set of real samples, see RMS, RMS2, RSS, RSSXY, STATUP, and
XSTAT,
determination of mean, standard deviation, and root mean square of the elements of a
specified column, see XSTATC,
determination of GPS error budget.
2.3.6 GPS time utilities
This function includes GPS time utilities used by other m-files from GPS Toolbox or by
application dependent m-files. The following m-file modules and main programs are
included:
determination of UTC leap seconds value for a specified year between 1980 and 2059,
see GPSLSEC, XGPSLSEC,
determination of GPS time of transmission based on time of measurement (reception),
see TIMETR,
main program executing GPS time related transformations, namely (1) from (year,
month, day) to (GPS week, GPS roll number, day of week), (2) from (GPS week, day
of week, GPS roll number) to (day of week, day, month, year), (3) from (day of week,
hour, minute, second) to (time of week), (4) from (time of week) to (day of week,
hour, minute, second), see XGPSTIME.
2.3.7 Specialized GPS data processing functions
This function includes specialized GPS data processing utilities used by other m-files
from GPS Toolbox or by application dependent m-files. The following m-file modules
and main programs are included:
Chapter 2 Functional description
- Page 2-7
elimination of a specified column or row from a matrix, see ELIMCOL, ELIMROW,
and XELIMRC,
selection of the different elements from a specified array, see SELECTD,
storage transformations from one dimensional array to two dimensional array for
symmetric matrices and UD factors, see MSC2F, MSF2C, MUDC2F, and MUDF2C,
main program determining the missing data into a specified column of an input table,
see XMISDAT,
main program reading Yuma almanac data and creating two data files, see
XREADALM,
main program reading RINEX 2 navigation message file and creating three data files,
see XRINEXN,
main program sorting the records based on the elements of a specified column (in
ascending order), see XSORTREC.
2.3.8 Trajectory and related utilities
This function includes trajectory related utilities used by other m-files from GPS Toolbox
or by application dependent m-files, as well as several main programs related to great
circle navigation and dead reckoning. The following modules and main programs are
included:
determination of great circle navigation position, velocity and acceleration, see
GCNAV and XGCNAV,
determination of great circle dead reckoning trajectory, see XGCDR,
determination of geodetic data for a specified departure-destination pair, see
GEODES and XGEODES,
determination of WGS-84 geoid height correction, see GEOIDH and XGEOIDH,
generation of longitude-latitude WAAS grid, see GRIDWAAS and XGRIDW,
computation of the horizontal position error when latitude/longitude for two points
are specified, see HPE and XHPE,
determination of vehicle trajectory in straight segment with constant speed, see
TRAJ S and XTRAJ S,
main program determining acceleration from position/velocity data and plotting all
relevant trajectory information, see XPPVA,
main program determining acceleration and jerk from position and velocity data, and
plotting all relevant trajectory information, see XPPVA..
2.3.9 Satellite position computation
This function includes the m-files used in the computation of the satellites ECEF position
based on almanac or ephemeris data. The following m-file modules and main programs
are included:
Chapter 2 Functional description
- Page 2-8
computation of ECEF satellites position based on satellites almanac data, see
SVPALM and XSVPALM,
computation of ECEF satellites position based on satellites ephemeris data, see
SVPEPH and XSVPEPH,
main program determining RSS satellite position difference based on ephemeris and
almanac data, and executing the corresponding graph., see XSVCOMP.
2.3.10 Elevation and azimuth determination and satellite visibility
This function includes the most commonly used GPS utilities for azimuth and elevation
determination, satellites visibility called by other m-files from GPS Toolbox or by
application dependent m-files as well as main programs plotting the azimuth-elevation
angles repartition. The following m-file modules and main programs are included:
computation of elevation angle, azimuth angle, unit line-of-sight vector and range, see
ELEVA, ELEVAR, ELEVAZ, RANGE, UVERV,
main programs determining and plotting azimuth and elevation angles for a specified
satellite or for all visible satellites (sky-plot), see XELAZ, XPELAZA, XPELAZS.
2.3.11 DOPs computation, satellite selection and related functions
This function includes the m-files used in the computation of the dilution of precision
(DOP) quantities, the weighted dilution of precision (WDOP) quantities, and the satellites
selection based on minimum geometric dilution of precision (GDOP). The following m-
file modules and main programs are included:
computation of DOP quantities, see DOP1, DOP2, and XDOP1, XDOP2,
approximate computation of GDOP, see GDOPV and XGDOPV,
computation of weighted DOP quantities, see WDOP1, WDOP2, WDOPV, and
XWDOP1, XWDOP2, XWDOPV,
selection of a set of four, five or six best satellites based on minimum geometric
dilution of precision, see SVSEL4, SVSEL5, SVSEL6 and XSVSEL,
determination of observation matrix based on line-of-sights, baro and clock
measurements, see HMAT, HMATB, HMATBC, HMATC and HMATALL,
main program determining the repartition of number of visible satellites and the
corresponding DOPs for a specified geographical area, see XMAPDOP.
2.3.12 Special signal processing and Kalman filter functions
This function includes the m-files used in the generation of random number sequences
with normal distribution, mean and standard deviation specified, generation of random
walk sequences, generation of first and second order Gauss-Markov sequences, utilities
related to the implementation of weighted least square iterative method and discrete
Chapter 2 Functional description
- Page 2-9
Kalman filter U-D mechanization, and Kalman filter covariance analysis. The following
m-file modules and main programs are included:
generation of random number sequences with normal distribution, mean and standard
distribution specified, and random walk sequences, see GENRN, RWALK, and
XGENRN, XRWALK,
generation of first and second order Gauss-Markov sequences, see GMP1, GMP2, and
XGMP1, XGMP2,
implementation of utilities related to weighted least square iterative method and
Kalman filter U-D mechanization, see MCUD, MREAST, MUDD, MUDM,
MUDM1, and XMUDDU, XMUDM,
implementation of Kalman filter covariance analysis, see KFCOV, KFCOVA, and
XKFCOV.
2.3.13 Pseudorange and deltarange determination and related functions
This function includes the m-files used in the determination of pseudorange and
deltarange. The following m-file modules and main programs are included:
Determination of L1 iono correction by using Klobuchar model, see IONOC,
IONOCON, and XIONOC,
computation of pseudorange measurement corrected for ionospheric effects when
pseudoranges measured on L1/L2 are available, see PIONOC,
determination of tropospheric correction, see TRPOC1 and XTROPOC1,
determination of user bias and drift, see UCLOCK and XUCLOCK,
determination of user earth rotation correction vector, see UERCOR and XUERCOR,
determination of pseudorange and accumulated delta range, see PRADR and
XPRADR,
main program generating and saving the multipath pseudorange errors, see XMPATH,
main program generating SA errors, see XSAERR.
2.3.14 Determination of users position and related functions
This function includes the m-files used in the determination of the users position when
four or more satellite positions and the corresponding pseudoranges are known. The
following m-file modules and main programs are included:
computation of users position based on a direct method, see UPOSD4, UPOSDG,
and XUPOSD4, XUPOSDG,
computation of users position based on an iterative method, see UPOSIT and
XUPOSIT,
main program determining position fixes using weighted least squares algorithm
when the user is stationary, see XPFWLSS.
Chapter 2 List of functions by topics
- Page 2-10
2.3.15 RAIM/FDE availability and integrity evaluation and related functions
This function includes the m-files used in the determination of the availability and
integrity; the baseline algorithms for Receiver Autonomous Integrity Monitoring (RAIM)
failure detection are implemented. The following m-file modules and main programs are
included:
determination of probability density function for (1) normal Gaussian distribution,
(2) Chi-square distribution with specified degree of freedom, (3) non-central Chi-
square distribution with specified degree of freedom, see GAUSS_1, CHI2_DOF, and
NCCHIS2_K,
RAIM integrity failure detection and isolation utilities, see DHMAX, RAIMST,
SLOPEMAX, QRUPA, and XQRUPA, XRAIMST, XOPCR, XSLOPE,
RAIM integrity failure detection and exclusion, see RAIMFD and XRAIMFD,
Determination of sub-dilution of precision (sub-DOP) and sub-weighted dilution of
precision (sub-WDOP), see SDOP, SWDOP, and XSDOP, XSWDOP,
determination of fault detection normalized thresholds, see FDNT, and XFDNT,
determination of parity bias by using Gaussian distribution for degree of freedom
(dof) =1, and Chi-square distribution for dof >1, see FBIAS_C, FBIAS_G, and
XPBIAS,
main program determining the RAIM fault detection availability, see XRAIMDA,
main program determining the RAIM fault exclusion availability, see XRAIMEA.
2.4 List of functions by topics
The following table, Table 2-1, includes a complete list of functions (modules and main
programs) by topics.
Table 2-1.
GPS related constants and conversion factors
convcon most used conversion constants
gpscon most used GPS constants
pz90con most used PZ-90 constants
sgs85con most used SGS-85 constants
wgs72con most used WGS-72 constants
wgs84con most used WGS-84 constants
xcon
main program displaying constants specified in macros convcon, gpscon,
pz90con, sgs85con, wgs72con, and wgs84con
Chapter 2 List of functions by topics
- Page 2-11
Angle transformations
tadmsrad degrees/minutes/seconds to radians
taraddms radians to degrees/minutes/seconds
xatransf
main program executing angle transformations from/to
degrees/minutes/seconds to/from radians (by selection)
Coordinate transformations - Point transformation
tecefgd ECEF to geodetic coordinates (direct method)
tecefgd2 ECEF to geodetic coordinates (iterative method)
tgdecef geodetic to ECEF coordinates
xptransf
main program executing transformations from/to ECEF/geodetic to/from
geodetic/ECEF coordinates
xecef2gd_comp
main program executing comparison between the two ECEF to geodetic
transformation methods
Coordinate transformations - Matrix transformation
mbllw GPS body to LLW (Local Level Wander azimuth)
mecefeci ECEF (Earth Centered Earth Fixed) to ECI (Earth Centered Inertial)
mecefenu ECEF (Earth Centered Earth Fixed) to ENU (East, North, Up)
mecefins ECEF (Earth Centered Earth Fixed) to INS (Wander / North, West, Up)
mecefllw ECEF (Earth Centered Earth Fixed) to (Local Level Wander azimuth)
meciecef ECI (Earth Centered Inertial) to ECEF (Earth Centered Earth Fixed) )
menuecef ENU (East, North, Up) to ECEF (Earth Centered Earth Fixed)
menullw ENU (East, North, Up) to LLW (Local Level Wander azimuth)
minsecef INS (Wander / North, West, Up) to ECEF (Earth Centered Earth Fixed)
mllwb LLW (Local Level Wander azimuth) to GPS body
mllwecef LLW (Local Level Wander azimuth) to ECEF (Earth Centered Earth Fixed)
mllwenu LLW (Local Level Wander azimuth) to ENU (East North Up)
xmtransf
main program generating matrix transformations specified in the above
mentioned list (by selection)
Coordinate transformations - Vector transformation
vbllw GPS body to LLW (Local Level Wander azimuth)
Chapter 2 List of functions by topics
- Page 2-12
vecefeci ECEF (Earth Centered Earth Fixed) to ECI (Earth Centered Inertial)
vecefenu ECEF (Earth Centered Earth Fixed) to ENU (East, North, Up)
vecefgd
ECEF (Earth Centered Earth Fixed) to Geodetic (latitude, longitude, altitude)
for a given position vector and a reference point
vecefins ECEF (Earth Centered Earth Fixed) to INS (Wander / North, West, Up)
vecefllw ECEF (Earth Centered Earth Fixed) to LLW (Local Level Wander azimuth)
vecefp90 ECEF (Earth Centered Earth Fixed) to PZ-90 (Parametri Zemli 1990)
vecefs85
ECEF (Earth Centered Earth Fixed) to SGS-85 (Soviet Geodetic System
1985)
veciecef ECI (Earth Centered Inertial) to ECEF (Earth Centered Earth Fixed) )
venuecef ENU (East, North, Up) to ECEF (Earth Centered Earth Fixed)
venugd
ENU (East, North, Up) to Geodetic (latitude, longitude, altitude) for a given
position vector and a reference point
venullw ENU (East, North, Up) to LLW (Local Level Wander azimuth)
vgdecef
Geodetic (latitude, longitude, altitude) to ECEF (Earth Centered Earth Fixed),
for a given position vector specified by the external points in geodetic
coordinates
vgdenu
Geodetic (latitude, longitude, altitude) to ENU (East, North, Up) for a given
position vector specified by the external points in geodetic coordinates
vinsecef INS (Wander / North, West, Up) to ECEF (Earth Centered Earth Fixed)
vllwb LLW (Local Level Wander azimuth) to GPS body
vllwecef LLW (Local Level Wander azimuth) to ECEF (Earth Centered Earth Fixed)
vllwenu LLW (Local Level Wander azimuth) to ENU (East North Up)
vp90ecef PZ-90 (Parametri Zemli 1990) to ECEF (Earth Centered Earth Fixed)
vs85ecef
SGS-85 (Soviet Geodetic System 1985) to ECEF (Earth Centered Earth
Fixed)
xvtransf
main program executing vector transformations specified in the above
mentioned list (by selection)
Specialized plotting programs
xpbar bar graph for a selected column
xyp1 x-y graph for a selected column
xyp1s x-y graph for a selected column, with statistics
xyp2w
x-y graph for two selected columns in two different windows/subplots, with
statistics
xyp3w
x-y graph for three selected columns in three different windows/subplots, with
statistics
xypc2
x-y graph of the difference between columns (from different files), with
statistics
Chapter 2 List of functions by topics
- Page 2-13
xypc2rss
x-y graph for RSS (root sum square) of the difference of three columns from
two files, with statistics
xypm x-y graph for the selected multiple columns
xyprss
x-y graph for RSS (root sum square) of three selected columns, with
statistics
xyprss2w
x-y graph for RSS (root sum square) of three selected columns correspon-
ding to position and velocity errors, in two windows/subplots, with statistics
xypvstd
x-y graph for a selected column and the associated envelope (standard
deviation), with statistics
Specialized statistics related functions
cep circular error probable (CEP)
fom figure of merit determination based on ICD-059 table
rms root mean square (RMS) of a sample
rms2
modified root mean square (RMS) of a sample (mean of the sample is
assumed to be zero)
rss root sum square (RSS) of a three component vector sample
rssxy root sum square (RSS) of a two component vector sample
vep vertical error probable (VEP)
statup running mean, standard deviation and root mean square (rms)
xcepvep main program determining the CEP or VEP of a specified array
xebudget Main program determining GPS error budget
xfom
main program plotting the figure of merit versus estimated position error for a
specified position error range
xstat main program testing the macros: rms, rss, rssxy, and statup
xstatc
main program determining the mean, standard deviation and rms of the
elements of a specified column
Specialized signal processing and Kalman filter functions
genrn
random numbers with normal (Gaussian) distribution, with mean and
standard deviation specified
gmp1 first order Gauss-Markov sequence
gmp2 second order Gauss-Markov sequence
Chapter 2 List of functions by topics
- Page 2-14
kfcov Kalman filter covariance matrix by using conventional formulation
kfcova Kalman filter covariance matrix by using alternate conventional formulation
mcud reconstruction of a real symmetric matrix from its U-D factors
mreast measurement reasonableness test for a scalar measurement
mudd
decomposition of a real symmetric positive (semi)definite matrix into its U-D
factors
mudm
measurement updating process of discrete Kalman filter U-D
implementation, when measurement is an input when the state is updated
mudm1
measurement updating process of discrete Kalman filter U-D implemen-
tation, when measurement residual is an input when the state is updated
rwalk random walk process
xgenrn
main program generating the random numbers with normal (Gaussian)
distribution and plotting the generated sequence, histogram, and the
normalized auto-correlation sequence
xgmp1
main program generating first order Gauss-Markov sequence and plotting
the generated sequence and the normalized auto-correlation sequence
xgmp2
main program generating second order Gauss-Markov sequence and
plotting the generated sequence and the normalized auto-correlation
sequence
xkfcov
main program performing the covariance analysis by using the conventional
or alternate conventional Kalman filter formulation
xmuddu
main program executing the decomposition and reconstruction of a real
symmetric positive (semi)definite matrix into and from its U-D factors
xmudm
main program testing the measurement updating process of discrete
Kalman filter U-D implementation
xrwalk
main program generating the random walk process and plotting the
generated sequence and the normalized auto-correlation sequence
GPS Time Utilities
gpslsec UTC leap seconds value for a specified year between 1980 and 2059
timetr
determination of GPS time of transmission based on time of measurement
(reception)
xgpslsec
main program determining UTC leap seconds value for a specified year
between 1980 and 2059
xgpstime main program executing GPS time related transformations
Chapter 2 List of functions by topics
- Page 2-15
Specialized GPS related data processing functions
elimcol elimination of a specified column of a two dimensional array
elimrow elimination of a specified row of a two dimensional array
msc2f
symmetric matrix storage transformation from compact form (upper
triangular part, column-wise, one-dimensional array) to full form (all
elements, two-dimensional array)
msf2c
symmetric matrix storage transformation from full form (all elements, two-
dimensional array) to compact form (upper triangular part, column-wise,
one-dimensional array)
mudc2f
U-D factors storage transformation from compact form (upper triangular
part, column-wise, one-dimensional array) to full U and D matrices (all
elements, two-dimensional array)
mudf2c
U-D factors storage transformation from full U and D matrices (all elements,
two-dimensional array) to compact form (upper triangular part, column-wise,
one-dimensional array)
selectd selection of the different elements from a specified array
xelimrc
main program testing the elimination of a specified row/column (see macros
elimrow and elimcol)
xmisdat
main program determining the missing data into a specified column of an
input table
xreadalm main program reading Yuma almanac data and creating two data files
xrinexn
main program reading RINEX 2 navigation message file and creating three
data files
xsortrec
main program sorting the records based on the elements of a specified
column (in ascending order)
Trajectory and related utilities
gcnav great circle navigation position, velocity, acceleration
geodes geodetic data for a specified departure-destination pair
geoidh WGS-84 geoid height correction
gridwaas generation of longitude-latitude WAAS grid
hpe
horizontal position error (range) when latitude and longitude of two points
are specified
trajs vehicle trajectory in straight segment with constant speed
xgcdr main program determining great circle dead reckoning trajectory
Chapter 2 List of functions by topics
- Page 2-16
xgcnav
main program determining great circle navigation position, velocity and
acceleration
xgeodes
main program determining geodesic when the departure and destination
points are specified
xgeoidh
main program determining WGS-84 geoid height correction, and executing
a contour map
xgridw main program plotting the longitude-latitude WAAS grid
xhpe main program determining the horizontal position error (range)
xppva
main program determining acceleration from position/velocity data, and
plotting all relevant trajectory information
xppvaj
main program determining acceleration and jerk from position and velocity
data, and plotting all relevant trajectory information
xtrajs
main program determining the vehicle trajectory with straight segment and
constant speed
Satellite position computation
svpalm ECEF satellite position based on almanac data
svpeph ECEF satellite position based on ephemeris data
xsvpalm main program determining ECEF satellite position based on almanac data
xsvpcomp
main program determining RSS satellite position difference based on
ephemeris and almanac data, and executing the corresponding graph
xsvpeph main program determining ECEF satellite position based on ephemeris data
Elevation and azimuth determination, and satellite visibility
eleva elevation angle and the ECEF unit line-of-sight vector
elevar elevation angle, the ECEF unit line-of-sight vector, and the range
elevaz elevation angle, azimuth angle, the ECEF unit line-of-sight vector, and range
range range between two position points
uverv unit vertical vector for a given ECEF position vector
xelaz
main program determining elevation and azimuth angles for specified users,
time interval, and all satellites in view
Chapter 2 List of functions by topics
- Page 2-17
xpelaza
main program executing the azimuth-elevation plot for all satellites in view,
and the number of visible satellites plot
xpelazs
main program executing graphs related to elevation and azimuth angles for
a specified satellite and selected user (input file can be generated by
xelaz.m)
DOPs computation, satellite selection and related functions
dop1
dilution of precision (DOP) quantities when at least 3 line-of-sight unit
vectors are specified
dop2
dilution of precision (DOP) quantities when 4 line-of-sight unit vectors are
specified
gdopv
approximate geometric dilution of precision (GDOP) when four line-of-
sight unit vectors are specified
hmat H matrix based on line-of-sight measurements
hmatb H matrix based on line-of-sight and baro measurements
hmatbc H matrix based on line-of-sight, baro and clock measurements
hmatc H matrix based on line-of-sight and clock measurements
svsel4 selection of a set of 4 satellites based on minimum GDOP
svsel5 selection of a set of 5 satellites based on minimum GDOP
svsel6 selection of a set of 6 satellites based on minimum GDOP
wdop1
weighted dilution of precision (WDOP) quantities when at least 3 line-of-
sight unit vectors and the corresponding weighting factors are specified
wdop2
weighted dilution of precision (WDOP) quantities when 4 line-of-sight unit
vectors and the corresponding weighting factors are specified
wdopv
weighted dilution of precision (WDOP) quantities when 4 line-of-sight unit
vectors and the corresponding weighting factors are specified
xdop
main program determining dilution of precision (DOP) quantities by using 2
methods
xgdopv
main program determining an approximate value of the geometric dilution of
precision (GDOP)
xhmatall
main program testing the construction of the H matrix based on line-of-sight,
baro and clock measurements
xmapdop
main program determining repartition of number of visible satellites and the
corresponding DOPs for a specified geographical area
Chapter 2 List of functions by topics
- Page 2-18
xsvsel
main program executing the selection of 4, 5 or 6 satellites based on
minimum GDOP, and the computation of the corresponding DOP quantities
xwdop
main program computing the weighted dilution of precision (WDOP)
quantities when at least 3 line-of-sight unit vectors and the corresponding
weighting factors are specified
xwdopv
main program computing the weighted dilution of precision (WDOP)
quantities when 4 line-of-sight unit vectors and the corresponding weighting
factors are specified
Pseudorange and Delta range determination and related functions
ionoc L1 iono correction computation by using Klobuchar model
ionocon setting of Klobuchar model iono constants
pionoc
pseudorange measurement corrected for ionospheric effects based on
L1/L2 measured pseudoranges
pradr pseudorange and accumulated delta range
tropoc1 tropospheric correction by using a simplified model
uclock user clock bias and drift
uercor user earth rotation correction vector
xambig main program generating ambiguity numbers
xionoc main program determining iono corrections by using Klobuchar model
xmpath main program generating and saving the multipath pseudorange errors
xpradr main program generating pseudorange and accumulated delta range
xsaerr main program generating SA errors
xtropoc1
main program generating tropospheric delay contours for a specified
location
xuclock main program generating user clock bias and drift
xuercor
main program generating and plotting the magnitude of the earth rotation
correction vector for a specified longitude/latitude grid
Chapter 2 List of functions by topics
- Page 2-19
Determination of user's position and related functions
uspos4
position fix determination by using Bancroft's algorithm when 4
measurements are known
uposdg
position fix determination by using Bancroft's algorithm when at least 4
measurements are known
uposit
position fix determination by using an iterative method when at least 4
measurements are known
xpfwlss
main program determining position fixes using weighted least squares
algorithm when the user is stationary
xuposd4
main program determining the user's position fix by using a direct method
when 4 measurements are known
xuposdg
main program determining the user's position fix by using a direct method
when at least 4 measurements are known
xuposit
main program determining the user's position fix by using an iterative
method when at least 4 measurements are know
RAIM/FDE availability and integrity evaluation and related functions
chi2_dof
probability density function of Chi-square distribution with dof degrees of
freedom
dhmax delta_h_max computation (used in RAIM constant alarm rate algorithm)
fdnt fault detection normalized thresholds
fpbias_c
parity bias (pbiasb) for Chi-square distribution with degree of freedom
greater than 1
fpbias_g
parity bias (pbiasb) for Gauss distribution with degree of freedom equals to
1
gauss_1 probability density function for the normal Gaussian distribution
ncchis2_k
probability density function for the non-central Chi-square distribution, where
k is 2 to 10 for the degree of freedom 2 to 10 (9 macros)
qrupa
Q-R updating algorithm of the measurement matrix when a new clock
measurement is added
raimfd
RAIM availability and fault detection by using the parity vector algorithm (one
step implementation)
Chapter 2 List of functions by topics
- Page 2-20
raimst
RAIM availability and fault detection by using the standard (constant alarm
rate) algorithm
sdop sub-dilution of precision (sub-DOP) quantities
slopemax slopemax computation (used in RAIM constant alarm rate algorithm)
swdop sub-weighted dilution of precision (sub-WDOP) quantities
xfdnt main program computing the fault detection normalized thresholds
xopcr
main program comparing four different implementations of RAIM decision
variable computation
xpbias
main program computing the value of the parity bias for 10 degrees of
freedom (dof) by using Gaussian distribution for dof =1 and Chi-square
distribution for dof >1
xqrupa
main program testing the Q-R updating algorithm of the measurement
matrix when a new clock measurement is added
xraimda
main program determining the RAIM fault detection availability for a user
selected or defined set of input data
xraimea
main program determining the RAIM fault exclusion availability for a user
selected or defined set of input data
xraimfd
main program determining RAIM availability and fault detection by using the
parity vector algorithm
xraimst
main program determining RAIM availability and fault detection by using the
standard (constant alarm rate) algorithm
xsdop main program determining sub-dilution of precision (sub-DOP) quantities
xslope
main program determining slopemax and delta_h_max for RAIM baseline
standard (constant alarm rate) algorithm
xswdop
main program determining sub-weighted dilution of precision (sub-WDOP)
quantities
Appendix A includes a complete list of modules, main programs and input/output files in
alphabetical order.
Chapter 3 GPS Toolbox Examples
- Page 3-1 -
3.0 GPS TOOLBOX EXAMPLES
This section presents illustrative examples of how GPS TOOLBOX m-files can be used
to solve typical problems encountered in GPS applications. You may wish to study these
example programs for ideas on how GPS TOOLBOX m-file modules and programs can
be used to implement your own GPS application. Also, you may find them of some
practical value and modify them for your own use. It is worth mentioning that all m-file
programs have reference input/output data, therefore a quick check of a selected m-file
program can be executed without delay.
The m-file example programs can be found in MATLAB source code in the directory
GPSPRG.M, but most of the time they require additional m-file modules listed in the
directory GPSMOD.M. For easy identification, all programs have names starting with
the letter x, and the next few letters coincide (most of the time) with the name of the
main module used by the program; for example the program XGMP1 is using GMP1 as
the main module. The reference input/output data files are listed in the directories
GPSINP.DAT, GPSIO.MAT and GPSOUT.OUT.
We recommend a full installation of the GPS Toolbox software - see chapter 1 - before
trying to run a selected example program. For a simple reference Table 2-1 presents all
m-file modules and main programs included in this package.
In this section we are presenting several representative main programs as follows:
1. Matrix coordinate transformation generation, see XMTRANSF
2. Generation of a first order Gauss-Markov process, see XGMP1
3. Generation of a second order Gauss-Markov process, see XGMP2
4. Covariance analysis by using conventional or alternate conventional Kalman filter
formulation, see XKFCOV
5. GPS time related utility transformations, see XGPSTIME
6. Read Yuma format almanac file and generate two ASCII data only files, see
XREADALM
7. Read RINEX 2 navigation message file and generate three data files, see XRINEXN
8. Determination of the WGS-84 geoid height correction, see XGEOIDH
9. Generation and plotting of the longitude-latitude WAAS grid, see XGRIDW
10. Determination of geodesic based on departure and destination points, see XGEODES
11. Determination of great circle dead reckoning trajectory, see XGCDR
12. Determination of acceleration from the input time/position/velocity data and
execution of relevant trajectory plots, see XPPVA
13. Determination of satellite position based on almanac/ephemeris data, see XSVPALM,
XSVPEPH and XSVCOMP
14. Determination of azimuth an elevation angles and execution of related plots, see
XELAZ.M, XPELAZS and XELAZA
15. Determination of DOP quantities and related contour plots, see XDOP and
XMAPDOP
16. Satellites selection based on minimum GDOP criteria, see XSVSEL
17. Determination of iono correction and execution of related graphs, see XIONOC
Chapter 3 GPS Toolbox Examples
- Page 3-2 -
18. Determination of troposphere delay correction, see XTROPOC
19. Determination of user clock errors, see XUCLOCK
20. Determination of multipath error, see XMPATH
21. Determination of the user earth rotation correction error, see XUERCOR
22. Computation of the position fix through direct and iterative methods, see XUPOSD4,
XUPOSDG, and XUPOSIT
23. Evaluation of weighted least square navigation solution, see XPFWLSS
24. RAIM integrity evaluation, see XRAIMST and XRAIMFD
25. Determination of thresholds used in RAIM/FDE evaluations, see XFDNT and
XPBIAS
26. RAIM Fault detection availability determination, see XRAIMDA
27. RAIM Fault exclusion availability determination, see XRAIMEA
28. GPS error budged determination.
3.1 Matrix coordinate transformation generation
The m-file program XMTRANSF.M constructs the following coordinate transformation
matrices (see also Figure 3-1):
1) from ECEF to ENU coordinates
2) from ENU to ECEF coordinates
3) from ECEF to LLWA coordinates
4) from LLWA to ECEF coordinates
5) from ECEF to INS coordinates
6) from INS to ECEF coordinates
7) from ENU to LLWA coordinates
.8) from LLWA to ENU coordinates
9) from LLWA to GPS body coordinates
10) from GPS body to LLWA coordinates
Chapter 3 GPS Toolbox Examples
- Page 3-3 -
11) from ECEF to ECI coordinates
12) from ECI to ECEF coordinates
The main program is asking the user to enter the following input data from the keyboard:
- name of the output file if selected (the default is the screen)
- select the coordinate transformation (see 1 to 12 on the above mentioned list)
- for the selected transformation enter the following input data:
1) For the ECEF/ENU to ENU/ECEF transformation:
- latitude, in radians
- latitude, in radians
2) F or the ECEF/LLWA to LLWA/ECEF transformation:
- latitude, in radians
- longitude, in radians
- wander azimuth angle, in radians
3) For the ECEF/INS to INS/ECEF transformation:
- latitude, in radians
- longitude, in radians
- wander azimuth angle, in radians
4) For the ENU/LLWA to LLWA/ENU transformation:
- wander azimuth angle, in radians
5) For the LLWA/GPS Body to GPS Body/LLWA transformation:
- yaw angle, in radians
- pitch angle, in radians
- roll angle, in radians
6) For the ECEF/ENU to ENU/ECEF transformation:
- time elapsed since reference time, in seconds
The results are saved into a specified output file or displayed on screen; the results
contain the selected input data and the resulting coordinate transformation matrix. For
example, by selecting the transformations from ECEF to LLWA, from ECEF to ENU,
and from ENU to LLWA, we obtain the following results:
************************************************************************
***** Input data *****
latitude (rad.) = 0.500000000000
longitude (rad.) = 0.700000000000
wander azimuth (rad.) = 0.300000000000
***** ECEF to LLWA transformation matrix *****
-0.7238075 0.6394089 0.2593434
-0.1599281 -0.5210862 0.8383866
0.6712122 0.5653542 0.4794255
************************************************************************
************************************************************************
***** Input data *****
latitude (rad.) = 0.500000000000
longitude (rad.) = 0.700000000000
***** ECEF to ENU transformation matrix *****
Chapter 3 GPS Toolbox Examples
- Page 3-4 -
-0.6442177 0.7648422 0.0000000
-0.3666849 -0.3088544 0.8775826
0.6712122 0.5653542 0.4794255
************************************************************************
************************************************************************
***** Input data *****
wander azimuth (rad.) = 0.300000000000
***** ENU to LLWA transformation matrix *****
0.9553365 0.2955202 0.0000000
-0.2955202 0.9553365 0.0000000
0.0000000 0.0000000 1.0000000
************************************************************************
It is worth mentioning that results verification can be made by multiplying the last two
transformations, and the result of this computation should equal the first transformation.
3.2 Generation of a first order Gauss-Markov process
The m-file program XGMP1.M generates a first order Gauss-Markov process data
sequence by using the following formula
x_new =exp(- beta * deltat) * x_old +w
where
beta is the inverse of the correlation time
deltat is the time step
x_old is the old (previous) value of first order Gauss-Markov process
x_new is the new value of the first order Gauss-Markov process
w is a normally distributed random number with zero mean and standard
deviation equals sigma_x * sqrt(1.-exp(-2.*beta*deltat))
sigma_x is the standard deviation of the process
The main program XGMP1 is asking to enter the following input data from the keyboard:
- name of the output data file
- total number of steps used in the generation of first order Gauss-Markov process.
In addition, the main program has hard-coded the default input data, which can be easily
modified, or entered from the keyboard (through a question-answer approach):
- initial seed value for random number generation
- value of the constant beta , 1/beta is the correlation time
- value of the constant deltat , time step
Chapter 3 GPS Toolbox Examples
- Page 3-5 -
0 100 200 300 400 500 600
-20
-15
-10
-5
0
5
10
First order Gauss-Markov process - with 512 time sequences
F
i
r
s
t

o
r
d
e
r

G
a
u
s
s
-
M
a
r
k
o
v

s
e
q
u
e
n
c
e
Time sequence
mean = -2.652 ; st.dev. = 6.21 ; rms = 6.753
-600 -400 -200 0 200 400 600
-0.2
0
0.2
0.4
0.6
0.8
1
F irst order Gauss-Markov process - with 512 time sequences
N
o
r
m
a
l
i
z
e
d

a
u
t
o
-
c
o
r
r
e
l
a
t
i
o
n

s
e
q
u
e
n
c
e
S equence lag
Figure 3-2. First order Gauss-Markov process.
Chapter 3 GPS Toolbox Examples
- Page 3-6 -
- value of the standard deviation of the process sigma_x
- initial value of the process x_old
- umber of steps after which the data are saved in the output file
The output file should contain sequentially for each step saved the value of the first order
Gauss-Markov process. The graphs presented in Figure 3-2 are generated by selecting 512
time sequences and the default data specified in the m-file main program XGMP1.M.
The correctness of the output data can be checked with a program which computes the
normalized auto-correlation function, for example XCOR from Matlab Signal
Processing Toolbox..
The input data can also be entered from a special input data file by reading the data
sequentially.
3.3 Generation of a second order Gauss-Markov process
The m-file program XGMP2.M generates a second order Gauss-Markov process data
sequence.
The power spectral density function is given by
(w) =c**2 / (w**4 +w0**4)
where w is frequency in radians/sec., w0 is the natural frequency in radians/second, and
c**2 is a constant in meters**2.
The process is described by the following second order linear differential equation:
!! x p +2 * beta * w0 * ! x p +w0**2 * xp =c * W
where W is the white Gaussian noise with unit power spectral density, and beta is a
damping factor (less than 1).
The main program XGMP2 is asking to enter the following input data from the keyboard:
- name of the output data file
- total number of steps used in the generation of second order Gauss-Markov process.
In addition, the main program has hard-coded the following input data, which can be
easily modified to be entered from the keyboard (through a question-answer approach), or
from a special input data file (by reading the data sequentially):
Chapter 3 GPS Toolbox Examples
- Page 3-7 -
0 100 200 300 400 500 600
-35
-30
-25
-20
-15
-10
-5
0
5
10
Second order Gauss-Markov process - first state component
F
i
r
s
t

s
t
a
t
e

c
o
m
p
o
n
e
n
t
Time sequence (Total sequence length = 512)
mean = -10.25 ; st.dev. = 11.35 ; rms = 15.3
-600 -400 -200 0 200 400 600
-0.2
0
0.2
0.4
0.6
0.8
1
Second order Gauss-Markov process - first state component
N
o
r
m
a
l
i
z
e
d

a
u
t
o
-
c
o
r
r
e
l
a
t
i
o
n

s
e
q
u
e
n
c
e
Sequence lag (Total sequence length = 512)
Figure 3-3.1. Second order Gauss-Markov process - first state component.
Chapter 3 GPS Toolbox Examples
- Page 3-8 -
0 100 200 300 400 500 600
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
Second order Gauss-Markov process - second state component
S
e
c
o
n
d

s
t
a
t
e

c
o
m
p
o
n
e
n
t
Time sequence (Total sequence length = 512)
mean = -0.003864 ; st.dev. = 0.2283 ; rms = 0.2283
-600 -400 -200 0 200 400 600
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Second order Gauss-Markov process - second state component
N
o
r
m
a
l
i
z
e
d

a
u
t
o
-
c
o
r
r
e
l
a
t
i
o
n

s
e
q
u
e
n
c
e
Sequence lag (Total sequence length = 512)
Figure 3-3.2. Second order Gauss-Markov process - second state component.
Chapter 3 GPS Toolbox Examples
- Page 3-9 -
- initial seed value for random number generation
- value of the natural frequency w0, in radians/second
- value of the damping factor beta
- value of the constant csq , c**2, in meters**2
- value of the constant time step, deltat, in seconds
- number of steps after which the data are saved in the output file.
Sequentially, for each step saved the output file should contain the values of the second
order Gauss-Markov process. The graphs presented in Figures 3-3.1 and 3-3.2 are
generated by selecting 512 time sequences and the default data specified in the m-file
main program XGMP2.M; the default data are simulating a S/A process as specified in
[2]. Figure 3-3.1 shows the time sequence and the corresponding normalized auto-
correlation sequence for the first state component, while Figure 3-3.2 presents the same
quantities for the second state component.
The correctness of the output data can be checked with a program which computes the
normalized auto-correlation function, for example XCOR from Matlab Signal
Processing Toolbox.
3.4 Covariance analysis by using the conventional or alternate conventional
Kalman filter formulation
The m-file program XKFCOV.M performs covariance analysis by using the conventional
or alternate conventional Kalman filter formulation. It is assumed that the system is time-
invariant; however, with few changes the program can be extended to time-varying
system
The main program XKFCOV is asking to enter the following data from keyboard:
- number of steps to be processed (nstep)
- selection of the variant to be used (1 for conventional, and 2 for alternate
conventional)
- selection of the input data from a selected input data file or the default input data set.
The structure of the input file (see for example the file XKFCOV1.dat) is as follows:
-- first row contains the values for state dimension (n) and measurement dimension
(m)
-- next n rows contain the corresponding rows of the transition matrix (phi)
-- next n rows contain the corresponding rows of the process noise matrix (q)
-- next m rows contain the corresponding rows of the observation matrix (h)
-- next m rows contain the corresponding rows of the measurement noise matrix (r)
-- next n rows contain the corresponding rows of the initial covariance matrix
(depending on the variant used)
- index of the state covariance to be saved or/and plotted
- name of the output file, if the generated data are saved.
The output file contains the generated data (optional); at each time step the following data
are stored: step number, standard deviation after and before measurement incorporation.
Chapter 3 GPS Toolbox Examples
- Page 3-10 -
The graph of the selected state standard deviation versus time sequence is provided see
Figure 3-4.1 when the default data is used.
Figure 3-4. Kalman filter covariance analysis.
3.5 GPS time related utility transformations
The m-file program XGPSTIME performs the following GPS time related transforma-
tions:
1. From (year, month, day) to (GPS week, GPS roll number, day of week),
2. From (GPS week, GPS roll number, day of week) to (year, month, day),
3. From (day of week, hour, minute, second) to (time of week),
4. From (time of week) to (day of week, hour, minute, second).
The program is asking the user to enter the input data from the keyboard, and the results
can be saved into a specified output file or are displayed on screen. For example, by
selecting the transformations 1 and 3 we can find the following results displayed on
screen:
xgpstime
Do you want to save the results? (y/n)[n] -->
Select:
1 -->(year, month, day) to (GPS week, GPS roll number, day of week)
0 2 4 6 8 10 12 14 16 18 20
0
1
2
3
4
5
6
7
8
9
10
11
Selected Standard Deviation versus Time sequence (for state 1)
S
e
l
e
c
t
e
d

S
t
a
n
d
a
r
d

D
e
v
i
a
t
i
o
n

Time sequence
Chapter 3 GPS Toolbox Examples
- Page 3-11 -
2 -->(GPS week, day of week, GPS roll number) to
(day of week, day, month, year)
3 -->(day of week, hour, minute, second) to time of week
4 -->time of week to (day of week, hour, minute, second)
Make the selection --> 1
***************************************************************
Specify the year, e.g. 1999, -->2000
Specify the month, e.g. 1, -->10
Specify the day, e.g. 28, -->29
gpsweeek = 62, gps roll number = 1, day of week = 0
***************************************************************
Do you want another computation? (y/n)[n] -->y
Select:
1 -->(year, month, day) to (GPS week, GPS roll number, day of week)
2 -->(GPS week, day of week, GPS roll number) to
(day of week, day, month, year)
3 -->(day of week, hour, minute, second) to time of week
4 -->time of week to (day of week, hour, minute, second)
Make the selection --> 3
***************************************************************
Specify day of week (0 to 6), e.g. 2, -->6
Specify hour (0 to 23), e.g. 5, -->12
Specify minute (0 to 59), e.g. 34, -->40
Specify second (0 to 60), e.g. 46, -->56
time of week =564056
***************************************************************
Do you want another computation? (y/n)[n] -->
End of the program XGPSTIME

Also by using the program XGPSTME the data related to the GPS week roll number from
Table 3-5 can be generated.
Chapter 3 GPS Toolbox Examples
- Page 3-12 -
GPS week Roll
number
Date of Start of GPS week 0 Date of End of GPS week 1023
0 Sunday, January 6, 1980 Saturday, August 21,1999
1 Sunday, August 22, 1999 Saturday, April 6, 2019
2 Sunday, April 7, 2019 Saturday, November 20, 2038
3 Sunday, November 21, 2038 Saturday, July 6, 2058
4 Sunday, July 7, 2058 Saturday, February 19, 22078
Table 3-5. Selected GPS Fundamental Dates
3.6 Read Yuma format almanac file and generate two ASCII data only files
The m-file program XREADALM can be used to read the Yuma format almanac input
file and to generate two ASCII data only files (no text description of parameters), namely
1) First file is saving all data contain in the Yuma format input file into a specified file
all data only (no text description of parameters), in the same order as the original
Yuma format input file; each record contains the data related to a satellite. The result
is a data table with 13 columns and number of rows equals to the number of satellites.
2) Second file is saving a reduced almanac set from the Yuma format input file into
another specified data only (no text description of parameters). Each record contains
the data related to a healthy satellite (9 parameters) in the following order:
- satellite id number
- satellite time of applicability (toa), in seconds
- satellite semimajor axis (a), in meters
- satellite eccentricity (e)
- satellite orbital inclination (I_0), in radians
- satellite right ascension at toa (OMEGA_0), in radians
- satellite argument of perigee (omega), in radians
- satellite mean anomaly (M_0), in radians
- satellite rate of right ascension (OMEGA_DOT), radians/ second
For simplicity, in this manual, we are adopting the following naming convention:
The name of all three files (Yuma format input file and two generated files) is formed
as the abbreviation of week, i.e. wk follows by the week number, e.g. wk749.
Note that we assume that the user is not trying to utilize the same week with different
roll number.
The extensions are as follows:
yum for the Yuma format almanac input,
Chapter 3 GPS Toolbox Examples
- Page 3-13 -
alm for the first output file with complete Yuma data (but no text description of
parameters), with 13 columns,
dat for the second output file with reduced Yuma data (but no text description
of parameters), with 9 columns.
For example, by selecting the Yuma format input file wk749.yum the following are
displayed on screen:
xreadalm
Specify the Yuma format almanac input data file,
e.g. wk749.yum --> wk749.yum
Specify the output filename for the complete almanac,
e.g. wk749.alm for wk749.yum --> wk749.alm
Specify the output filename for the reduced almanac,
e.g. wk749.dat for wk749.yum --> wk749.dat
Number of satellites in the almanac = 26
End of program XREADALM

3.7 Read RINEX 2 navigation message file and generate three data files
The m-file program XRINEXN can be used to read a RINEX 2 navigation message file
and write the data into three output data files; one output data file contains the complete
navigation information (in fact the portion related to each satellite data), while the other
two output files contain the reduced ephemeris and reduced almanac data, respectively.
Each record of the output file containing reduced ephemeris data includes the following
data (in this order): svprn, toe, smaxis, ecc, i0, Omega0, omega, M0, OmegaDot, deltan,
idot, cic, cis, crc, crs, cuc, cus (17 columns).
Each record of the output file containing reduced almanac data includes the following
data (in this order): svprn, toe, smaxis, ecc, i0, Omega0, omega, M0, OmegaDot (9
columns).
For example, by selecting the RINEX 2 navigation file RINEXNAV.99n as input file ans
the name of the three output files see XRINEXN1.out, XRINEXN2.out, and
XRINEXN3.out - the following are displayed on screen:
xrinexn
Specify the name of the RINEX 2 navigation,
e.g. rinexnav.99n -->rinexnav.99n
Specify the output filename for the complete data --> xrinexn1.out
Chapter 3 GPS Toolbox Examples
- Page 3-14 -
Specify the output filename for the reduced ephemeris --> xrinexn2.out
Specify the output filename for the reduced almanac --> xrinexn3.out
Number of satellites = 9
End of the program XRINEXN

3.8 Determination of the WGS-84 geoid height correction


The m-file program XGEOID determines the WGS-84 geoid height correction for a
specified location given by latitude and longitude, and, optional, the worldwide WGS-84
geoid height correction contour map is plotted. The input database file for the WGS-84
geoid height correction, tgeoid84.dat, can be replaced with a database file corresponding
to another geoid.
For example, by selecting the location corresponding to the latitude =-1.2 radians and
longitude =0.5 radians, and the option to plot the worldwide WGS-84 geoid height
correction contour map see Figure 3-8, the following results are obtained:
Figure 3-8. WGS-84 geoid height correction
0 50 100 150 200 250 300 350
-80
-60
-40
-20
0
20
40
60
80
Longitude, in degrees
L
a
t
i
t
u
d
e
,

i
n

d
e
g
r
e
e
s
WGS-84 Geoid Height Correction (in meters)
-60
-60 -60
-50
-50
-50
-50
-40
-40
-40
-40
-40
-40
-30
-30
-30
-30
-20
-20
-10
-10
-10
-10
0
10
10
10
20
20
20
20
2
20
20
20
30
30
30
30
30
40
40
40
40
40
50
50
50
5
50
60
60
60
Chapter 3 GPS Toolbox Examples
- Page 3-15 -
xgeoidh
Do you want to save the generated data? (y/n)[y] n
Enter latitude in radians ( -pi/2 to pi/2 ) --> -1.2
Enter longitude in radians ( 0 to 2*pi ) --> 0.5
********************************************************
*** COMPUTATION OF WGS-84 GEOID HEIGHT CORRECTION ****
***** Input data ******
Latitude in radians --> -1.2000000
Longitude in radians --> 0.5000000
***** Output data *****
Geoid height correction in meters = 21.18207
********************************************************
Do you want another computation? (y/n)[n]
Do you want to map the WGS-84 geoid height correction? (y/n)[y]
End of the program XGEOIDH

3.9 Generation and plotting of the longitude-latitude WAAS grid


The m-file program XGRIDW generates and plots the longitude-latitude WAAS grid as
specified in the document RTCA/DO-229, for a total of 2353 space points. The generated
data can be saved (optional) into a mat-file called fgridw.mat. The program can be easily
changed to generate and plot the WAAS grid points into a specified latitude-longitude
area.
The commands and the results see Figure 3-9 - are as follows:
xgridw
Do you to save the generated grid data (y/n)[n]? y
The Latitutde-Longitude WAAS grid is saved in file fgridw.mat
End of the program XGRIDW

Chapter 3 GPS Toolbox Examples


- Page 3-16 -
Figure 3.9. WAAS Longitude-Latitude grid.
3.10 Determination of geodesic based on departure and destination points
The m-file program XGEODES determines geodetic when the latitude and longitude of
the departure and destination points are specified; WGS-84 earth model is used. The
latitude/longitude in degrees for the departure and destination points can be entered from
the keyboard or read from a specified input data file (as a sequence of waypoints). For
each departure-destination pair the range, departure bearing and destination bearing are
determined.
For example if the input data file xgeodes1.dat is used the following results are obtained
on the screen, and the plot of the trajectory is presented in Figure 3-10:
xgeodes
Do you want to use the default data? (y/n)[n] -->
Do you want to enter the data from keyboard? (y/n)[n] -->
Specify the input data filename, e.g. xgeodes1.dat --> xgeodes1.dat
Do you want to save the generated data? (y/n)[y] -->
Specify the output filename -->xgeodes1.out
Do you want to plot the waypoints? (y/n)[y] -->
Chapter 3 GPS Toolbox Examples
- Page 3-17 -
Place the text with total range on the graph;
Press <Enter>or <Return>key to start ...
Press <Enter>or <Return>key to continue ...
End of the program XGEODES.M

Figure 3-10 : Longitude-latitude of the selected waypoints with the geodesic distance.
The output data files xgeodes1.out contains the following information:
************************************************************
*****Input data 1
Departure latitude = 3.73319315700000e+001 degrees
Departure longitude = 4.00554434300000e+001 degrees
Destination latitude = 2.61285665100000e+001 degrees
Destination longitude = 4.14765298000000e+001 degrees
*****Output data 1
Range = 1.24949951092708e+006 meters
Departure bearing = 1.73427328245473e+002 degrees
Destination bearing = 1.74178332666459e+002 degrees
************************************************************
************************************************************
*****Input data 2
Departure latitude = 2.61285665100000e+001 degrees
Departure longitude = 4.14765298000000e+001 degrees
Destination latitude = 2.87277324300000e+001 degrees
Destination longitude = 4.23409216200000e+001 degrees
40 40.5 41 41.5 42 42.5 43 43.5 44 44.5 45
26
28
30
32
34
36
38
Longitude - Latitude plot of the selected waypoints (with geodesic distance)
Longitude, in degrees
L
a
t
i
t
u
d
e
,

i
n

d
e
g
r
e
e
s
Total range =2272693.6056 meters
Chapter 3 GPS Toolbox Examples
- Page 3-18 -
*****Output data 2
Range = 3.00424492794101e+005 meters
Departure bearing = 1.63306311690213e+001 degrees
Destination bearing = 1.67289098732353e+001 degrees
************************************************************
************************************************************
*****Input data 3
Departure latitude = 2.87277324300000e+001 degrees
Departure longitude = 4.23409216200000e+001 degrees
Destination latitude = 3.00273481100000e+001 degrees
Destination longitude = 4.33762019200000e+001 degrees
*****Output data 3
Range = 1.75647115063086e+005 meters
Departure bearing = 3.46515496093302e+001 degrees
Destination bearing = 3.51594623160438e+001 degrees
************************************************************
************************************************************
*****Input data 4
Departure latitude = 3.00273481100000e+001 degrees
Departure longitude = 4.33762019200000e+001 degrees
Destination latitude = 3.12563819300000e+001 degrees
Destination longitude = 4.48926152700000e+001 degrees
*****Output data 4
Range = 1.99232530315795e+005 meters
Departure bearing = 4.64680459167103e+001 degrees
Destination bearing = 4.72409947915694e+001 degrees
************************************************************
************************************************************
*****Input data 5
Departure latitude = 3.12563819300000e+001 degrees
Departure longitude = 4.48926152700000e+001 degrees
Destination latitude = 3.35329182400000e+001 degrees
Destination longitude = 4.23481053200000e+001 degrees
*****Output data 5
Range = 3.47889956483015e+005 meters
Departure bearing = -4.28048445472051e+001 degrees
Destination bearing = -4.41684910005959e+001 degrees
************************************************************
Chapter 3 GPS Toolbox Examples
- Page 3-19 -
3.11 Determination of great circle dead reckoning trajectory
The m-file program XGCDR determines great circle dead reckoning trajectory assuming
a spherical earth with radius equals to the local radius and constant altitude; WGS-84
constants are used. The following input data, from keyboard, are required:
- initial latitude, in radians
- initial longitude, in radians
- altitude, in meters
- heading, in radians
- speed, in meters/second
- initial time, in seconds
- time step, in seconds
- number of steps
At the same time a default input data set is provided.
For example if the default input data set is used the following results are obtained on the
screen, and the plot of the great circle dead reckoning trajectory, with the total range
value, is presented in Figure 3-11.
Figure 3-11: Great circle dead reckoning trajectory.
-2.06 -2.059 -2.058 -2.057 -2.056 -2.055 -2.054 -2.053 -2.052
0.59
0.6
0.61
0.62
0.63
0.64
0.65
0.66
0.67
0.68
0.69
Longitude, in radians
L
a
t
i
t
u
d
e
,

i
n

r
a
d
i
a
n
s
Great circle dead reckoning trajectory
Total range =597040.1734 meters
Chapter 3 GPS Toolbox Examples
- Page 3-20 -
xgcdr
Do you want to use the default data? (y/n)[n] y
Do you want to save the generated data? (y/n)[y] n
*****************************************************************************
*****Initial conditions:
Latitude (radians) = 0.59341195
Longitude (radians) = -2.05948852
Altitude (meters) = 5000.00000000
Heading (radians) = 0.05000000
Speed (meters/second) = 200.00000000
Time_init (seconds) = 0.00000000
Time_step (seconds) = 300.00000000
Number of time steps = 10
*****Great Circle Dead Reckoning Trajectory
Time Latitude Longitude Altitude Vel_N Vel_E Distance
(sec) (rad) (rad) (m) (m/sec) (m/sec) (m)
0.000 0.59341195 -2.05948852 5000.000 199.750 9.996 0.000
300.000 0.60279007 -2.05891882 5000.000 199.747 10.060 59679.933
600.000 0.61216803 -2.05834172 5000.000 199.744 10.126 59685.194
900.000 0.62154584 -2.05775696 5000.000 199.740 10.193 59690.492
1200.000 0.63092349 -2.05716430 5000.000 199.737 10.263 59695.826
1500.000 0.64030096 -2.05656347 5000.000 199.733 10.334 59701.194
1800.000 0.64967826 -2.05595417 5000.000 199.729 10.407 59706.593
2100.000 0.65905538 -2.05533614 5000.000 199.725 10.482 59712.023
2400.000 0.66843231 -2.05470906 5000.000 199.721 10.559 59717.481
2700.000 0.67780905 -2.05407262 5000.000 199.717 10.639 59722.965
3000.000 0.68718558 -2.05342650 5000.000 199.712 10.720 59728.473
*****************************************************************************
Do you want to plot the trajectory? (y/n)[y]
Place the text with total range on the graph;
Press <Enter>or <Return>key to start ...
Press <Enter>or <Return>key to continue ...
End of the program XGCDR.M

3.12 Determination of acceleration from the input time/position/velocity


data and execution of relevant trajectory plots
The m-file program XPPVA determines acceleration from the input time/position/
velocity data and executes relevant trajectory plots. Each record of the ASCII input data
file contains the following data:
- time, in seconds
- latitude, in radians
Chapter 3 GPS Toolbox Examples
- Page 3-21 -
- longitude, in radians
- altitude, in meters
- East velocity component, in meters/second
- North velocity component, in meters/second
- Up velocity component, in meters/second
There are two default input data files, namely posvelmd.dat and posvelhd.dat for medium
and high dynamics scenario, respectively.
Next, we illustrate the use of the medium dynamics input file, posvelmd.dat, and the
obtained plots see Figures 3-12.1 to 3-12.5.
xppva
Do you want to use the default data file(s)? (y/n)[y]
Enter: 1 for the medium dynamics file posvelmd.dat
2 for the high dynamics file posvelhd.dat
Make selection --> 1
Enter Scenario name, e.g. Low/Medium/High Dynamics Scenario
-->Medium Dynamics Scenario
End of the program XPPVA

Figure 3-12.1. Trajectory Latitude/Longitude/Altitude


0 200 400 600 800 1000 1200 1400 1600 1800 2000
32
33
34
35
Medium Dynamics Scenario - Trajectory Latitude/Longitude/Altitude versus Time
L
a
t
i
t
u
d
e
,

i
n

d
e
g
r
e
e
s
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-118
-117
-116
-115
L
o
n
g
i
t
u
d
e
,

i
n

d
e
g
r
e
e
s
0 200 400 600 800 1000 1200 1400 1600 1800 2000
0
2000
4000
6000
A
l
t
i
t
u
d
e
,

i
n

m
e
t
e
r
s
Time, in seconds
Chapter 3 GPS Toolbox Examples
- Page 3-22 -
Figure 3-12.2. Trajectory Latitude versus Longitude
Figure 3-12.3. Trajectory East/North/Up Velocity
-118 -117.5 -117 -116.5 -116 -115.5 -115
32.8
33
33.2
33.4
33.6
33.8
34
34.2
Medium Dynamics Scenario - Trajectory Latitude versus Longitude
Longitude, in degrees
L
a
t
i
t
u
d
e
,

i
n

d
e
g
r
e
e
s
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-500
0
500
Medium Dynamics Scenario - Trajectory East/North/Up Velocity versus Time
E
a
s
t

V
e
l
o
c
i
t
y
,

i
n

m
/
s
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-500
0
500
N
o
r
t
h

V
e
l
o
c
i
t
y
,

i
n

m
/
s
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-200
0
200
U
p

V
e
l
o
c
i
t
y
,

i
n

m
/
s
Time, in seconds
Chapter 3 GPS Toolbox Examples
- Page 3-23 -
Figure 3-12.4. Trajectory East/North/Up Acceleration
Figure 3-12.5. Trajectory Velocity/Acceleration magnitude
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-50
0
50
Medium Dynamics Scenario - Trajectory East/North/Up Acceleration versus Time
E
a
s
t

A
c
c
e
l
e
r
a
t
i
o
n
,

i
n

m
/
s
2
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-50
0
50
N
o
r
t
h

A
c
c
e
l
e
r
a
t
i
o
n
,

i
n

m
/
s
2
0 200 400 600 800 1000 1200 1400 1600 1800 2000
-50
0
50
U
p

A
c
c
e
l
e
r
a
t
i
o
n
,

i
n

m
/
s
2
Time, in seconds
0 200 400 600 800 1000 1200 1400 1600 1800 2000
0
100
200
300
400
500
Medium Dynamics Scenario - Trajectory Velocity Magnitude versus Time
V
e
l
o
c
i
t
y

M
a
g
n
i
t
u
d
e
,

i
n

m
/
s
0 200 400 600 800 1000 1200 1400 1600 1800 2000
0
10
20
30
40
Medium Dynamics Scenario - Trajectory Acceleration Magnitude versus Time
Time, in seconds
A
c
c
e
l
e
r
a
t
i
o
n

M
a
g
n
i
t
u
d
e
,

i
n

m
/
s
2
Chapter 3 GPS Toolbox Examples
- Page 3-24 -
3.13 Determination of satellite position based on almanac/ephemeris data
The m-file programs XSVPALM and XSVPEPH can be used to determine ECEF satellite
position based on almanac and ephemeris data, respectively. The almanac input data file
should have the same structure like the ASCII file generated by the program
XREADALM , i.e. 9 columns corresponding to the reduced almanac data set, see for
example the file wk749.dat for the week 749 almanac data . The ephemeris input data file
should have the same structure like the file generated by the program XRINEX2 related
to the ephemeris data, i.e. 17 columns corresponding to the reduced ephemeris data set.
For completeness we are including next the format for almanac/ ephemeris input data file,
namely
For the almanac input data file, each record contains the data for a specified satellite
in the following order:
- satellite number
- toa, reference time applicability, in seconds
- smaxis (a), satellite semi-major axis, in meters
- ecc (e), satellite eccentricity
- izero (I_0), inclination angle at reference time, in radians
- razero (OMEGA_0), right ascension at reference time, in radians
(longitude of ascending node of orbit plane at weekly epoch)
- argper (omega), argument of perigee, in radians
- mzero (M_0), mean anomaly at reference time, in radians
- radot (OMEGA_DOT), rate of right ascension, in radians/second
For the ephemeris input data file, each record contains the data for a specified satellite
in the following order:
- satellite number
- toe, reference time ephemeris, in seconds
- smaxis (a), satellite semi-major axis, in meters
- ecc (e), satellite eccentricity
- izero (I_0), inclination angle at reference time, in radians
- razero (OMEGA_0), right ascension at reference time, in radians
(longitude of ascending node of orbit plane at weekly epoch)
- argper (omega), argument of perigee, in radians
- mzero (M_0), mean anomaly at reference time, in radians
- radot (OMEGA_DOT), rate of right ascension, in radians/second
- deln (delta_n), mean motion difference from computed value, in
radians/second
- idot (I_DOT), rate of inclination angle, in radians/second
- cic, amplitude of the cosine harmonic correction term to the
angle of inclination, in radians
- cis, amplitude of the sine harmonic correction term to the
angle of inclination, in radians
- crc, amplitude of the cosine harmonic correction term to the
orbit radius, in meters
- crs, amplitude of the sine harmonic correction term to the
orbit radius, in meters
- cuc, amplitude of the cosine harmonic correction term to the
argument of latitude, in radians
- cus, amplitude of the sine harmonic correction term to the
argument of latitude, in radians
Note that the macros svpalm.m and svpeph.m do not have the satellite number value as
input, and the counting of the satellite number should be done before or after calling these
macros. For example, by using the program XSVPALM with the options: 1) use default
data, 2) do not save the generated data into a specified file, the following output is
displayed on screen
Chapter 3 GPS Toolbox Examples
- Page 3-25 -
xsvpalm
Do you want to use the default data? (y/n)[y]
Do you want to save the generated data? (y/n)[y] n
***************************************************************
*****Simulation time = 2.3820500e+005 seconds
*****Almanac data for satellite # 1
toa = 2.44800000000000e+005 seconds
smaxis = 2.65603600409000e+007 meters
ecc = 5.28036116157000e-003
izero = 9.70306409202000e-001 radians
razero =-3.09805209344000e+000 radians
argper = 2.88898057517000e+000 radians
mzero =-7.84710884484000e-001 radians
radot =-7.84889836669000e-009 radians/second
ECEF position for satellite # 1 based on almanac data
x-component = 1.30432112750496e+007 meters
y-component =-1.19327165501914e+007 meters
z-component = 1.98564725885978e+007 meters
***************************************************************
End of the program XSVPALM

For example, by using the program XSVEPH with the options: 1) use default data, 2) do
not save the generated data into a specified file, the following output is displayed on
screen.
xsvpeph
Do you want to use the default data? (y/n)[y]
Do you want to save the generated data? (y/n)[y] n
******************************************************************
*****Simulation time = 2.3820500e+005 seconds
*****Satellite ephemeris data for satellite 1
toe = 1.00000000000000e+000 seconds
smaxis = 2.44800000000000e+005 meters
ecc = 2.65603600409000e+007
izero = 5.28036116157000e-003 radians
razero = 9.70306409202000e-001 radians
argper =-3.09805209344000e+000 radians
mzero = 2.88898057517000e+000 radians
radot =-7.84710884484000e-001 radians/second
deln =-7.84889836669000e-009 radians/second
Chapter 3 GPS Toolbox Examples
- Page 3-26 -
idot = 4.22624746874000e-009 radians/second
cic =-5.71452370000000e-012 radians
cis = 3.72529029846000e-008 radians
crc =-2.42143869400000e-008 meters
crs = 1.76593750000000e+002 meters
cuc =-7.20937500000000e+001 radians
cus =-3.73087823391000e-006 radians
ECEF position for the selected satellite 1 based on ephemeris data
x-component = 1.30430014347412e+007 meters
y-component =-1.19330503602754e+007 meters
z-component = 1.98561896412499e+007 meters
******************************************************************
End of the program XSVPEPH

By using the program XSVPCOMP a comparison between the satellite position based on
almanac and ephemeris data can be determined. For example, by using the default data
set, the RSS satellite position difference can be as high as about 175 meters and as low as
about 87 meters see Figure 3-13 with the average of about 137 meters. This result
emphasis the importance of using complete ephemeris data when a precise satellite
position is needed.
xsvpcomp
Do you want to use the default data? (y/n)[y]
Specify number of steps -- >1200
Specify the time-step, in seconds, e.g. 10. -->30
Place the text with statistics on the graph;
Press <Enter>or <Return>key to start ...
Press <Enter>or <Return>key to continue ...
Do you want to save the generated data? (y/n)[y]
Specify the output filename based on ephemeris computation -->xsvcompe.out
Specify the output filename based on almanac computation -->xsvcompa.out
End of the program XSVPCOMP

Chapter 3 GPS Toolbox Examples


- Page 3-27 -
Figure 3-13. RSS satellite position difference based on almanac and ephemeris data.
3.14 Determination of azimuth and elevation angles and execution of
related plots
The m-file programs XELAZ, XPELAZS and XPELAZA can be used to determine
elevation and azimuth angles and to execute related plots, namely: azimuth and elevation
angles versus time sequence for a specified users location, azimuth-elevation (skyplot)
for a specified satellite and users position, number of visible satellites versus time
sequence for a specified location, and azimuth-elevation (skyplot) for all satellites and
specified users position.
Below we are presenting an example that first uses the program XELAZ to generate
elevation data, azimuth data and number of visible satellites for specified user locations;
it then plots the desired graphs by using the program XPELAZS for a specified satellite.
The program XELAZ is asking the user to enter the following input data:
- almanac data; the default file is wk749.dat. The input almanac data file can be created
as specified in section 3.13.
- geographic location(s) for the test; the default data file is xelaz1.dat. The data can also
be entered from the keyboard by specifying latitude in radians, longitude in radians
and altitude above the ellipsoid in meters
- elevation mask angle limit; the default value is 0. degrees
- simulation time (GPS time of week); the default value is 0.
0 200 400 600 800 1000 1200
80
90
100
110
120
130
140
150
160
170
180
RSS Satellite position difference based on ephemeris and almanac versus Time step number
R
S
S

S
a
t
e
l
l
i
t
e

p
o
s
i
t
i
o
n

d
i
f
f
e
r
e
n
c
e
,

i
n

m
e
t
e
r
s
Time step number; initial time (tow) =375300 second(s) and time step =30 second(s)
mean =137.8169 ; st.dev. =30.8801 ; rms =141.2342
Chapter 3 GPS Toolbox Examples
- Page 3-28 -
- time step; the default value is 120 seconds
- number of time samples; the default value is 360
- name of the output file; the default is xelaz1.out.
Other parameters are initialized only by default.
The specified output data file contains for each time step and for each visible satellite the
following data: 1) time step number, 2) user's position index, 3) number of visible
satellites, 4) index of visible satellite, 5) elevation angle, 6) azimuth angle. This output
file can be used as an input file for the program XPELAZS, which executes plots related
to above-listed quantities.
The program XPELAZS is asking to enter the following input data:
- name of the input file; the default is xelaz1.out (i.e. the file generated by the program
XELAZ). The file contains for each time step and for each visible satellite the
following data: 1) time step number, 2) user's position index, 3) number of visible
satellites, 4) index of visible satellite, 5) elevation angle, in radians, 6) azimuth angle,
in radians
- selected time step in seconds (same value used by the program XELAZ) - from
keyboard; the default is 120 seconds
- selected satellite index to be analyzed - from keyboard (the available indices are
displayed on screen)
- selected user's location index to be analyzed - from keyboard (the available indices
are displayed on screen)
- selected graph type (from the menu). The menu contains the following options:
1) Number of visible satellites versus Time sequence,
2) Elevation angle versus Time sequence for a selected satellite,
3) Azimuth angle versus Time sequence for a selected satellite,
4) Elevation and azimuth angles versus Time sequence for a selected satellite,
5) Exit program.
The programs XELAZ and XPGELAZ were executed successively with the specified
default input data. Figures 3-14.1 through 3-14.4 show the obtained number of visible
satellites, elevation angle, azimuth angle, and elevation and azimuth angles versus time
sequence, respectively.
The program XPELAZA is executing azimuth-elevation skyplot and number of visible
satellites versus time step plot for all visible satellites. For example, by using the default
data set the following is displayed on the screen:
xpelaza
Enter almanac data - the default is data file wk749.dat
Do you want to use the default data file? (y/n)[y] -->
There are 25 satellites in the wk749.dat almanac
Enter geographic location data
Do you want to use a data file? (y/n)[y] -->
Chapter 3 GPS Toolbox Examples
- Page 3-29 -
0 50 100 150 200 250 300 350 400
8
8.5
9
9.5
10
10.5
11
Number of visible satellites for User #1
N
u
m
b
e
r

o
f

v
i
s
i
b
l
e

s
a
t
e
l
l
i
t
e
s
Time sequence (Time step = 120 seconds)
Figure 3-14.1. Elevation and azimuth angles evaluation. Number of visible satellites.
0 50 100 150 200 250 300 350 400
0
5
10
15
20
25
30
35
Elevation angle for SV # 9 and User #1
E
l
e
v
a
t
i
o
n

a
n
g
l
e

i
n

d
e
g
r
e
e
s
Time sequence (Time step = 120 seconds)
Figure 3-14.2. Elevation and azimuth angles evaluation. Elevation angle.
Chapter 3 GPS Toolbox Examples
- Page 3-30 -
0 50 100 150 200 250 300 350 400
0
20
40
60
80
100
120
140
160
180
Azimuth angle for SV # 9 and User #1
A
z
i
m
u
t
h

a
n
g
l
e

i
n

d
e
g
r
e
e
s
Time sequence (Time step = 120 seconds)
Figure 3-14.3. Elevation and azimuth angles evaluation. Azimuth angle.
0 50 100 150 200 250 300 350 400
0
20
40
60
80
100
120
140
160
180
Elevation and Azimuth angles for SV # 9 and User #1
E
l
e
v
a
t
i
o
n

a
n
d

a
z
i
m
u
t
h

a
n
g
l
e
s

i
n

d
e
g
r
e
e
s
Time sequence (Time step = 120 seconds)
Figure 3-14.4. Elevation and azimuth angles evaluation. Elevation and azimuth angles.
Chapter 3 GPS Toolbox Examples
- Page 3-31 -
Enter name of the location data file - the default is xelaz1.dat
Use the default data file? (y/n)[y] -->
Enter elevation mask angle limit - the default value is 5. degrees
Do you want to use the default value? (y/n)[y] -->
Enter simulation time (GPS time of week) - the default value is 0.
Do you want to use the default value? (y/n)[y] -->
Enter time step - the default value is 120 seconds
Do you want to use the default value? (y/n)[y] -->
Enter number of time samples - the default value is 60
Do you want to use the default value? (y/n)[y] -->
End of the program XPELAZA

and Figure 3-14.5 shows the corresponding skyplot.


Figure 3-14.5. Azimuth-elevation skyplot for all visible satellites.
Basically we recommend using the programs XELAZ and XPELAZS when a detailed
analysis of individual satellite is required, while for all satellites together analysis the
program XPELAZA is useful.
Azimuth-Elevation plot for 60 Time sequences (Time step =120 seconds)
East West
North
South
60
30
0
2
4
7
14
15
18
19
27
29
Location: lat =0.0087266 rad, lon =0.01309 rad, alt =1235 m
Simulation start time (tow) =0 sec. Almanac =wk749.dat
Chapter 3 GPS Toolbox Examples
- Page 3-32 -
3.15 Determination of DOP quantities and execution of contour plots
The programs XDOP and XWDOP are used for the determination of dilution of precision
(DOP) and weighted dilution of precision (WDOP) quantities. To determine DOP or
WDOP quantities the line-of-sight (LOS) unit vectors and the weighting factors, in the
case of WDOP, are required as inputs.
For example, by using the program XDOP with the 7 line-of-sight unit vectors specified
by the input data file geom7.dat the following result is displayed on screen:
xdop
Do you want to save the generated data? (y/n)[n] -->
Select the macro to be used:
--> 1 for dop1.m (when at least 3 LOS measurements)
--> 2 for dop2.m (when only 4 LOS measurements)
Make selection -->1
Specify the input filename (with extension), e.g. geom4.dat -->geom7.dat
***** Input data ******
LOS # 1 --> 0.0778800 -0.6017930 0.7947552
LOS # 2 --> 0.1730016 -0.9665970 -0.1891052
LOS # 3 --> -0.8457427 -0.4893909 -0.2126402
LOS # 4 --> -0.5385451 -0.2338803 0.8094870
LOS # 5 --> 0.4345836 -0.7366578 -0.5181432
LOS # 6 --> 0.7052152 -0.5433383 0.4554723
LOS # 7 --> -0.8973768 0.3366878 0.2852302
***** Results from the macro DOP1.m *****
Geometric Dilution of Precision (GDOP) = 2.1733
Position Dilution of Precision (PDOP) = 1.9564
Horizontal Dilution of Precision (HDOP) = 1.7499
Vertical Dilution of Precision (VDOP) = 0.8749
Time Dilution of Precision (TDOP) = 0.9464
***************************************************
Do you want another computation? (y/n)[n] -->
End of program XDOP

For example, by using the program XWDOP with the 7 line-of-sight unit vectors
specified by the input data file geom7.dat and the weighting factors entered from
keyboard as (1. 1.2 0.8 1. 1.2 1.1 1.) the following result is displayed on screen:
xwdop
Do you want to save the generated data? (y/n)[n] -->
Chapter 3 GPS Toolbox Examples
- Page 3-33 -
Select the macro to be used:
--> 1 for wdop1.m (when at least 3 LOS measurements)
--> 2 for wdop2.m (when only 4 LOS measurements)
Make selection -->1
Specify the input filename (with extension) -->geom7.dat
Enter the weighting factor for LOS #1: 1
Enter the weighting factor for LOS #2: 1.2
Enter the weighting factor for LOS #3: 0.8
Enter the weighting factor for LOS #4: 1
Enter the weighting factor for LOS #5: 1.2
Enter the weighting factor for LOS #6: 1.1
Enter the weighting factor for LOS #7: 1
***** Input data ****************************************
LOS # 1 --> 0.0778800 -0.6017930 0.7947552
with the weighting factor --> 1.0000000
LOS # 2 --> 0.1730016 -0.9665970 -0.1891052
with the weighting factor --> 1.2000000
LOS # 3 --> -0.8457427 -0.4893909 -0.2126402
with the weighting factor --> 0.8000000
LOS # 4 --> -0.5385451 -0.2338803 0.8094870
with the weighting factor --> 1.0000000
LOS # 5 --> 0.4345836 -0.7366578 -0.5181432
with the weighting factor --> 1.2000000
LOS # 6 --> 0.7052152 -0.5433383 0.4554723
with the weighting factor --> 1.1000000
LOS # 7 --> -0.8973768 0.3366878 0.2852302
with the weighting factor --> 1.0000000
***** Results from the macro WDOP1.m *******************
Weighted Geometric Dilution of Precision (WGDOP) = 2.1382
Weighted Position Dilution of Precision (WPDOP) = 1.9310
Weighted Horizontal Dilution of Precision (WHDOP)= 1.7334
Weighted Vertical Dilution of Precision (WVDOP) = 0.8508
Weighted Time Dilution of Precision (WTDOP) = 0.9182
************************************************************
Do you want another computation? (y/n)[n] -->
End of the program XWDOP

Note that both programs XDOP and XWDOP have an option to use two different macros
depending of the number of LOS are available; the second selection is possible only when
4 LOS are available, while the first selection is available when 3 or more LOS are
available.
Chapter 3 GPS Toolbox Examples
- Page 3-34 -
Finally, the program XMAPDOP can be used to determine the repartition of the number
of visible satellites and the corresponding DOPs for a specified geographical area. The
program XMAPDOP is asking the user to enter the following input data:
- name of the input almanac data file; the default data file is
- wk749.dat. The almanac input data file can be created as specified in
section 3.13.
- geographic locations for the test; the default is data file
map01.dat. The first record of the file should contain the latitude
limits while the second record should contain the longitude limits,
both in degrees
- elevation angle limit; the default value is 5 degrees
- simulation time (GPS time of week), in seconds; the default value
is 0.
- selection of xdop to be plotted
- number of time samples and time step value, in seconds (if more
than one time step is selected)
- name of the output file for satellite visibility statistics
(optional)
- other parameters are initialized by default; the default latitude-
longitude grid is 25 by 41 (default)
By using the default input data set and the selection of GDOP as a criteria for the analysis
of data the following results are displayed on screen:
xmapdop
Enter almanac data file - the default is data file wk749.dat
Do you want to use the default data file? (y/n)[y] -->
Enter geographic location data - the default is the data file map01.dat
Do you want to use the default data file? (y/n)[y]
Enter elevation angle limit - the default value is 5 degrees
Do you want to use the default value? (y/n)[y]
Enter simulation time (GPS time of week), in seconds - the default is 0.
Do you want to use the default value? (y/n)[y]
Select xdop to be plotted
Enter 1 for gdop
Enter 2 for pdop
Enter 3 for hdop
Enter 4 for vdop
Enter 5 for tdop
Make selection --> 1
Enter number of time samples - the default value is 1
Do you want to use the default value? (y/n)[y]
Do you want to save the visibility statistics? (y/n)[y]
Specify the filename for satellite visibility statistics --> xmapdop1.out
***** Computation in progress for time sample = 1
Chapter 3 GPS Toolbox Examples
- Page 3-35 -
Figure 3-15.1 GDOP values contour map.
Figure 3-15.2 Number of visible satellites contour plot.
-6 -4 -2 0 2 4 6 8 10 12
42
43
44
45
46
47
48
49
50
51
52
Longitude, in degrees
L
a
t
i
t
u
d
e
,

i
n

d
e
g
r
e
e
s
GDOP versus longitude-latitude grid, for wk749.dat at time-of-week =0
1.5
1.6
1.6
1.7
1.7
1.8
1.8
1.9
1.9
2
2
-6 -4 -2 0 2 4 6 8 10 12
42
43
44
45
46
47
48
49
50
51
52
Number of visible satellites versus longitude-latitude grid, for wk749.dat at time-of-week =0
Longitude, in degrees
L
a
t
i
t
u
d
e
,

i
n

d
e
g
r
e
e
s
8
8
9
Chapter 3 GPS Toolbox Examples
- Page 3-36 -
Include the geographic map? (y/n)[y] -->n
Plot the visible satellite contour? (y/n)[y] -->
Include the geographic map? (y/n)[y] -->
End of the program XMAPDOP

The obtained contour plots are presented in Figures 3-15.1 and 3-15.2 for GDOP values
and number of visible satellites, respectively. The satellite visibility statistics saved in the
selected file xmapdop1.out is as follows:
***********************************************************************
XMAPDOP - RESULTS
************************************************************************
Almanac: wk749.dat
Time of week: 0.00
Geographic area:
- longitude (in degrees): -7.00 to 13.00
- latitude (in degrees): 42.00 to 52.00
Number of space-time points analyzed = 1025
*************************************************************************
SUMMARY - SATELLITE VISIBILITY STATISTICS
Number of cases with <5 visible satellites = 0, percentage = 0.00
Number of cases with 5 visible satellites = 0, percentage = 0.00
Number of cases with 6 visible satellites = 0, percentage = 0.00
Number of cases with 7 visible satellites = 166, percentage = 16.20
Number of cases with 8 visible satellites = 389, percentage = 37.95
Number of cases with 9 visible satellites = 470, percentage = 45.85
Number of cases with 10 visible satellites = 0, percentage = 0.00
Number of cases with 11 visible satellites = 0, percentage = 0.00
Number of cases with >11 visible satellites = 0, percentage = 0.00
***********************************************************************
3.16 Satellite selection based on minimum GDOP criteria
The program XSVSEL can be used to select the best 4, 5 or 6 satellites based on
minimum GDOP criteria. The DOPs quantities are determined by using the m-file
module DOP1.M.
The program XSVSEL requires the user to enter from keyboard the following input data:
name of the input filename; the default is XSVSEL1.DAT
name of the output filename; the default is XSVSEL.OUT
number of the satellites to be selected.
The output data are as follows:
number of satellites available
number of satellites to be used
indices of the selected satellites
dilution of precision (DOP) values for the selected satellites set, i.e. GDOP, PDOP,
HDOP, VDOP, and TDOP.
Chapter 3 GPS Toolbox Examples
- Page 3-37 -
When the default data are used (see data file XSEVSEL1.DAT), the results for the
selection with 4, 5 and 6 satellites are presented in Figure 3-16.1. For comparison, when
all seven satellites are used, the results of the computation of DOP values, by using the
program XDOP1, are presented in Figure 3-16.2.
Number of satellites available = 7
Number of satellites to be used = 4
Indices of the selected satellites = 1 3 5 7
GDOP = 2.745
PDOP = 2.488
HDOP = 2.254
VDOP = 1.054
TDOP = 1.159
**************************************************************
**************************************************************
Number of satellites available = 7
Number of satellites to be used = 5
Indices of the selected satellites = 1 3 5 6 7
GDOP = 2.453
PDOP = 2.252
HDOP = 2.000
VDOP = 1.036
TDOP = 0.973
**************************************************************
**************************************************************
Number of satellites available = 7
Number of satellites to be used = 6
Indices of the selected satellites = 1 2 3 5 6 7
GDOP = 2.288
PDOP = 2.081
HDOP = 1.806
VDOP = 1.034
TDOP = 0.952
**************************************************************
Figure 3-16.1. Satellites selection based on minimum GDOP; 4, 5, and 6 satellites
selection from 7 satellites available.
**************************************************************
***** Input data ******
LOS # 1 --> 0.0778800 -0.6017930 0.7947552
LOS # 2 --> 0.1730016 -0.9665970 -0.1891052
LOS # 3 --> -0.8457427 -0.4893909 -0.2126402
LOS # 4 --> -0.5385451 -0.2338803 0.8094870
LOS # 5 --> 0.4345836 -0.7366578 -0.5181432
LOS # 6 --> 0.7052152 -0.5433383 0.4554723
Chapter 3 GPS Toolbox Examples
- Page 3-38 -
LOS # 7 --> -0.8973768 0.3366878 0.2852302
***** Results from the macro XDOP1.m *****
Geometric Dilution of Precision (GDOP) = 2.1733
Position Dilution of Precision (PDOP) = 1.9564
Horizontal Dilution of Precision (HDOP) = 1.7499
Vertical Dilution of Precision (VDOP) = 0.8749
Time Dilution of Precision (TDOP) = 0.9464
**************************************************************
Figure 3-16.2. Satellites selection based on minimum GDOP;all satellites selection
from 7 satellites available.
3.17 Determination of iono correction and execution of related graphs
The m-file program XIONOC is used to determine the iono correction and to execute
several related plots. The macro IONOC computes L1 iono correction for a specified user
by using Klobuchar model, and macro IONOCON sets the Klobuchar model iono
constants alpha and beta. The program XIONOC executes four plots related to the iono
correction, namely
plot of number of visible satellites versus time sample number
3-D plot of iono correction versus time sample number
plot of iono correction versus satellite id for a selected time sample number (the value
is set to 0. when the satellite is not visible)
plot of iono correction versus time sample number for a selected satellite (from the
list of visible satellites),
and, optional, the generated data can be saved into a specified file.
For example, by using the default data set and selecting 20 time samples the following is
displayed on screen:
xionoc
Enter almanac data - the default is data file wk749.dat
Do you want to use the default data file? (y/n)[y] -->
Enter geographic location data - the default is the data file locat1.dat
Do you want to use the default data file? (y/n)[y]
Enter elevation angle limit - the default value is 5 degrees
Do you want to use the default value? (y/n)[y]
Enter initial simulation time (GPS time of week), in seconds - the default is 0.
Do you want to use the default value? (y/n)[y]
Enter number of time samples - the default value is 10
Do you want to use the default value? (y/n)[y] n
Enter number of time samples --> 20
Enter time step - the default value is 300.
Do you want to use the default value? (y/n)[y]
Chapter 3 GPS Toolbox Examples
- Page 3-39 -
***** Computation in progress for time sample = 1
***** Computation in progress for time sample = 2
***** Computation in progress for time sample = 3
***** Computation in progress for time sample = 4
***** Computation in progress for time sample = 5
***** Computation in progress for time sample = 6
***** Computation in progress for time sample = 7
***** Computation in progress for time sample = 8
***** Computation in progress for time sample = 9
***** Computation in progress for time sample = 10
***** Computation in progress for time sample = 11
***** Computation in progress for time sample = 12
***** Computation in progress for time sample = 13
***** Computation in progress for time sample = 14
***** Computation in progress for time sample = 15
***** Computation in progress for time sample = 16
***** Computation in progress for time sample = 17
***** Computation in progress for time sample = 18
***** Computation in progress for time sample = 19
***** Computation in progress for time sample = 20
Do you want to save the iono correction data? (y/n)[n] y
Do you want to use the default file, xionoc1.out? (y/n)[y]
Number of time sample available = 20
Select the time sample number to be analyzed -->20
The following satellites are in the almanac:
1 2 4 5 6 7 9 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31
Select the satellite id -->5
End of the program XIONOC

The resulted plots are presented in Figures 3-17.1 to 3-17.4. The obtained data can be
saved into a specified output data file.
Chapter 3 GPS Toolbox Examples
- Page 3-40 -
Figure 3-17.1 Number of visible satellites versus time sample number
Figure 3-17.2 Iono correction versus time sample and satellite id
2 4 6 8 10 12 14 16 18 20
3
4
5
6
7
8
9
10
11
12
Time sample number (time step =300 seconds, start time tow =0 seconds)
N
u
m
b
e
r

o
f

v
i
s
i
b
l
e

s
a
t
e
l
l
i
t
e
s
Number of visible satellites versus Time sample number (almanac wk749.dat)
Chapter 3 GPS Toolbox Examples
- Page 3-41 -
Figure 3-17.3 Iono correction versus satellite id, for a specified time sample
Figure 3-17.4 Iono correction versus time sample number for a specified satellite
5 10 15 20 25 30
0
2
4
6
8
10
12
14
16
Satellite number (almanac wk749.dat)
I
o
n
o

c
o
r
r
e
c
t
i
o
n
,

i
n

m
e
t
e
r
s


(
0

i
f

s
a
t
e
l
l
i
t
e

i
s

n
o
t

v
i
s
i
b
l
e
)
Iono correction versus Satellite number, for Time sample #20
0 2 4 6 8 10 12 14 16 18 20
4.4
4.6
4.8
5
5.2
5.4
5.6
5.8
6
Time sample number (time step =300 seconds, start time tow =0 seconds)
I
o
n
o

c
o
r
r
e
c
t
i
o
n
,

i
n

m
e
t
e
r
s
Iono correction versus Time sample number, for satellte #5 (almanac wk749.dat)
Chapter 3 GPS Toolbox Examples
- Page 3-42 -
3.18 Determination of troposphere delay correction
The program XTROPOC1 determines troposphere delay contour graph for a specified
latitude-longitude location, elevation angle, and altitude range by using a simplified
model; WGS-84 geoid heights are used. The resulted contour graph depends on altitude
above WGS-84 ellipsoid and elevation angle.
For example, by using the default file tgeoid84.dat for the WGS-84 geoid heights, and
latitude/longitude entry from the keyboard the following is displayed on screen:
xtropoc1
Enter latitude, in degrees --> 32.12345
Enter longitude, in degrees --> -118.12345
Do you want to execute another computation/plot? (y/n)[n] -->
End of the program XTROPOC1

and the resulted contour graph is presented in Figure 3-18.


Figure 3-18. Troposphere delay for a specified latitude/longitude location
0. 2000. 4000. 6000. 8000.
0
10
20
30
40
50
60
70
80
90
10
4
3
2
1.5
1
0.8
Altitude, in meters
E
l
e
v
a
t
i
o
n

A
n
g
l
e
,

i
n

d
e
g
r
e
e
s
Tropo Delay Contours (meters), for lat=32.1234 deg.,lon=-118.1235 deg.
Chapter 3 GPS Toolbox Examples
- Page 3-43 -
3.19 Determination of user clock errors
The program XUCLOCK generates, saves and plots the user clock bias and drift for a
specified number of receivers and time steps, by using a simplified second order model
[8].
The user has to enter the following data from the keyboard:
- maximum number of users (receivers), nru (default is 6)
- number of time steps to be generated, nrsteps (default is 1800)
- time step value, in seconds (default is 1 second)
- white noise spectral density amplitude (Sb) for the first component
corresponding to clock bias, in seconds
- white noise spectral density amplitude (Sd) for the second component
corresponding to clock drift, in second/second
- random number seed value (default is 0)
- selection of the storage data file
- mat-files: ucbfile.mat and ucdfile.mat
- selected name for two ASCII data files
- none, no storage (default)
- selection of user clock bias and drift plots from generated data
- some application specific parameters are initialized by default (see
Sb and Sd for a clock with crystal oscillator)
If the default data are used then the user clock bias and drift for the user 2 are presented in
Figure 3-19.
Figure 3-19. User clock bias and drift errors versus time step number
0 200 400 600 800 1000 1200 1400 1600 1800
-3
-2
-1
0
1
x 10
4
U
s
e
r

c
l
o
c
k

b
i
a
s
,

i
n

m
e
t
e
r
s
User clock bias versus Time step, for user 2
mean =-9115.1801 ; st.dev. =7267.3293 ; rms =11657.6406
0 200 400 600 800 1000 1200 1400 1600 1800
-30
-20
-10
0
10
Time step number (time step =1second(s))
U
s
e
r

c
l
o
c
k

d
r
i
f
t
,

i
n

m
e
t
e
r
s
/
s
e
c
o
n
d
User clock drift versus Time step, for user 2
mean =-12.3784 ; st.dev. =5.8504 ; rms =13.6913
Chapter 3 GPS Toolbox Examples
- Page 3-44 -
3.20 Determination of multipath error
The program XMPATH generates, saves and plots the multipath pseudorange errors for a
specified number of satellites and time steps, by using a method presented in [25], [28],
[29].
The user has to enter the following data from the keyboard:
- maximum number of satellites used, nrsv (default is 12)
- number of time steps to be generated, nrstep (default is 1800)
- random number seed value (default is 0)
- selection of the storage data file
- mpfile.mat
- selected name for ASCII data file
- none, no storage (default)
- selection of multipath plots from generated data
- satellite(s) number for which the generated data is plotted
- application specific parameters are initialized by default (see
sigma, order and wn) and time step is 1 second
For example, by using the default data, the multipath pseudorange error for satellite
number 5 is presented in Figure 3-20. The output file xmpath1.out contains multipath
data for 6 different satellites.
Figure 3-20. Multipath error versus time step number
0 200 400 600 800 1000 1200 1400 1600 1800
-4
-3
-2
-1
0
1
2
3
4
5
6
Time step number
M
u
l
t
i
p
a
t
h

p
s
e
u
d
o
r
a
n
g
e

e
r
r
o
r
s
,

i
n

m
e
t
e
r
s
Multipath pseudorange errors versus Time step, for satellite number 5
mean =0.3101 ; st.dev. =1.2443 ; rms =1.2824
Chapter 3 GPS Toolbox Examples
- Page 3-45 -
3.21 Determination of user earth rotation correction error
The program XUERCOR generates the user earth rotation correction vector and plots the
vector magnitude for a specified latitude-longitude grid; the vector is computed only
when the satellite is visible, i.e. when the elevation angle is greater or equal to the
elevation mask angle.
The user has to enter the following data from the keyboard:
- name of the input almanac data file; the default is data file
wk749.dat. The almanac input data file can be created as specified in
3.13.
- elevation mask angle, in degrees; the default value is 5 degrees
- simulation time, time of week, in seconds; the default value is 0.
- index of the selected satellite (prn)
- longitude/latitude/altitude grid by default (longitude and latitude by
10 degrees from 0 to 360, and -90 to 90, respectively, and altitude is
always 0 meters); the grid can be easily modified
- option to save the generated data in the file ercor.mat
For example, by using the default data, the magnitude of the earth rotation correction
vector is presented in Figure 3-21.
Figure 3-21. Multipath error versus time step number
A similar program can be created to plot the magnitude of the earth rotation correction
vector versus time for a specified location.
Chapter 3 GPS Toolbox Examples
- Page 3-46 -
3.22 Computation of position fix through direct and iterative methods
The m-file programs XUPOSD4, XUPOSDG and XUPOSIT are used to determine the
users ECEF position when at least four satellites positions and the corresponding
pseudoranges are known.
The programs XUPOSD4 and XUPOSDG are using a direct method [5], [9], while the
program XUPOSIT is implementing an iterative method. The program XUPOSD4
requires four satellites positions and the corresponding pseudoranges, while XUPOSDG
can use four or more measurements in order to determine the users position fix. It is
worth mentioning that the program XUPOSDG (and the m-file module UPOSDG.M) can
be indirectly used to evaluate the compatibility of the measurements when there are more
than four available.
The main programs XUPOSD4 and XUPOSDG require you to enter the following input
data from the keyboard :
- name of the output data file if selected, otherwise the results are displayed on screen
- name of the ASCII input data file; each row contains three components of the ECEF
satellites position and the corresponding pseudorange
The main program XUPOSIT requires an additional entry from keyboard, namely
- initial users position in ECEF; the default value is (0. 0. 0.).
As an example all three programs were run with the input data file SV4POSR.DAT, and
the default initialization for the users position required by the program XUPOSIT was
selected.
As expected the results are identical for the programs XUPOSD4 and XUPOSDG - see
Figure 3-22.1, while the program XUPOSIT produces the same results after the fourth
iteration - see Figure 3-22.2. For additional test results one can examine the file
xuposdg.out where different input data files are used, i.e. sv*posr.dat and sv*bposr.dat.
******************************** INPUT DATA ********************************
For SV # 1
***** ECEF position (in meters) :
-19123734.8458861 4796367.7619305 17869429.2812209
***** Pseudorange (in meters) :
23909742.7976553
For SV # 2
***** ECEF position (in meters) :
-8193159.7590035 -23701864.0154019 8895653.7904103
***** Pseudorange (in meters) :
20573499.7833666
For SV # 3
***** ECEF position (in meters) :
-9484186.0430210 -11984566.8851433 21782085.5906154
***** Pseudorange (in meters) :
Chapter 3 GPS Toolbox Examples
- Page 3-47 -
20856075.2284462
For SV # 4
***** ECEF position (in meters) :
14919884.5916690 -8641808.9140306 20267093.1182708
***** Pseudorange (in meters) :
24459299.8736929
******************************* RESULTS *************************************
Computed ECEF user"s position (in meters) :
-2485034.2627931 -4673669.7053273 3546446.5637510
Computed user"s clock bias measured in units of distance (in meters) :
0.00000000256114
*******************************************************************************
Figure 3-22.1. Determination of users position by using a direct method
******************************** INPUT DATA ********************************
For SV # 1
***** ECEF position (in meters) :
-19123734.8458861 4796367.7619305 17869429.2812209
***** Pseudorange (in meters) :
23909742.7976553
For SV # 2
***** ECEF position (in meters) :
-8193159.7590035 -23701864.0154019 8895653.7904103
***** Pseudorange (in meters) :
20573499.7833666
For SV # 3
***** ECEF position (in meters) :
-9484186.0430210 -11984566.8851433 21782085.5906154
***** Pseudorange (in meters) :
20856075.2284462
For SV # 4
***** ECEF position (in meters) :
14919884.5916690 -8641808.9140306 20267093.1182708
***** Pseudorange (in meters) :
24459299.8736929
Initial user"s ECEF position (in meters) :
0.0000000 0.0000000 0.0000000
******************************* RESULTS *************************************
***** After iteration = 1
Computed ECEF user"s position (in meters) :
-2910941.9754610 -5543114.2074126 4165091.1910825
Computed user"s clock bias measured in units of distance (in meters) :
1190745.07862144500000
Chapter 3 GPS Toolbox Examples
- Page 3-48 -
***** After iteration = 2
Computed ECEF user"s position (in meters) :
-2494496.7367185 -4695642.2333165 3558422.3347400
Computed user"s clock bias measured in units of distance (in meters) :
29912.18300978350000
***** After iteration = 3
Computed ECEF user"s position (in meters) :
-2485039.1049969 -4673682.1099747 3546449.0004498
Computed user"s clock bias measured in units of distance (in meters) :
14.34086189510712
***** After iteration = 4
Computed ECEF user"s position (in meters) :
-2485034.2627939 -4673669.7053299 3546446.5637488
Computed user"s clock bias measured in units of distance (in meters) :
0.00000208603516
***** After iteration = 5
Computed ECEF user"s position (in meters) :
-2485034.2627931 -4673669.7053273 3546446.5637510
Computed user"s clock bias measured in units of distance (in meters) :
-0.00000000371302
*******************************************************************************
Figure 3-22.2. Determination of users position by using an iterative method
3.23 Evaluation of weighted least square navigation solution
The program XPFWLS determines the position fix using the weighted least square
algorithm when the user is stationary; the pseudoranges are generated by adding a random
number generated error to the truth range. The program computes the horizontal (East-
North) position error, East/North/Up position error versus time step, and the magnitudes
of horizontal/vertical/3-dimensional position error versus time.
The user has to enter the following data from the keyboard:
- name of the almanac input data file; the default is data file
wk749.dat. The almanac input data file can be created as specified in
3.13.
- user's true position (latitude, longitude and altitude) entered
from keyboard or a specified data file
- elevation mask angle limit in degrees; the default is 5. degrees
- selection of the measurement standard deviation; the default is
33 meters for SPS and 6 meters for PPS; at the same time specific
uniformly distributed weighted factors are selected for up to 33
satellite measurements
- simulation time (GPS time of week); the default value is 0.
- number of time steps
- time step, in seconds
- name of the output file (optional)
Chapter 3 GPS Toolbox Examples
- Page 3-49 -
- selection of the graph
- other parameters are initialized by default
For example, by using the following input data from the keyboard:
xpfwls
Enter almanac data file - the default is data file wk749.dat
Do you want to use the default data file? (y/n)[y]
Enter user"s true position from keyboard? (y/n)[y]
Enter latitude, in degrees --> 37
Enter longitude, in degrees --> -122
Enter altitude, in meters --> 100
Enter elevation angle limit; the default value is 5. degrees
Do you want to use the default value? (y/n)[y]
Enter GPS receiver type :
1 --> SPS with Selective Availability On
2 --> SPS with Selective Availability Off
Make the selection --> 2
Enter initial simulation time (GPS time of week); the default value is 0.
Do you want to use the default value? (y/n)[y]
Enter number of time steps, e.g. 50 -->50
Enter time step, in seconds, e.g. 60 -->60
Do you want to save the generated data? (y/n)[n]
Do you want to execute the graphs? (y/n)[y]
Execute the horizontal position error graph ...
Select the mouse position to insert statistics text on the graph...
Press a key to start ...
End of the program XPFWLS

and the resulted graphs are presented in Figures 3-23.1 to 3-23.3.


The program can be modified to include the following cases:
- non-stationary user with a prescribed trajectory,
- pseudoranges generated by using the iono/tropo errors, user clock bias and drift
errors, multipath errors, user earth rotation error, and random errors due to
pseudorange.
Chapter 3 GPS Toolbox Examples
- Page 3-50 -
Figure 3-23.1. Weighted Least Squares Position Fix Horizontal position error
Figure 3-23.2. Weighted Least Squares Position Fix East/North/Up position error
-20 -15 -10 -5 0 5 10 15 20
-20
-15
-10
-5
0
5
10
15
20
Weighted Least Squares Position Fix - Horizontal Position Error - for SPS with SA Off
N
o
r
t
h

P
o
s
i
t
i
o
n

E
r
r
o
r
,

i
n

m
e
t
e
r
s
East Position Error, in meters
mean =4.6734 ; st.dev. =2.5148 ; rms =5.3071
0 5 10 15 20 25 30 35 40 45 50
-20
-10
0
10
Weighted Least Squares Position Fix - East/North/Up Position Error - for SPS with SA Off
E
a
s
t
,

i
n

m
e
t
e
r
s
mean =0.087313 ; st.dev. =4.2743 ; rms =4.2752
0 5 10 15 20 25 30 35 40 45 50
-10
0
10
N
o
r
t
h
,

i
n

m
e
t
e
r
s
mean =-0.30377 ; st.dev. =3.1999 ; rms =3.2142
0 5 10 15 20 25 30 35 40 45 50
-20
0
20
U
p
,

i
n

m
e
t
e
r
s
Time step number (time step =60 seconds, almanac =wk749.dat)
mean =1.2942 ; st.dev. =7.4466 ; rms =7.5582
Chapter 3 GPS Toolbox Examples
- Page 3-51 -
Figure 3-23.3. Weighted Least Squares Position Fix Magnitude of position errors
3.24 GPS RAIM integrity evaluation
The m-file programs XRAIMST.M and XRAIMFD.M can be used to evaluate GPS
RAIM for a specified set of input data. The program XRAIMST implements the baseline
standard constant alarm rate algorithm [7] and determines availability and failure flags,
while the program XRAIMFD implements the fault detection part of the fault detection
and exclusion algorithm presented in [23]. Both programs can be expanded to include the
isolation/exclusion portion of the algorithms, respectively, as well as to include RAIM
evaluation for a dynamic scenario. At this time, for clarity of the presentation, we decided
to incorporate only the fault detection portions.
The program XRAIMST requires to enter from keyboard the following input data:
- name of the data file containing line-of-sight unit vectors, each vector is stored in
another row (it should be 3 columns); a complete set of default values with 7 line-of-
sight vectors are specified
- name of the data file containing errors in true ranges, a set of default values is specified
- name of the output file (optional); the default is the screen.
Values of the threshold and approximate radial error protected ceilings are automatically
selected from a table specified in [7] for non-precision approach flight case.
The output file contains the values of the selected input data set and the status of the
output flags, i.e. availability flag and test statistic/failure flag. The results obtained by
using the default values with the program XRAIMST are presented in Figure 3-24.1.
0 5 10 15 20 25 30 35 40 45 50
0
5
10
15
Weighted Least Squares Position Fix - Magnitude of Position Errors - for SPS with SA Off
H
o
r
i
z
o
n
t
a
l
,

i
n

m
e
t
e
r
s
mean =4.6734 ; st.dev. =2.5148 ; rms =5.3071
0 5 10 15 20 25 30 35 40 45 50
0
10
20
V
e
r
t
i
c
a
l
,

i
n

m
e
t
e
r
s
mean =5.9995 ; st.dev. =4.5201 ; rms =7.5117
0 5 10 15 20 25 30 35 40 45 50
0
10
20
3
-
D
i
m
e
n
s
i
o
n
a
l
,

i
n

m
e
t
e
r
s
Time step number (time step =60 seconds, almanac =wk749.dat)
mean =8.2945 ; st.dev. =3.9458 ; rms =9.1852
Chapter 3 GPS Toolbox Examples
- Page 3-52 -
**************************************************************
***** Input data ******
LOS # 1 --> 0.0778799 -0.6017930 0.7947552
LOS # 2 --> 0.1730016 -0.9665970 -0.1891052
LOS # 3 --> -0.8457427 -0.4893909 -0.2126402
LOS # 4 --> -0.5385451 -0.2338803 0.8094870
LOS # 5 --> 0.4345836 -0.7366578 -0.5181432
LOS # 6 --> 0.7052152 -0.5433383 0.4554723
LOS # 7 --> -0.8973768 0.3366878 0.2852302
Non-Precision Approach - threshold (in meters) = 90.00000
Non-Precision Approach - ARP ceiling (in meters) = 353.00000
Range error # 1 (in meters) --> 35.00000
Range error # 2 (in meters) --> 30.00000
Range error # 3 (in meters) --> 37.00000
Range error # 4 (in meters) --> 36.00000
Range error # 5 (in meters) --> 36.00000
Range error # 6 (in meters) --> 39.00000
Range error # 7 (in meters) --> 40.00000
***** Results by using XRAIMST ******
Availability flag -->Inadmissible
Test statistic -->No failure
**************************************************************
Figure 3-24.1. GPS RAIM integrity evaluation by using m-file program XRAIMST.
The program XRAIMFD requires to enter from keyboard the following input data:
- name of the data file containing line-of-sight unit vectors, each vector is stored in
another row (it should be 3 columns); a complete set of default values with 7 line-of-
sight vectors are specified
- number of steps to be executed; the default is 1
- number of measurements for each step; the default is 7
- name of the output file (optional); the default is the screen.
The probability of false alarm, probability of missed detection and standard deviation of
measurement noise are automatically selected as 0.0000667, 0.001, and 33.3 meters,
respectively. The input data file XRAIMFD1.DAT contains input data for three steps with
7, 6 and 5 measurements, respectively.
The output file contains the values of the selected input data set and the status of the
output flags, i.e. false alarm, true alarm, missed detection, normal operation and
unavailable, at each time step. The results obtained by using the default values with the
program XRAIMFD are presented below in Figure 3-24.2.
**************************************************************
***** Input data ******
LOS # 1 --> 0.0778799 -0.6017930 0.7947552
Chapter 3 GPS Toolbox Examples
- Page 3-53 -
LOS # 2 --> 0.1730016 -0.9665970 -0.1891052
LOS # 3 --> -0.8457427 -0.4893909 -0.2126402
LOS # 4 --> -0.5385451 -0.2338803 0.8094870
LOS # 5 --> 0.4345836 -0.7366578 -0.5181432
LOS # 6 --> 0.7052152 -0.5433383 0.4554723
LOS # 7 --> -0.8973768 0.3366878 0.2852302
Probability of false alarm = 0.0000667
Probability of missed detection = 0.0010000
Standard deviation of measurement noise (in meters) = 33.30
***** Results by using XRAIMFD ******
*** Step = 1 ***
False Alarm Flag = 0
True Alarm Flag = 1
Missed Detection Flag = 0
Normal Operation Flag = 0
Unavailable Flag = 0
**************************************************************
Figure 3-24.2. GPS RAIM integrity evaluation by using m-file program XRAIMFD.
3.25 Determination of thresholds used in RAIM/FDE evaluations
The program XFDNT determines the fault detection normalized thresholds for a specified
probability of false alarm and degree of freedom from 1 to 16, by using the method
presented in [ ]. For the first degree of freedom case a Gaussian distribution is considered,
while for higher degree of freedom cases a Chi-square distribution are assumed. For the
RAIM with constant false alarm thresholds [26], the unnormalized test statistic thresholds
can be determined as follows:
test statistic thresholds =(normalized thresholds)*(std. deviation of measurement error)
For example, by selecting 6.666667e-5 as probability of false alarm and xfdnt2.out as
output file, the following is displayed on the screen:
xfdnt
Enter the probability of false alarm
Do you want to use the default data 3.3333e-7? (y/n)[n] -->
Enter the false alarm tolerance --> 6.666667e-5
Enter the output desired (output file or on screen)
Do you want to display the results on screen? (y/n)[n] -->
Specify the output filename --> xfdnt2.out
Computation in progress for degree of freedom = 1
Computation in progress for degree of freedom = 2
Chapter 3 GPS Toolbox Examples
- Page 3-54 -
Computation in progress for degree of freedom = 3
Computation in progress for degree of freedom = 4
Computation in progress for degree of freedom = 5
Computation in progress for degree of freedom = 6
Computation in progress for degree of freedom = 7
Computation in progress for degree of freedom = 8
Computation in progress for degree of freedom = 9
Computation in progress for degree of freedom = 10
Computation in progress for degree of freedom = 11
Computation in progress for degree of freedom = 12
Computation in progress for degree of freedom = 13
Computation in progress for degree of freedom = 14
Computation in progress for degree of freedom = 15
Computation in progress for degree of freedom = 16
End of the program XFDNT

The output file xfdnt2.out contains the following information:


***************************************************************
*** COMPUTATION OF FAULT DETECTION NORMALIZED THRESHOLDS ***
*** for RAIM with constant false alarm ***
***************************************************************
***** Input data *****
Probability of false alarm = 6.666667e-005
***** Results by using XFDNT *****
Degree of freedom = 1 ==> Normalized threshold = 3.98792
Degree of freedom = 2 ==> Normalized threshold = 4.38539
Degree of freedom = 3 ==> Normalized threshold = 4.68560
Degree of freedom = 4 ==> Normalized threshold = 4.93879
Degree of freedom = 5 ==> Normalized threshold = 5.16259
Degree of freedom = 6 ==> Normalized threshold = 5.36564
Degree of freedom = 7 ==> Normalized threshold = 5.55301
Degree of freedom = 8 ==> Normalized threshold = 5.72792
Degree of freedom = 9 ==> Normalized threshold = 5.89265
Degree of freedom = 10 ==> Normalized threshold = 6.04884
Degree of freedom = 11 ==> Normalized threshold = 6.19770
Degree of freedom = 12 ==> Normalized threshold = 6.34020
Degree of freedom = 13 ==> Normalized threshold = 6.47710
Degree of freedom = 14 ==> Normalized threshold = 6.60904
Degree of freedom = 15 ==> Normalized threshold = 6.73654
Degree of freedom = 16 ==> Normalized threshold = 6.86000
***************************************************************
The file xfdnt1.out contains the results when the probability of false alarm is 3.3333e-7.
The program XPBIAS determines the value of parity bias threshold for the 5
measurements case (Gaussian distribution) and degree of freedom is 1, and for the 6 and
up to 14 measurements (Chi-square distribution) and degrees of freedom 2 to 10. As input
data the program requires the entry of the probability of missed detection (default value is
0.001) and the set of fault detection normalized thresholds for degrees of freedom 1 to 10
Chapter 3 GPS Toolbox Examples
- Page 3-55 -
(determined by the program XFDNT). The program implements the algorithm presented
in [26].
For example, by selecting the default values for the probability of false alarm and
probability of missed detection, i.e. 3.3333e-7 and 0.001, respectively, the following is
displayed on the screen:
xpbias
Enter the data for the precomputed threshold table td
Do you want to use the default data for pfa =3.3333e-7? (y/n) -->y
Enter value for the probability of missed detection (pmd)
Use the default data, pmd =0.001 ? (y/n) -->y
Enter the output desired (output file or on screen)
Do you want to display the results on screen? (y/n) -->y
***** For dof =1 *****
Use default for initial guess for pbiasb? (y/n) -->y
***** For dof =2 *****
Use default for initial guess for lambda? (y/n) -->y
***** For dof =3 *****
Use default for initial guess for lambda? (y/n) -->y
***** For dof =4 *****
Use default for initial guess for lambda? (y/n) -->y
***** For dof =5 *****
Use default for initial guess for lambda? (y/n) -->y
***** For dof =6 *****
Use default for initial guess for lambda? (y/n) -->y
***** For dof =7 *****
Use default for initial guess for lambda? (y/n) -->y
***** For dof =8 *****
Use default for initial guess for lambda? (y/n) -->y
***** For dof =9 *****
Use default for initial guess for lambda? (y/n) -->y
***** For dof =10 *****
Use default for initial guess for lambda? (y/n) -->y
****************************************************************
Chapter 3 GPS Toolbox Examples
- Page 3-56 -
*** COMPUTATION OF FAULT DETECTION PARITY BIAS THRESHOLDS ****
for RAIM with constant false alarm
***** Input data *****
When dof = 1 , td = 5.1038300
When dof = 2 , td = 5.4615200
When dof = 3 , td = 5.7385400
When dof = 4 , td = 5.9752200
When dof = 5 , td = 6.1862800
When dof = 6 , td = 6.3790000
When dof = 7 , td = 6.5577400
When dof = 8 , td = 6.7251400
When dof = 9 , td = 6.8835400
When dof =10 , td = 7.0338300
Probability of false alarm =3.333300e-007
Probability of missed detection =1.000000e-003
***** Results by using XPBIAS *****
When dof = 1 , Normalized pbiasb = 8.1940634
When dof = 2 , Normalized pbiasb = 8.4785881
When dof = 3 , Normalized pbiasb = 8.6876348
When dof = 4 , Normalized pbiasb = 8.8598829
When dof = 5 , Normalized pbiasb = 9.0092513
When dof = 6 , Normalized pbiasb = 9.1425071
When dof = 7 , Normalized pbiasb = 9.2636820
When dof = 8 , Normalized pbiasb = 9.3751593
When dof = 9 , Normalized pbiasb = 9.4790950
When dof =10 , Normalized pbiasb = 9.5761994
****************************************************************
End of the program XPBIAS

The files xpbias1.out and xpbias2.out contain the results when the probability of false
alarm is 3.3333e-7 and 6.66667e-5, respectively; the probability of missed detection is
selected as 0.001.
3.26 RAIM Fault detection availability determination
The program XRAIMDA determines RAIM fault detection availability for the case of all-
in-view satellites based on a constant false alarm rate algorithm [7], [27]. The user can
execute the program by using the default set of input data or by using a selected set of
input data. The program requires the following input data:
- name of the input almanac data file; the default is data file
svprime.dat. The input data file can be created as specified in 3.13.
- geographic locations for the test; the default is data file
mops24.dat. Each record contains the data related to a location
in the following order: latitude (degrees), longitude (degrees),
altitude (meters)
Chapter 3 GPS Toolbox Examples
- Page 3-57 -
- elevation mask angle limit in degrees; the default is 5. degrees
- GPS receiver type: Standard Position System (SPS) with SA on,
SPS without SA, or user's selected standard deviation of
measurement error, in meters
- phase-of-flight (Non-Precision Approach, Terminal, En-Route, Oceanic
and user defined HAL)
- probability of false alarm, probability of missed detection, and the
corresponding pbias thresholds; default values are provided
- initial simulation time (GPS time of week); the default value is 0.
- number of time steps; default value is 48 [1]
- time increment, in seconds; default value is 1800 [1]
- name of the statistics output file, the default is the screen
- name of the output file containing unavailable cases (optional)
- selection of the bar graph of visible satellites (optional)
- selection of the histogram plot of horizontal protection level (HPL)
repartition (optional)
- other parameters are initialized by default
It is worth mentioning that the fault detection thresholds are those determined by using
programs XFDNT and XPBIAS, and the files svprime.dat and mops.dat contain data
specified in [1], [2]. For example, by using the default input data set with the selections
for SPS with SA on, Non-Precision Approach, pfa =6.6667e-5 and pmd =0.001, and
saving the results in files xraimda1.out and xraimda2.out, the following is displayed on
screen:
xraimda
Enter almanac data file - the default is datafile svprime.dat
Do you want to use the default datafile? (y/n)[y]
Enter geographic location data - the default is the datafile mops24.dat
Do you want to use the default datafile? (y/n)[y]
Enter elevation mask angle limit - the default value is 5. degrees
Do you want to use the default value? (y/n)[y]
Enter GPS receiver type :
1 --> Standard Position System (SPS) with SA On
2 --> Standard Position System (SPS) with SA Off
3 --> User defined Std. Dev. of measurement errors
Make the selection --> 1
Select phase-of-flight:
1 --> Non-Precision Approach (NPA)
2 --> Terminal
3 --> En Route
4 --> Oceanic
5 --> User defined
Make the selection --> 1
Enter values for pfa, pmd and pbiasb:
1 --> For pfa =6.6667e-5 and pmd =0.001
2 --> For pfa =3.3333e-7 and pmd =0.001
3 --> Enter the user defined values
Make the selection --> 1
Enter initial simulation time (GPS time of week) - the default value is 0.
Do you want to use the default value? (y/n)[y]
Enter number of time samples - the default value is 48
Chapter 3 GPS Toolbox Examples
- Page 3-58 -
Do you want to use the default value? (y/n)[y]
Enter time increment value, in seconds - the default value is 1800
Do you want to use the default value? (y/n)[y]
Do you want to save the statistics? (y/n)[n] y
Specify the statistics output filename (with extension) -->xraimda1.out
Do you want to save the unavailable cases? (y/n)[n] y
Specify the RAIM unavailable output filename (with extension) -->xraimda2.out
***** Computation in progress for time sample = 1
***** Computation in progress for time sample = 2
***** Computation in progress for time sample = 3
***** Computation in progress for time sample = 4
***** Computation in progress for time sample = 5
***** Computation in progress for time sample = 6
***** Computation in progress for time sample = 7
***** Computation in progress for time sample = 8
***** Computation in progress for time sample = 9
***** Computation in progress for time sample = 10
***** Computation in progress for time sample = 11
***** Computation in progress for time sample = 12
***** Computation in progress for time sample = 13
***** Computation in progress for time sample = 14
***** Computation in progress for time sample = 15
***** Computation in progress for time sample = 16
***** Computation in progress for time sample = 17
***** Computation in progress for time sample = 18
***** Computation in progress for time sample = 19
***** Computation in progress for time sample = 20
***** Computation in progress for time sample = 21
***** Computation in progress for time sample = 22
***** Computation in progress for time sample = 23
***** Computation in progress for time sample = 24
***** Computation in progress for time sample = 25
***** Computation in progress for time sample = 26
***** Computation in progress for time sample = 27
***** Computation in progress for time sample = 28
***** Computation in progress for time sample = 29
***** Computation in progress for time sample = 30
***** Computation in progress for time sample = 31
***** Computation in progress for time sample = 32
***** Computation in progress for time sample = 33
***** Computation in progress for time sample = 34
***** Computation in progress for time sample = 35
***** Computation in progress for time sample = 36
***** Computation in progress for time sample = 37
***** Computation in progress for time sample = 38
***** Computation in progress for time sample = 39
***** Computation in progress for time sample = 40
***** Computation in progress for time sample = 41
***** Computation in progress for time sample = 42
***** Computation in progress for time sample = 43
***** Computation in progress for time sample = 44
***** Computation in progress for time sample = 45
Chapter 3 GPS Toolbox Examples
- Page 3-59 -
***** Computation in progress for time sample = 46
***** Computation in progress for time sample = 47
***** Computation in progress for time sample = 48
Bar plot - Number of cases versus Number of visible satellites
Do you want to execute the bar graph? (y/n)[y] n
Histogram plot - Number of cases versus Horizontal protection level
Do you want to execute the histogram plot? (y/n)[y]
End of the program XRAIMDA

The overall statistics see file xraimda1.out is presented in Figure 3-26.1 and the
horizontal protection level histogram for all available cases is shown in Figures 3-26.2
****************************************************************
RAIM FAULT DETECTION AVAILABILITY TEST SUMMARY
For Non-Precision Approach with All-In-View satellites:
- horizontal alarm limit (meters): 555.600
- GPS receiver mode: SPS with SA On
- almanac: svprime.dat
- number of satellites in constellation = 24
- number of locations: 24
- number of time samples: 48
- time increment (seconds): 1800
- std. dev. of pseudorange error (meters): 33.300
- elevation angle limit (degrees): 5.0000
- probability of false alarm: 6.6667000e-005
- probability of missed detection: 1.0000000e-003
- total space-time sample points: 1152
RAIM fault detection available = 1129, percentage: 98.00347
RAIM fault detection unavailable = 23, percentage: 1.99653
Repartition of RAIM fault detection available/unavailable cases:
- when < 5 visible satellites: 0 available, 0 unavailable
- when 5 visible satellites: 0 available, 3 unavailable
- when 6 visible satellites: 33 available, 10 unavailable
- when 7 visible satellites: 310 available, 10 unavailable
- when 8 visible satellites: 441 available, 0 unavailable
- when 9 visible satellites: 276 available, 0 unavailable
- when 10 visible satellites: 64 available, 0 unavailable
- when 11 visible satellites: 5 available, 0 unavailable
- when 12 visible satellites: 0 available, 0 unavailable
****************************************************************
SATELLITE VISIBILITY STATISICS
Number of cases with < 5 visible satellites = 0
Number of cases with 5 visible satellites = 3
Number of cases with 6 visible satellites = 43
Number of cases with 7 visible satellites = 320
Number of cases with 8 visible satellites = 441
Number of cases with 9 visible satellites = 276
Number of cases with 10 visible satellites = 64
Number of cases with 11 visible satellites = 5
Number of cases with 12 visible satellites = 0
Chapter 3 GPS Toolbox Examples
- Page 3-60 -
****************************************************************
Figure 3-26.1. Fault detection availability statistics summary
Figure 3-26.2. Horizontal protection level histogram of all available cases
Table 3-26 summarizes the RAIM fault detection availability results from the execution
of the program XRAIMDA with different input data for phase of flight, probability of
false alarm (pfa), probability of missed detection (pmd), and standard deviation of
measurement errors (see SA on with 33.3 meters and SA off with 6.5 meters). The
horizontal alarm level (HAL) for each phase of flight is 0.3, 1, 2 and 4 nautical miles for
the Non-Precision Approach, Terminal, En-Route and Oceanic, respectively [1], [2], [30].
0 50 100150200250300 350400450500550600650700
0
50
100
150
200
250
300
350
Horizontal protection level, in meters
N
u
m
b
e
r

o
f

c
a
s
e
s
Non-Precision Approach phase of flight - Horizontal protection level histogram of available cases
min =98.0217, max =540.9906, mean =235.1782 meters
Chapter 3 GPS Toolbox Examples
- Page 3-61 -
Table 3-26. RAIM Fault detection availability
pfa =6.6667e-5, pmd =0.001 pfa =3.3333e-7, pmd =0.001
Phase of flight
SA On
(st. dev. =33.3 m)
SA Off
(st. dev. = 6.5 m)
SA On
(st. dev. =33.3 m)
SA Off
(st. dev. =6.5 m)
Non-Precision
Approach
98.003 99.913 97.135 99.913
Terminal 99.913 99.913 99.826 99.913
En-Route 99.913 100.000 99.913 100.000
Oceanic 99.913 100.000 99.913 100.000
3.27 RAIM Fault exclusion availability determination
The program XRAIMEA determines RAIM fault exclusion availability for the case of all-
in-view satellites based on a constant false alarm rate algorithm [7], [27]. The user can
execute the program by using the default set of input data or by using a selected set of
input data. The program requires the following input data:
- name of the input almanac data file; the default is data file
svprime.dat.
- geographic locations for the test; the default is data file mops24.
dat. Each record contains the data related to a location in the
following order: latitude (degrees), longitude (degrees), altitude
(meters)
- elevation mask angle limit in degrees; the default is 5. degrees
- GPS receiver type: Standard Position System (SPS) with SA on,
SPS without SA, or user's selected standard deviation of
measurement error, in meters
- phase-of-flight (Non-Precision Approach, Terminal, En-Route, Oceanic
and user defined HAL)
- probability of false alarm, probability of missed detection,
and the corresponding pbias thresholds; default values are provided
- initial simulation time (GPS time of week); the default value is 0.
- number of time steps; default value is 48 [1]
- time increment, in seconds; default value is 1800 [1]
- name of the statistics output file, the default is the screen
- name of the output file containing unavailable cases (optional)
- selection of the bar graph of visible satellites (optional)
- selection of the histogram plot of horizontal exclusion level (HEL)
repartition (optional)
- other parameters are initialized by default
Again, it is worth mentioning that the fault detection thresholds are those determined by
using programs XFDNT and XPBIAS, and the files svprime.dat and mops.dat contain
data specified in [1], [2]. For example, by using the default input data set with the
selections for SPS with SA on, Non-Precision Approach, pfa =6.6667e-5 and pmd =
0.001, and saving the results in files xraimea1.out and xraimea2.out, the following is
displayed on screen:
Chapter 3 GPS Toolbox Examples
- Page 3-62 -
xraimea
Enter almanac data file - the default is datafile svprime.dat
Do you want to use the default datafile? (y/n)[y]
Enter geographic location data - the default is the datafile mops24.dat
Do you want to use the default datafile? (y/n)[y]
Enter elevation mask angle limit - the default value is 5. degrees
Do you want to use the default value? (y/n)[y]
Enter GPS receiver type :
1 --> Standard Position System (SPS) with SA On
2 --> Standard Position System (SPS) with SA Off
3 --> User defined Std. Dev. of measurement errors
Make the selection --> 1
Select phase-of-flight:
1 --> Non-Precision Approach (NPA)
2 --> Terminal
3 --> En Route
4 --> Oceanic
5 --> User defined
Make the selection --> 1
Enter values for pfa, pmd and pbiasb:
1 --> For pfa =6.6667e-5 and pmd =0.001
2 --> For pfa =3.3333e-7 and pmd =0.001
3 --> Enter the user defined values
Make the selection --> 1
Enter initial simulation time (GPS time of week) - the default value is 0.
Do you want to use the default value? (y/n)[y]
Enter number of time samples - the default value is 48
Do you want to use the default value? (y/n)[y]
Enter time increment value, in seconds - the default value is 1800
Do you want to use the default value? (y/n)[y]
Do you want to save the statistics? (y/n)[n] y
Specify the statistics output filename (with extension) -->xraimea1.out
Do you want to save the unavailable cases? (y/n)[n] y
Specify the RAIM unavailable output filename (with extension) -->xraimea2.out
***** Computation in progress for time sample = 1
***** Computation in progress for time sample = 2
***** Computation in progress for time sample = 3
***** Computation in progress for time sample = 4
***** Computation in progress for time sample = 5
***** Computation in progress for time sample = 6
***** Computation in progress for time sample = 7
***** Computation in progress for time sample = 8
Chapter 3 GPS Toolbox Examples
- Page 3-63 -
***** Computation in progress for time sample = 9
***** Computation in progress for time sample = 10
***** Computation in progress for time sample = 11
***** Computation in progress for time sample = 12
***** Computation in progress for time sample = 13
***** Computation in progress for time sample = 14
***** Computation in progress for time sample = 15
***** Computation in progress for time sample = 16
***** Computation in progress for time sample = 17
***** Computation in progress for time sample = 18
***** Computation in progress for time sample = 19
***** Computation in progress for time sample = 20
***** Computation in progress for time sample = 21
***** Computation in progress for time sample = 22
***** Computation in progress for time sample = 23
***** Computation in progress for time sample = 24
***** Computation in progress for time sample = 25
***** Computation in progress for time sample = 26
***** Computation in progress for time sample = 27
***** Computation in progress for time sample = 28
***** Computation in progress for time sample = 29
***** Computation in progress for time sample = 30
***** Computation in progress for time sample = 31
***** Computation in progress for time sample = 32
***** Computation in progress for time sample = 33
***** Computation in progress for time sample = 34
***** Computation in progress for time sample = 35
***** Computation in progress for time sample = 36
***** Computation in progress for time sample = 37
***** Computation in progress for time sample = 38
***** Computation in progress for time sample = 39
***** Computation in progress for time sample = 40
***** Computation in progress for time sample = 41
***** Computation in progress for time sample = 42
***** Computation in progress for time sample = 43
***** Computation in progress for time sample = 44
***** Computation in progress for time sample = 45
***** Computation in progress for time sample = 46
***** Computation in progress for time sample = 47
***** Computation in progress for time sample = 48
Bar plot - Number of cases versus Number of visible satellites
Do you want to execute the bar graph? (y/n)[y] n
Histogram plot - Number of cases versus Horizontal exclusion level
Do you want to execute the histogram plot? (y/n)[y]
End of the program XRAIMEA

The overall statistics see file xraimda1.out is presented in Figure 3-27.1 and the
horizontal protection level histogram for all available cases is shown in Figures 3-27.2
****************************************************************
RAIM FAULT EXCLUSION AVAILABILITY TEST SUMMARY
Chapter 3 GPS Toolbox Examples
- Page 3-64 -
For Non-Precision Approach with All-In-View satellites:
- horizontal alarm limit (HAL) (meters): 555.600
- GPS receiver mode: SPS with SA On
- almanac: svprime.dat
- number of satellites in constellation = 24
- number of locations: 24
- number of time samples: 48
- time increment (seconds): 1800
- std. dev. of pseudorange error (meters): 33.300
- elevation mask angle limit (degrees): 5.0000
- probability of false alarm: 6.6667000e-005
- probability of missed detection: 1.0000000e-003
- total space-time sample points: 1152
RAIM fault exclusion available = 716, percentage: 62.15278
RAIM fault exclusion unavailable = 436, percentage: 37.84722
Repartition of RAIM fault exclusion available/unavailable cases:
- when < 5 visible satellites: 0 available, 0 unavailable
- when 5 visible satellites: 0 available, 3 unavailable
- when 6 visible satellites: 0 available, 43 unavailable
- when 7 visible satellites: 52 available, 268 unavailable
- when 8 visible satellites: 326 available, 115 unavailable
- when 9 visible satellites: 269 available, 7 unavailable
- when 10 visible satellites: 64 available, 0 unavailable
- when 11 visible satellites: 5 available, 0 unavailable
- when 12 visible satellites: 0 available, 0 unavailable
****************************************************************
SATELLITE VISIBILITY STATISICS
Number of cases with < 5 visible satellites = 0
Number of cases with 5 visible satellites = 3
Number of cases with 6 visible satellites = 43
Number of cases with 7 visible satellites = 320
Number of cases with 8 visible satellites = 441
Number of cases with 9 visible satellites = 276
Number of cases with 10 visible satellites = 64
Number of cases with 11 visible satellites = 5
Number of cases with 12 visible satellites = 0
Figure 3-27.1. Fault exclusion availability statistics summary
Table 3-27 summarizes the RAIM fault exclusion availability results from the execution
of the program XRAIMEA with different input data for phase of flight, probability of
false alarm (pfa), probability of missed detection (pmd), and standard deviation of
measurement errors (see SA on with 33.3 meters and SA off with 6.5 meters). As
expected note that the fault exclusion availability is lower than the fault detection
availability by comparing the results from Tables 3-26.1 and 3-27.1.
60
80
100
120
140
160
N
u
m
b
e
r

o
f

c
a
s
e
s
Non-Precision Approach phase of flight - Horizontal exclusion level histogram of available cases
min =159.6839, max =555.1524, mean =370.9029 meters
Chapter 3 GPS Toolbox Examples
- Page 3-65 -
Figure 3-27.2. Horizontal exclusion level histogram of all available cases
Table 3-27 RAIM Fault exclusion availability
pfa =6.6667e-5, pmd =0.001 pfa =3.3333e-7, pmd =0.001
Phase of flight
SA On
(st. dev. =33.3 m)
SA Off
(st. dev. =6.5 m)
SA On
(st. dev. =33.3 m)
SA Off
(st. dev. =6.5 m)
Non-Precision
Approach
62.153 96.788 51.823 96.528
Terminal 95.139 98.785 94.097 98.611
En-Route 97.483 99.219 97.222 99.132
Oceanic 98.611 99.392 98.524 99.306
3.28 GPS error budget determination
The program XEBUDGET determines GPS error budget for a specified input data set.
The user should enter from keyboard the following input data: (1) space segment error,
(2) control segment error, (3) user segment, tropo error, (4) user segment, iono error, (5)
user segment, multipath error, (6) user segment, receiver error, (7) PDOP value, (8)
HDOP value, (9) VDOP value, (10) TDOP value.
For example, by using the default data the following is displayed on screen:
xebudget
Do you want to use the default data set? (y/n)[y] -->
Enter the output desired (output file or on screen)
Do you want to display the results on screen? (y/n)[y] -->
Chapter 3 GPS Toolbox Examples
- Page 3-66 -
****************************************************************************
***** COMPUTATION OF ERROR BUDGET *****
****************************************************************************
***** Input data ******
Space space segment error (meters, 1-sigma) = 1.900
Space control segment error (meters, 1-sigma) = 3.500
User segmnent, tropo error (meters, 1-sigma) = 2.000
User segmnent, iono error (meters, 1-sigma) = 5.000
User segmnent, multipath error (meters, 1-sigma) = 1.400
User segmnent, receiver error (meters, 1-sigma) = 3.000
PDOP = 2.1800
HDOP = 1.3600
VDOP = 1.7000
TDOP = 0.9500
***** Results by using XEBUDGET ******
URE (User Range Error), in meters = 3.9825
UEE (User Equipment Error), in meters = 6.3214
UERE (User Equivalent Range Error), in meters = 7.4713
SEP (Spherical Error Probable), 3-D 50 percentage, in meters = 14.4648
CEP (Circular Error Probable, 2-D 50 percentage, in meters = 8.4590
LEP (Linear Error Probable), Vertical 50 percentage, in meters = 8.5669
Time Error (50 percentage), in nanoseconds = 15.798
3-D (Spherical) Position Error (95 percentage), in meters = 26.288
2-D (Horizontal) Position Error (95 percentage), in meters = 20.322
Actual 2-D (Horizontal) Position Error (95 percentage), in meters = 17.587
Vertical Position Error (95 percentage), in meters = 25.402
Actual Vertical Position Error (95 percentage), in meters = 25.296
Time Error (95 percentage), in nanoseconds = 46.845
Actual Time Error (95 percentage), in nanoseconds = 46.648
****************************************************************************
End of the program XEBUDGET

Chapter 4 CEP, CHI2_DOF, CONVCON


- Page 4-1 -
4.0 DETAILED SPECIFICATIONS FOR M-FILE MODULES
4.01 CEP.M
Scope:
This MATLAB module computes the value of the circular error probable (CEP).
Usage: xycep =cep(x,y)
Description of parameters:
x - input, error vector containing the errors on x axis
y - input, error vector containing the errors on y axis
xycep - output, CEP value
Remark:
The components of the input vectors and the output CEP value should have the same unit.
4.02 CHI2_DOF.M
Scope:
This MATLAB macro computes the probability density function of the chi-square
distribution with dof degrees of freedom.
Usage: xoutput =chi2_dof(x,y)
Description of parameters:
X - input, scalar independent variable
do - input, scalar, degree of freedom (dof), global variable
xoutpu - output, computed probability density function
Remark:
The computed function is equivalent to the state derivative of the chi-square distribution
with dof degrees of freedom.
4.03 CONVCON.M
Scope:
This MATLAB module sets the most used conversion constants as global variables.
Usage: convcon
Description of global parameters:
sem_rad - output, conversion factor from semicircles to radians
rad_sem - output, conversion factor from radians to semicircles
Chapter 4 DHMAX
- Page 4-2 -
deg_rad - output, conversion factor from degrees to radians
rad_deg - output, conversion factor from radians to degrees
deg_mrad - output, conversion factor from degrees to milliradians
mrad_deg - output, conversion factor from milliradians to degrees
ussf_m - output, conversion factor from US survey foot to meter
m_ussf - output, conversion factor from meter to US survey feet
if_m - output, conversion factor from international foot to meters
m_if - output, conversion factor from meter to international feet
nmile_m - output, conversion factor from international nautical mile to meters
m_nmile - output, conversion factor from meter to international nautical miles
smile_m - output, conversion factor from international statute mile to meters
m_smile - output, conversion factor from meter to international statute miles
smile_if - output, conversion factor from international statute mile to international
feet
if_smile - output, conversion factor from international foot to international statute
miles
Remarks:
Some useful SI prefixes and values:
kilo =10^3, mega =10^6, giga =10^9, tera =10^12, peta =10^15, exa =10^18,
milli =10^(-3), micro =10^(-6), nano =10^(-9), pico =10^(-12), femto =10^(-15),
atto =10^(-18).
4.04 DHMAX.M
Scope:
This MATLAB macro determines delta_h_max used in the Receiver Autonomous
Integrity Monitoring (RAIM) computation [27]. It is assumed that at least five line-of-
sight unit vectors are specified as input.
Usage: xoutput =dhmax(g)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it
should be 3 columns)
xoutput - output, delta_h_max
Remark:
The connection between ARP (Approximate Radial-error Protected) and delta_h_max is
as follows
ARP =sqrt(n-4) * delta_h_max * threshold
where n is the number of measurements used, and threshold is the pre-computed
normalized detection threshold [7].
References: [7], [27]
Chapter 4 DOP1, DOP2, ELEVA
- Page 4-3 -
4.05 DOP1.M
Scope:
This MATLAB module computes dilution of precision (DOP) quantities when at least
three line-of-sight (LOS) unit vectors are specified, by using a direct method.
Usage: dops =dop1(g)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it should
be 3 columns)
dops - output, dilution of precision quantities
dops(1) =geometric dilution of precision (GDOP)
dops(2) =position dilution of precision (PDOP)
dops(3) =horizontal dilution of precision (HDOP)
dops(4) =vertical dilution of precision (VDOP)
dops(5) =time dilution of precision (TDOP)
Remark:
When less than four line-of-sight unit vectors are specified the computation is not fully
significant, and it is conducted by using a pseudoinverse matrix instead of an inverse
matrix.
4.06 DOP2.M
Scope:
This MATLAB module computes dilution of precision (DOP) quantities when four line-
of-sight unit vectors are specified, by using a direct method.
Usage: dops =dop2(g)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it should
be 3 columns)
dops - output, dilution of precision quantities
dops(1) =geometric dilution of precision (GDOP)
dops(2) =position dilution of precision (PDOP)
dops(3) =horizontal dilution of precision (HDOP)
dops(4) =vertical dilution of precision (VDOP)
dops(5) =time dilution of precision (TDOP)
4.07 ELEVA.M
Scope:
Chapter 4 ELEVAR, E;EVAZ
- Page 4-4 -
This MATLAB module computes the elevation angle and the unit line-of-sight vector,
when the ECEF user and satellite positions are known; WGS-84 constants are used.
Usage: [eangle,ulos] =eleva(user,sv)
Description of parameters:
user - input, ECEF user position vector
sv - input, ECEF satellite position vector
eangle - output, elevation angle in radians
ulos - output, unit line-of-sight vector
Remark:
The components of the input vectors should have the same unit, e.g. meter, foot.
External Matlab modules used: uverv, wgs84con
4.08 ELEVAR.M
Scope:
This MATLAB module computes the elevation angle, the unit line-of-sight vector and the
range, when the ECEF user and satellite positions are known; WGS-84 constants are
used.
Usage: [eangle,ulos,range] =elevar(user,sv)
Description of parameters:
user - input, ECEF user position vector
sv - input, ECEF satellite position vector
eangle - output, elevation angle in radians
ulos - output, unit line-of-sight vector
range - output, range from user to satellite
Remark:
The components of the input vectors and the range should have the same units, e.g. meter,
foot.
External Matlab modules used: uverv, wgs84con.
4.09 ELEVAZ.M
Scope:
This MATLAB module computes the elevation angle, the azimuth angle, the unit line-of-
sight vector and the range, when the ECEF user and satellite positions are known; WGS-
84 constants are used.
Chapter 4 ELIMCOL, ELIMROW, FDNT
- Page 4-5 -
Usage: [eangle,az,ulos,range] =elevaz(user,sv)
Description of parameters:
user - input, ECEF user position vector
sv - input, ECEF satellite position vector
eangle - output, elevation angle in radians
az - output, azimuth angle in radians
ulos - output, unit line-of-sight
range - output, range from user to satellite
Remark:
The components of the input vectors and the range should have the same unit, e.g. meter,
foot.
External Matlab modules used: tecefgd, vecefenu, wgs84con.
4.10 ELIMCOL.M
Scope:
This MATLAB module eliminates a specified column from a two-dimensional matrix.
Usage: y =elimcol(x,k)
Description of parameters:
x - input, initial two-dimensional matrix
k - input, index of the column to be eliminated from the input matrix x
y - output, resultant matrix
4.11 ELIMROW.M
Scope:
This MATLAB module eliminates a specified row from a two-dimensional matrix.
Usage: y =elimrow(x,k)
Description of parameters:
x - input, initial two-dimensional matrix
k - input, index of the row to be eliminated from the input matrix x
y - output, resultant matrix
4.12 FDNT
Scope:
This MATLAB macro determines a fault detection normalized threshold used in the
Chapter 4 FOM, FPBIAS_C
- Page 4-6 -
Receiver Autonomous Integrity Monitoring (RAIM) computation, for specified false
alarm and degree of freedom.
Usage: xoutput =fdnt(fa_tol)
Description of parameters:
dof - input, degrees-of-freedom for chi-square distribution, in this case is the
number of satellites available - 4, global variable
fa_tol - input, false alarm tolerance
xoutput - output, fault detection normalized threshold
Remark:
When the degree of freedom is 1 a Gaussian distribution is used, otherwise a chi-square
distribution is assumed.
References: [7], [27]
External Matlab modules used: chi2_dof, gauss_1
4.13 FOM
Scope:
This MATLAB macro sets the figure of merit value based on ICD-059 table.
Usage: xfom =fom(epe)
Description of parameters:
epe - input, estimated position error, in meters
xfom - output, figure of merit value
Remark:
If an incorrect negative value is entered, i.e. epe <0, than the figure of merit is set as -1.
4.14 FPBIAS_C
Scope:
This MATLAB macro computes the value of a function used to determine the parity bias
(pbiasb) for the (dof+4) satellite case with Chi-square distribution [26], when the degree-
of-freedom (dof) is between 2 and 10.
Usage: xoutput =fpbias_c(x)
Description of parameters:
x - input, scalar independent variable (lambda)
a - input, global constant, normalized Chi-square threshold, (dof dependent)
Chapter 4 FPBIAS_G, GAUSS_1
- Page 4-7 -
dof - input, global constant, degree of freedom (2 <=dof <=8)
pmd - input, global constant, probability of missed detection
xoutput - output, computed value of the function; when x =pbiasb then the value of
the residual is 0.
Remark:
The value of a (normalized Chi-square threshold) is dof dependent and can be a priori
determined by using the program xfdnt.
Reference: [26]
External Matlab macros used: ncchi2_2.m, ncchi2_3.m, ncchi2_4.m, ncchi2_5.m,
ncchi2_6.m, ncchi2_7.m, ncchi2_8.m, ncchi2_9.m, ncchi2_10.m
4.15 FPBIAS_G
Scope:
This MATLAB macro computes the value of a function used to determine the parity bias
(pbiasb) for the 5 satellite case with Gaussian distribution [26].
Usage: xoutput =fpbias_g(x)
Description of parameters:
x - input, scalar independent variable
pmd - input, global constant, probability of missed detection
td - input, global constant, normalized threshold
xoutput - output, computed value of the function; when x =pbiasb then the value of
the expression is 0.
Remark:
The value of td (fault detection normalized threshold) can be a priori determined by using
the program XFDNT.
Reference: [26]
4.16 GAUSS_1
Scope:
This MATLAB macro computes the probability density function of the normal Gaussian
distribution.
Usage: xoutput =gauss_1(x,y)
Chapter 4 GCNAV, GDOPV
- Page 4-8 -
Description of parameters:
x - input, scalar independent variable
y - input, scalar dependent variable
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.17 GCNAV
Scope:
This MATLAB macro computes the great circle navigation position, velocity, and
acceleration when the ECEF initial position and velocity are specified; WGS-84 constants
are used.
Usage: [pgcm,vgcm,agcm] =gcnav(p0,v0,deltat,nsteps)
Description of parameters:
p0 - input, ECEF position vector, the components are in meters
v0 - input, ECEF velocity vector, the components are in \meters/second
deltat - input, time step, in seconds
nsteps - input, number of step desired
pgcm - output, ECEF great circle position, the components are in meters;
pgcm(k,:) is the k-th time step value
vgcm - output, great circle velocity, the components are in meters/second;
vgcm(k,:) is the k-th time step value
agcm - output, great circle acceleration, the components are in meters/second^2;
agcm(k,:) is the k-th time step value
External Matlab macros used: uverv, wgs84con
4.18 GDOPV
Scope:
This MATLAB module computes an approximate value of the geometric dilution of
precision (GDOP) when at least four line-of-sight unit vectors are specified, by using an
approximate geometric method [18].
Usage: x =gdopv(g)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it should
be 3 columns)
x - output, approximate value of the geometric dilution of precision
Reference: [18]
Chapter 4 GENRN, GEODES, GEOIDH
- Page 4-9 -
4.19 GENRN
Scope:
This MATLAB macro generates random numbers with normal (Gaussian) distribution,
with mean and standard deviation specified.
Usage: x =genrn(n,xmean,xstd,iseed) when the seed is reset to iseed
x =genrn(n,xmean,xstd)
Description of parameters:
n - input, number of random numbers to be generated
xmean - input, specified mean
xstd - input, specified standard deviation
iseed - input, initial value of the seed (optional); if it is specified the seed is reset to
iseed value
x - output, random numbers with specified mean and standard deviation, vector
with n elements
4.20 GEODES
Scope:
This MATLAB macro computes geodetic data for a specified departure-destination pair;
WGS-84 earth model is considered.
Usage: [range,bearing1,bearing2] =geodes(lat1,lon1,lat2,lon2)
Description of parameters:
lat1 - input, departure point latitude, in degrees
lon1 - input, departure point longitude, in degrees
lat2 - input, departure point latitude, in degrees
lon2 - input, departure point longitude, in degrees
range - output, range, in meters
bearing1 - output, departure bearing, in degrees
bearing2 - output, destination bearing, in degrees
Remark:
The macros wgs84con and convcon should be called before using the macro geodes in
order to initialized the global variables used.
Reference: [1]
4.21 GEOIDH
Scope:
Chapter 4 GMP1, GMP2
- Page 4-10 -
This MATLAB macro computes the WGS-84 geoid height correction for the current
location specified by latitude and longitude.
Usage: xoutput =geoidh(lat,lon,tgeoid)
Description of parameters:
lat - input, latitude in radians, - pi/2 to pi/2
lon - input, longitude in radians, 0 to 2*pi (automatically adjustable -2*pi to 4*pi)
tgeoid - input, geoid heights table (in meters) for a 19 by 36 Latitude/Longitude grid;
the latitudes go northward from -90 to 90 degrees, and longitudes go eastward
from 0 to 350 degrees
xoutput - output, geoid height correction in meters
Reference: [31]
4.22 GMP1
Scope:
This MATLAB module generates first order Gauss-Markov sequence.
Usage: x =gmp1(nstep,beta,sigx,deltat,iseed)
x =gmp1(nstep,beta,sigx,deltat) when the seed is not reset
Description of parameters:
nstep - input, number of steps of the Gauss-Markov process
beta - input, parameter of the Gauss-Markov process, 1/beta is the correlation time
in seconds
sigx - input, standard deviation of the Gauss-Markov process x
deltat - input, time step in seconds
iseed - input, initial value of the seed (optional); if it is specified the seed is reset to
iseed value
x - output, computed value of the Gauss-Markov process x, vector with nstep
elements
External Matlab modules used: genrn
4.23 GMP2
Scope:
This MATLAB module generates second order Gauss-Markov sequence.
Usage: [xp,xv] =gmp2(nstep,w0,beta,csq,deltat,iseed)
[xp,xv] =gmp2(nstep,w0,beta,csq,deltat) when the seed is not reset
Chapter 4 GPSCON, GPSLSEC
- Page 4-11 -
Description of parameters:
nstep - input, number of steps of the Gauss-Markov process
w0 - input, natural frequency in radians/second
beta - input, damping factor which is less than 1.
csq - input, constant c**2 in meters**2
deltat - input, time step in seconds
iseed - input, initial value of the seed (optional); if it is specified the seed is reset to
iseed value
xp - output, computed value of the second order Gauss-Markov process - first
state component xp, vector with nstep elements
xv - output, computed value of the second order Gauss-Markov process - second
state component xv, vector with nstep elements
External Matlab modules used: genrn
4.24 GPSCON
Scope:
This MATLAB module sets the most used GPS constants as global variables.
Usage: gpscon
Description of global parameters:
f0 - output, fundamental frequency, in Mhz
fL1 - output, L1 frequency, in MHz (154*f0)
fL2 - output, L2 frequency, in MHz (120*f0)
lambdaL1 - output, L1 carrier wavelength, in meters
lambdaL2 - output, L2 carrier wavelength, in meters
fca_code - output, coarse/acquisition code (bit rate in Hz)
fp_code - output, precision code (bit rate in Hz)
fL1pL2 - output, L1 +L2 frequency, in Mhz (274*f0)
fL1mL2 - output, L1 - L2 frequency, in Mhz (34*f0)
lambdaL1pL2 - output, L1 +L2 wavelength, in meters
lambdaL1mL2 - output, L1 - L2 wavelength, in meters
secpmin - output, number of seconds per minute
secph - output, number of seconds per hour
secpday - output, number of seconds per day
secpweek - output, number of seconds per week
secphday - output, number of seconds per half day
secphweek - output, number of seconds per half week
4.25 GPSLSEC
Scope:
Chapter 4 GRIDWAAS, HMAT, HMATB
- Page 4-12 -
This MATLAB macros determines the UTC leap seconds value for a specified year
between 1980 and 2059; after the year 1999 the leap second value is only an estimate.
Usage: xoutput =gpslsec(year)
Description of parameters:
year - input, year (between 1980 and 2059)
xoutput - output, UTC leap seconds value the result is set to -1 for out of range inputs
4.26 GRIDWAAS
Scope:
This MATLAB macro generates latitude-longitude WAAS grid specified in [30].
Usage: [lat,lon] =gridwaas
Description of parameters:
lat - output, latitude in degrees (for 2353 points)
lon - output, longitude in degrees (for 2353 points)
Reference: [30]
4.27 HMAT
Scope:
This MATLAB macro constructs the H matrix (based on line-of-sight measurements),
when the user's position and the position of satellites are known.
Usage: [houtput,ier] =hmat(svpos,upos)
Description of parameters:
svpos - input, four ECEF satellite positions, each row contains the three component
for a satellite, all components are in meters
upos - input/output, ECEF user's position, the components are in meters
houtput - output, H matrix (based on line-of-sight measurement)
ier - output, index of error
=0 no error
=1 error, see the measurement dimensions
Remark:
At least 4 measurements are required for the construction of H matrix.
4.28 HMATB
Scope:
Chapter 4 HMATBC, HMATC
- Page 4-13 -
This MATLAB macro constructs the H matrix (based on line-of-sight and baro
measurements), when the user's position, the satellites position and baro are known.
Usage: [houtput,ier] =hmatb(svpos,upos)
Description of parameters:
svpos - input, four ECEF satellite positions, each row contains the three component
for a satellite, all components are in meters
upos - input/output, ECEF user's position, the components are in meters
houtput - output, H matrix (based on line-of-sight and baro measurements)
ier - output, index of error
=0 no error
=1 error, see the measurement dimensions
Remark:
At least 4 measurements are required for the construction of H matrix.
4.29 HMATBC
Scope:
This MATLAB macro constructs the H matrix (based on line-of-sight, baro and clock
measurements), when the user's position, the satellites position, baro and clock are
known.
Usage: [houtput,ier] =hmatbc(svpos,upos)
Description of parameters:
svpos - input, four ECEF satellite positions, each row contains the three component
for a satellite, all components are in meters
upos - input/output, ECEF user's position, the components are in meters
houtput - output, H matrix (based on line-of-sights, baro and clock measurements)
ier - output, index of error
=0 no error
=1 error, see the measurement dimensions
Remark:
At least 4 measurements are required for the construction of H matrix.
4.30 HMATC
Scope:
This MATLAB macro constructs the H matrix (based on line-of-sight and clock
measurements), when the user's position, the satellites position and clock are known.
Usage: [houtput,ier] =hmatc(svpos,upos)
Chapter 4 HPE, IONOC
- Page 4-14 -
Description of parameters:
svpos - input, four ECEF satellite positions, each row contains the three component
for a satellite, all components are in meters
upos - input/output, ECEF user's position, the components are in meters
houtput - output, H matrix (based on line-of-sight and clock measurements)
ier - output, index of error
=0 no error
=1 error, see the measurement dimensions
Remark:
At least 4 measurements are required for the construction of H matrix.
4.31 HPE
Scope:
This MATLAB module computes the horizontal position error when latitude and
longitude for two points are given; WGS-84 constants are used.
Usage: x =hpe(lat1,lon1,lat2,lon2)
Description of parameters:
lat1 - input, latitude of the first position point, in radians
lon1 - input, longitude of the first position point, in radians
lat2 - input, latitude of the second position point, in radians
lon2 - input, longitude of the second position point, in radians
x - output, horizontal position error between the two defined position points, in
meters
Remarks:
1) The macro wgs84con should be called before using the macro hpe in order to initialize
the global variables used.
2) The computation accuracy is limited due to algorithm approximations; it is
recommended to be used when the range is less than 100 km.
External Matlab macros used: wgs84con
4.32 IONOC
Scope:
This MATLAB macro computes L1 iono correction for a specified user by using the
Klobuchar model; WGS-84 constants are used.
Usage: ionocorr =ionoc(lat,lon,el,az,tgps,alpha,beta)
Chapter 4 IONOC, KFCOV
- Page 4-15 -
Description of parameters:
lat - input, user's geodetic latitude, in radians
lon - input, user's geodetic longitude, in radians
el - input, user's elevation angle, in radians
az - input, user's azimuth angle, in radians
tgps - input, GPS system time, in seconds
alpha - input, coefficients of cubic fit to the amplitude of vertical delay (array with
4 elements)
beta - input, coefficients of cubic fit to the period of model (array with 4 elements)
ionocorr - output, L1 iono correction, in meters
Remark:
L2 iono correction can be determined as follows:
L2 Iono correction =(L1 iono correction) * ((77/60)^2)
References: [25], [29]
External Matlab macros used: wgs84con
4.33 IONOCON
Scope:
This MATLAB macro sets the Klobuchar model iono constants.
Usage: ionocon
Description of parameters:
alpha - output, array with 4 components storing the Klobuchar model alpha
constants
beta - output, array with 4 components storing the Klobuchar model beta constants
Remark:
1) The constants are taken from satellite 26, subframe 4, page 18, date 5/20/1994.
2) The indexes of the arrays alpha and beta are greater than the indexes defined by
Klobuchar model by 1 (because Matlab does not allow a zero index).
4.34 KFCOV
Scope:
This MATLAB macro generates Kalman filter covariance matrix when the parameters are
constants; conventional formulation is implemented. This computation is useful for
covariance analysis.
Usage: [pafter,pbefore] =kfcov(nstep,n,m,phi,q,h,r,pinit)
Chapter 4 KFCOVA
- Page 4-16 -
Description of parameters:
nstep - input, number of steps to be executed
n - input, state vector dimension
m - input, measurement dimension
phi - input, transition matrix, n by n
q - input, process noise matrix, n by n
h - input, measurement matrix, m by n, where m is the number of measurements
r - input, measurement noise matrix, m by m
pinit - input, initial value of the covariance matrix, symmetric n by n matrix
pafter - output, final value of the covariance matrix after measurement incorporation
(current time cycle)
pbefore - output, final value of the covariance matrix after time propagation and
before measurement incorporation (next time cycle)
Remark:
1) For covariance analysis the matrix pafter should be saved at each step.
2) When parameters are time-dependent then this module should be called for one step
only (nstep =1) with new time dependent values at each call.
4.35 KFCOVA
Scope:
This MATLAB macro generates Kalman filter covariance matrix when the parameters are
constants; alternate conventional formulation is implemented. This computation is useful
for covariance analysis.
Usage: [pafter,pbefore] =kfcova(nstep,n,m,phi,q,h,r,pinitinv)
Description of parameters:
nstep - input, number of steps to be executed
n - input, state vector dimension
m - input, measurement dimension
phi - input, transition matrix, n by n
q - input, process noise matrix, n by n
h - input, measurement matrix, m by n
r - input, measurement noise matrix, m by m
pinvinit - input, initial value of the inverse of the covariance matrix, symmetric,
n by n matrix
pafter - output, final value of the covariance matrix after measurement incorporation
(current time cycle)
pinvbef - output, final value of the covariance matrix after time propagation and
before measurement incorporation (next time cycle)
Remark:
1) For covariance analysis the matrix pafter should be saved at each step.
2) When parameters are time-dependent then this module should be called for one step
Chapter 4 MBLLW, MCUD
- Page 4-17 -
only (nstep =1) with new time dependent values at each call.
4.36 MBLLW
Scope:
This MATLAB module constructs the transformation matrix from GPS body frame to
LLWA (Local Level Wander Azimuth) frame.
Usage: moutput =mbllw(yaw,pitch,roll)
Description of parameters:
yaw - input, yaw angle in radians
pitch - input, pitch angle in radians
roll - input, roll angle in radians
moutput - output, two-dimensional real array containing the transformation matrix
from GPS body frame to LLWA frame
Remark:
The coordinate axes for wander azimuth local level frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.37 MCUD
Scope:
This MATLAB module computes the real symmetric matrix P =U*D*U**(Transpose),
when its U-D factors are given, where U is a real unit upper triangular matrix and D is a
real diagonal matrix. Only the upper triangular part (columnwise) of the pair U-D and
matrix P are stored.
Usage: p =mcud(n,ud)
ud =mcud(n,ud) , when the input matrix ud is destroyed
Description of parameters:
n - input, real scalar, number of rows and columns in matrices U , D and P
ud - input, real array of length n*(n+1)/2, storing the upper triangular part of the
pair U-D ; the elements of the diagonal matrix D are stored on diagonal
locations of the unit upper triangular matrix U
p - output, real array of length n*(n+1)/2, storing the upper triangular part of the
resultant matrix P
Remark:
The computation can be used to determine the covariance matrix from its U-D factors.
Chapter 4 MECEFECI, MECEFENU, MECEFINS
- Page 4-18 -
4.38 MECEFECI
Scope:
This MATLAB macro constructs the transformation matrix from ECEF frame to ECI
(Earth Centered Inertial) frame; WGS-84 earth's rotation rate constant is used.
Usage: moutput =mecefeci(dtime)
Description of parameters:
dtime - input, time elapsed since reference time, in seconds
moutput - output, two-dimensional real array containing the transformation matrix
from ECEF frame to ECI frame
Remark:
The ECEF to ECI transformation takes into account only Earth's rotation, i.e. no Earth's
precession and mutation effects.
External Matlab macros used: wgs84con
4.39 MECEFENU
Scope:
This MATLAB module constructs the transformation matrix from ECEF frame to ENU
(East, North, Up) frame.
Usage: moutput =mecefenu(lat,lon)
Description of parameters:
lat - input, reference latitude in radians
lon - input, reference longitude in radians
moutput - output, two-dimensional real array containing the transformation matrix
from ECEF frame to ENU frame
4.40 MECEFINS
Scope:
This MATLAB module constructs the transformation matrix from ECEF frame to INS
(Wander / North West Up) frame.
Usage: moutput =mecefins(lat,lon,waz)
Description of parameters:
lat - input, reference latitude in radians
lon - input, reference longitude in radians
waz - input, wander azimuth angle in radians
Chapter 4 MECEFLLW, MECIECEF
- Page 4-19 -
moutput - output, two-dimensional real array containing the transformation matrix
from ECEF frame to INS frame
4.41 MECEFLLW
Scope:
This MATLAB module constructs the transformation matrix from ECEF frame to LLWA
(Local Level Wander Azimuth) frame.
Usage: moutput =mecefllw(lat,lon,waz)
Description of parameters:
lat - input, reference latitude in radians
lon - input, reference longitude in radians
waz - input, wander azimuth angle in radians
moutput - output, two-dimensional real array containing the transformation matrix from
ECEF frame to LLWA frame
Remark:
The coordinate axes for local level wander azimuth frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.42 MECIECEF
Scope:
This MATLAB macro constructs the transformation matrix from ECI (Earth Centered
Inertial) frame to ECEF frame; WGS-84 earth's rotation rate constant is used.
Usage: moutput =meciecef(dtime)
Description of parameters:
dtime - input, time elapsed since reference time in seconds
moutput - output, two-dimensional real array containing the transformation matrix
from ECIE frame to ECEF frame
Remark:
The ECI to ECEF transformation takes into account only Earth's rotation, i.e. no Earth's
precession and mutation effects.
External Matlab macros used: wgs84con
Chapter 4 MENUECEF, MENULLW, MINSECEF
- Page 4-20 -
4.43 MENUECEF
Scope:
This MATLAB module constructs the transformation matrix from ENU (East, North, Up)
frame to ECEF frame.
Usage: moutput =menuecef(lat,lon)
Description of parameters:
Lat - input, reference latitude in radians
lon - input, reference longitude in radians
moutput - output, two-dimensional real array containing the transformation matrix
from ENU frame to ECEF frame
4.44 MENULLW
Scope:
This MATLAB module constructs the transformation matrix from ENU (East, North, Up)
frame to LLWA (Local Level Wander Azimuth) frame.
Usage: moutput =menullw(waz)
Description of parameters:
waz - input, wander azimuth angle in radians
moutput - output, two-dimensional real array containing the transformation matrix
from ENU frame to LLWA frame
Remark:
The coordinate axes for local level wander azimuth frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.45 MINSECEF
Scope:
This MATLAB module constructs the transformation matrix from INS (Wander / North
West Up) frame to ECEF frame.
Usage: moutput =minsecef(lat,lon,waz)
Description of parameters:
lat - input, reference latitude in radians
lon - input, reference longitude in radians
waz - input, wander azimuth angle in radians
Chapter 4 MLLWB, MLLWECEF
- Page 4-21 -
moutput - output, two-dimensional real array containing the transformation matrix
from INS frame to ECEF frame
4.46 MLLWB
Scope:
This MATLAB module constructs the transformation matrix from LLWA (Local Level
Wander Azimuth) frame to GPS body frame.
Usage: moutput =mllwb(yaw,pitch,roll)
Description of parameters:
yaw - input, yaw angle in radians
pitch - input, pitch angle in radians
roll - input, roll angle in radians
moutput - output, two-dimensional real array containing the transformation matrix from
LLWA frame to GPS body frame
Remark:
The coordinate axes for wander azimuth local level frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.47 MLLWECEF
Scope:
This MATLAB module constructs the transformation matrix from LLWA (Local Level
Wander Azimuth) frame to ECEF frame.
Usage: moutput =mllwecef(lat,lon,waz)
Description of parameters:
lat - input, reference latitude in radians
lon - input, reference longitude in radians
waz - input, wander azimuth angle in radians
moutput - output, two-dimensional real array containing the transformation matrix
from LLWA frame to ECEF frame
Remark:
The coordinate axes for local level wander azimuth frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
Chapter 4 MLLWENU, MREAST, MSC2F
- Page 4-22 -
4.48 MLLWENU
Scope:
This MATLAB module constructs the transformation matrix from LLWA (Local Level
Wander Azimuth) frame to ENU (East, North, Up) frame.
Usage: moutput =mllwenu(waz)
Description of parameters:
waz - input, wander azimuth angle in radians
moutput - output, two-dimensional real array containing the transformation matrix from
LLWA frame to ENU frame
Remark:
The coordinate axes for local level wander azimuth frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.49 MREAST
Scope:
This MATLAB module executes measurement reasonableness test for a given scalar
measurement.
Usage: alpha =mreast(n,ud,h,r,dz,test)
Description of parameters:
n - input, integer scalar, dimension of state vector, n is greater than or equal to 2
ud - input, real array with n*(n+1)/2 elements, containing the U-D factors of
the covariance matrix; U is unit upper triangular and D elements are stored
on the diagonal
h - input, real array with n elements, storing the observation coefficients
(measurement matrix) for one measurement
r - input, real scalar, measurement variance
dz - input, real scalar, measurement residual
test - input, real scalar, constant used to test the validity of the measurement, e.g.
test =25 corresponds to 5 sigma verification
alpha - output, real scalar, innovations variance; if the measurement residual fails
the test then the output is negative alpha
4.50 MSC2F
Scope:
Chapter 4 MSF2C, MUDC2F
- Page 4-23 -
This MATLAB macro determines the real symmetric matrix stored as a two-dimensional
array from its upper triangular part stored columnwise as a one-dimensional array.
Usage: xout =msc2f(n,a)
Description of parameters:
n - input, real scalar, number of rows and columns of the symmetric matrix
a - input, one-dimensional array of length n*(n+1)/2, storing columnwise the
upper triangular part of the symmetric matrix
xout - output, two-dimensional array storing the full symmetric matrix
4.51 MSF2C
Scope:
This MATLAB macro determines the real symmetric matrix stored as columnwise upper
triangular part as a one-dimensional array from its two-dimensional array.
Usage: xout =msc2f(n,a)
Description of parameters:
n - input, real scalar, number of rows and columns of the symmetric matrix
a - input, two-dimensional array storing the full symmetric matrix
xout - output, one-dimensional array of length n*(n+1)/2, storing columnwise the
upper triangular part of the symmetric matrix
4.52 MUDC2F
Scope:
This MATLAB macro determines the full U and D matrices stored as two-dimensional
arrays from its compact upper triangular part stored columnwise as a one-dimensional
array.
Usage: [u,d] =mudc2f(n,a)
Description of parameters:
n - input, real scalar, number of rows and columns of the symmetric matrix
a - input, one-dimensional array of length n*(n+1)/2, storing columnwise the
U-D components of a symmetric matrix
u - output, two-dimensional array storing the full U matrix
d - output, two-dimensional array storing the full D matrix
Chapter 4 MUDD, MUDF2C, MUDM
- Page 4-24 -
4.53 MUDD
Scope:
This MATLAB module computes the U-D factorization of a real symmetric, positive
(semi)definite matrix by using the modified Cholesky decomposition.
Usage: [ud,ier] =mudd(n,a,meps)
Description of parameters:
n - input, real scalar, number of rows and columns in A
a - input, real array of length n*(n+1)/2 , storing column-wise the upper
triangular part of the real symmetric matrix A,
meps - input, real scalar, machine dependent accuracy
ud - output, real array of length n*(n+1)/2, storing the upper triangular part of
the pair U-D ; the elements of the diagonal matrix D are stored on diagonal
locations of the unit upper triangular matrix U
ier - output, integer scalar, index of error
=0 no computation error
=1 computation error occurred, a diagonal element is smaller than meps
=2 computation error occurred, the input matrix A is not numerically
positive (semi)definite
4.54 MUDF2C
Scope:
This MATLAB macro determines the compact upper triangular part stored columnwise as
a one-dimensional array from the full U and D matrices stored as two-dimensional arrays.
Usage: xout =mudf2c(n,u,d)
Description of parameters:
n - input, real scalar, number of rows and columns of the symmetric matrix
u - input, two-dimensional array storing the full U matrix
d - input, two-dimensional array storing the full D matrix
xout - output, one-dimensional array of length n*(n+1)/2, storing columnwise the
U-D components of a symmetric matrix
4.55 MUDM
Scope:
This MATLAB module implements the discrete Kalman filter measurement updating
using Bierman's U-D measurement update algorithm. Only a scalar measurement is
processed, the U-D covariance factors and the state estimate (optional) are updated. The
measurement is an input when the state is updated.
Chapter 4 MUDM1
- Page 4-25 -
Usage: [ud,f,g,alpha] =mudm(n,ud,r,h,index)
[ud,h,g,alpha] =mudm(n,ud,r,h,index) , when the input h is destroyed
Description of parameters:
n - input, integer scalar, dimension of state vector, n is greater than or equal to 2
ud - input/output, real array of length (n+1)*(n+2)/2. The first n*(n+1)/2
elements store the input/output U-D factors; the D elements are stored on
diagonal. The last n+1 elements store the input/output state vector x and
the scalar value z-h**(transpose)*x(a priori) in u((n+1)*(n+2)/2). If index
=0 then the state x (and z) need not be included and the dimension of the
array should be n*(n+1)/2.
r - input, real scalar, stores the measurement variance
h - input, real array of length (n+1) , stores the vector of measurement
coefficients (first n elements) and h(n+1) =z if index =0. If index =0
the dimension of the array h should be n.
index - input, integer scalar, index of updating type
=0 then only the U-D factors are updated (the state is not updated)
0 then the U-D factors and state are updated
f - output, real array of length (n+1) ; the first n elements contain the vector
u**(transpose)*h(input), and when index 0 then f(n+1) =
(z-h**(transpose)*x(a priori))/alpha. If index =0 the dimension of the
array f should be n.
g - output, real array of length n , which contains the vector of unweighted
Kalman gains; Kalman gain is g/alpha.
alpha - output, real scalar, innovations variance of the measurement residual
(h**(transpose)*p(a priori)*h+r)
Remarks:
The algorithm holds for r =0 (a perfect measurement) and the code includes this case.
One can use this algorithm with r negative to delete a previously processed data point.
However, one should note that data deletion is numerically unstable and sometimes
introduces numerical errors.
Method:
The algorithm updates the columns of the U-D matrix, from left to right, using Bierman's
algorithm; the state vector is updated using the classical formula.
Reference: [6]
4.56 MUDM1
Scope:
This MATLAB module implements the discrete Kalman filter measurement updating
using Bierman's U-D measurement update algorithm. Only a scalar measurement is
processed, the U-D covariance factors and the state estimate (optional) are updated. The
measurement residual is an input when the state is updated.
Chapter 4 NCCHI2_10
- Page 4-26 -
Usage: [ud,f,g,alpha] =mudm1(n,ud,r,h,index)
[ud,h,g,alpha] =mudm1(n,ud,r,h,index) when the input h is destroyed
Description of parameters:
n - input, integer scalar, dimension of state vector, n is greater than or equal to 2
ud - input/output, real array of length (n+1)*(n+2)/2. The first n*(n+1)/2
elements store the input/output U-D factors; the D elements are stored on
diagonal. The last n+1 elements store the input/output state vector x and
the scalar value of measurement residual in u((n+1)*(n+2)/2). If index =0
then the state x and measurement residual need not be included and the
dimension of the array should be n*(n+1)/2.
r - input, real scalar, stores the measurement variance
h - input, real array of length n , storing the vector of measurement coefficients
index - input, integer scalar, index of updating type
=0 then only the U-D factors are updated (the state is not updated)
0 then the U-D factors and state are updated
f - output, real array of length (n+1) ; the first n elements contain the vector
u**(transpose)*h(input), and when index 0 then f(n+1)=(measurement
residual)/ alpha. If index =0 the dimension of the array f should be n.
g - output, real array of length n , which contains the vector of unweighted
Kalman gains; Kalman gain is g/alpha.
alpha - output, real scalar, innovations variance of the measurement residual
(h**(transpose)*p(a priori)*h+r)
Remarks:
The algorithm holds for r =0 (a perfect measurement) and the code includes this case.
One can use this algorithm with r negative to delete a previously processed data point.
However, one should note that data deletion is numerically unstable and sometimes
introduces numerical errors.
Method:
The algorithm updates the columns of the U-D matrix, from left to right, using Bierman's
algorithm; the state vector is updated using the classical formula.
Reference: [6]
4.57 NCCHI2_10
Scope:
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with ten degrees of freedom.
Usage: xoutput =ncchi2_10(x,lambda)
Description of parameters:
x - input, scalar independent variable
Chapter 4 NCCHI2_2, NCCHI2_3, NCCHI2_4
- Page 4-27 -
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.58 NCCHI2_2
Scope:
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with two degrees of freedom.
Usage: xoutput =ncchi2_2(x,lambda)
Description of parameters:
x - input, scalar independent variable
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.59 NCCHI2_3
Scope:
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with three degrees of freedom.
Usage: xoutput =ncchi2_3(x,lambda)
Description of parameters:
x - input, scalar independent variable
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.60 NCCHI2_4
Scope:
Chapter 4 NCCHI2_5, NCCHI2_6
- Page 4-28 -
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with four degrees of freedom.
Usage: xoutput =ncchi2_4(x,lambda)
Description of parameters:
x - input, scalar independent variable
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.61 NCCHI2_5
Scope:
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with five degrees of freedom.
Usage: xoutput =ncchi2_5(x,lambda)
Description of parameters:
x - input, scalar independent variable
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.62 NCCHI2_6
Scope:
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with six degrees of freedom.
Usage: xoutput =ncchi2_6(x,lambda)
Description of parameters:
x - input, scalar independent variable
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
Chapter 4 NCCHI2_7, NCCHI2_8, NCCHI2_9
- Page 4-29 -
This macro can be used for the computation of the integral of the probability density
function.
4.63 NCCHI2_7
Scope:
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with seven degrees of freedom.
Usage: xoutput =ncchi2_7(x,lambda)
Description of parameters:
x - input, scalar independent variable
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.64 NCCHI2_8
Scope:
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with eight degrees of freedom.
Usage: xoutput =ncchi2_8(x,lambda)
Description of parameters:
x - input, scalar independent variable
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.65 NCCHI2_9
Scope:
This MATLAB macro computes the probability density function of the non-central chi-
square distribution with nine degrees of freedom.
Usage: xoutput =ncchi2_9(x,lambda)
Chapter 4 PIONOC, PRADR
- Page 4-30 -
Description of parameters:
x - input, scalar independent variable
lambda - input, non-centrality parameter
xoutput - output, computed probability density function
Remark:
This macro can be used for the computation of the integral of the probability density
function.
4.66 PIONOC
Scope:
This MATLAB module computes pseudorange measurement corrected for ionospheric
effects when pseudoranges measured on L1/L2 are available.
Usage: pr =pionoc(pr1,pr2)
Description of parameters:
pr1 - input, pseudorange measured on L1
pr2 - input, pseudorange measured on L2
pr - output, pseudorange corrected for ionospheric effects
4.67 PRADR
Scope:
This MATLAB macro computes pseudorange and accumulated delta range for a specified
satellite. WGS-84 constants are used.
Usage: [pr,adr] =pradr(upos,uposlla,uelaz,svpos,tsim,step,svid,flags)
Description of parameters:
upos - input, user position in ECEF, the components are in meters
uposlla - input, user position in geodetic coordinates (latitude/longitude/altitude
above ellipsoid), the components are in radians, radians, and meters
(optional, it is needed when iono correction flag is set)
uelaz - input, elevation and azimuth angles as follows
uelaz(1) - elevation angle, in radians
uelaz(2) - azimuth angle, in radians
svpos - input, ECEF satellite position, the components in meters
tsim - input, simulation time (time of week), in seconds
step - input, step number; the value is used when when one of the following are
applied: SA, multipath, user clock, pseudorange noise, ambiguity, delta
range noise
svid - input, satellite id
Chapter 4 PZ90CON
- Page 4-31 -
flags - input, flags with the following meaning
flags(1) = 0 iono correction is not used
!= 0 iono correction is used; the coefficients alpha and beta should
be initialized before calling this module (see global)
flags(2) = 0 tropo correction is not used
!= 0 tropo correction is used; geoid heights data file (e.g. tgeoid84.
dat) should be loaded before calling this module (see global)
flags(3) = 0 SA correction is not used
!= 0 SA correction is used; SA data file (e.g. safile.mat) should be
loaded before calling this module (see also global)
flags(4) = 0 multipath is not used
!= 0 multipath is used; multipath data file (e.g. mpfile.mat) should
be loaded before calling this module (see also global)
flags(5) = 0 user clock bias/drift is not used
!= 0 user clock bias/drift is used; user clock bias and drift data file
(e.g. ucbfile.mat) should be loaded before calling this module
(see also global)
flags(6) = 0 earth rotation correction is not used
!= 0 earth rotation correction is used
flags(7) = 0 pseudorange noise is not used
!= 0 pseudorange noise is used; prnoise(nrstep,svid) generated in
the main program (see also global)
flags(8) = 0 carrier phase is not generated
!= 0 carrier phase is generated; user clock bias and drift data (e.g.
ambfile.mat) file should be loaded before (see also global)
flags(9) = 0 delta range noise is not used
!= 0 delta range noise is used ; adrnoise(nrstep,svid) generated in
the main program (see also global)
pr - output, pseudorange, in meters
adr - output, accumulated delta range, in meters (optional)
Remarks:
It is assumed that the satellite is visible. Some data are transmitted using globals.
External Matlab macros used: ionoc, tropoc1, uercor, wgs84con
4.68 PZ90CON
Scope:
This MATLAB macro sets the PZ-90 (earth's parameters 1990) most used constants as
global variables.
Usage: pz90con
Description of parameters:
a_smaxis - output, PZ-90 earth semi-major axis in meters
Chapter 4 QRUPA, RAIMFD
- Page 4-32 -
b_smaxis - output, PZ-90 earth semi-minor axis in meters
eccentr - output, PZ-90 earth eccentricity
eccentr2 - output, PZ-90 earth eccentricity squared
flatness - output, PZ-90 flatness (ellipticity)
gravpar - output, PZ-90 gravity parameter in meters**3/sec**2 earth's
gravitational constant (mass of earth including earth's atmosphere)
gravatm - output, PZ-90 gravitational constant of atmosphere in m**3/s**2
rot_rate - output, PZ-90 earth rotation rate in radians/second
c_speed - output, PZ-90 speed of light in vacuum in meters/second
g0 - output, PZ-90 equatorial acceleration of gravity in meters/sec**2
gcoratm - output, PZ-90 correction to the acceleration of gravity at sea level
because of atmosphere, in meters/sec**2
j2 - output, PZ-90 second zonal harmonic of the geopotential
Reference: [34]
4.69 QRUPA
Scope:
This MATLAB module implements the updating algorithm [10] for Q-R factorization of
the modified measurement matrix when a new clock measurement is added.
Usage: [qupdate,rupdate] =qrupa(m,n,q,r,alpha)
Description of parameters:
m - input, real scalar, number of rows and columns in matrix q, and number of
rows in matrix r
n - input, real scalar, number of columns in matrix r
q - input, real two-dimensional array storing the initial matrix q, where
measurement matrix is decomposed in (q,r) factors
r - input, real two-dimensional array storing the initial matrix r, where
measurement matrix is decomposed in (q,r) factors
alpha - input, real scalar, ratio between pseudorange measurement standard
deviation and clock standard deviation
qupdate - output, real two-dimensional array storing the updated q matrix qupdate
rupdate - output, real two-dimensional array storing the updated r matrix rupdate
Reference: [10]
4.70 RAIMFD
Scope :
This MATLAB module determines the outcome of a fault detection algorithm for the
Receiver Autonomous Integrity Monitoring (RAIM) [23]; only a time step is processed.
Chapter 4 RAIMST
- Page 4-33 -
Usage : counts =raimfd(g,pfa,sigma,pmd)
Description of parameters :
g - input, line-of-sight unit vectors, each vector is stored in another row (it
should be 3 columns)
pfa - input, probability of false alarm
sigma - input, standard deviation of measurement noise (in meters)
pmd - input, probability of missed detection
counts - output, counters
counts(1) = false alarm counter
counts(2) = true alarm counter
counts(3) = missed detection counter
counts(4) = normal operation counter
counts(5) = unavailable counter
Remark:
It is assumed that at least five line-of-sight unit vectors are specified as input.
Reference : [23]
4.71 RAIMST
Scope:
This MATLAB module determines availability and failure flags for the Receiver
Autonomous Integrity Monitoring (RAIM) baseline standard algorithm (constant alarm
rate algorithm) [7].
Usage: [avail,testst] =raimst(g,threshold,arpceil,epsvec)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it
should be 3 columns)
threshold - input, threshold value
arpceil - input, arp ceiling value; arp =approximate radial error protected
epsvec - input, error vector in true range
avail - output, availability flag
= 0 admissible
= 1 inadmissible
testst - output, failure flag
= 0 no failure
= 1 failure
Remark:
It is assumed that at least five line-of-sight unit vectors are specified as input.
Reference: [7]
Chapter 4 RANGE, RMS, RMS2
- Page 4-34 -
4.72 RANGE
Scope:
This MATLAB module computes the range between two position points defined into a
three-dimensional orthogonal frame.
Usage: x =range(x1,x2)
Description of parameters:
x1 - input, first position point
x2 - input, second position point
x - output, range between the two defined position points
Remarks:
1) The computation is executed when the two vectors have the same dimension.
2) The components of the input vectors and the range should have the same unit, e.g.
meters, feet.
4.73 RMS
Scope:
This MATLAB module computes root mean square (RMS) of a sample.
Usage: y =rms(x)
Description of parameters:
x - input, sample vector (columnwise) with m elements
y - output, RMS value (normalized by (m-1)); if the sample vector has only one
element then the result is 0.
4.74 RMS2
Scope:
This MATLAB macro computes modified root mean square (modified RMS) of a
sample.
Usage: y =rms2(x)
Description of parameters:
x - input, sample (row or column) vector with m elements
y - output, RMS2 value, i.e. square root of (sum of squares normalized by
number of elements)
Remark:
Chapter 4 RSS, RSSXY, RWALK
- Page 4-35 -
The modified RMS is identical to the textbook RMS when the sum of all sample
elements is zero.
4.75 RSS
Scope:
This MATLAB module computes root sum square (RSS) of a three component vector
sample.
Usage: y =rss(x)
Description of parameters:
x - input, sample vector, x(i,*) is an i-th three component vector sample
y - output, RSS value, y(i) is the RSS of the i-th three component vector sample
4.76 RSSXY
Scope:
This MATLAB module computes root sum square (RSS) of a two component vector
sample.
Usage: y =rssxy(x)
Description of parameters:
x - input, sample vector, x(i,*) is an i-th two component vector sample
y - output, RSS value, y(i) is the RSS of the i-th two component vector sample
4.77 RWALK
Scope:
This MATLAB module generates random walk process. The seed is reset to 0. at the start
of the random number generation process, i.e. at each execution of this module.
Usage: x =rwalk(n,qdt)
Description of parameters:
n - input, number of random numbers to be generated
qdt - input, noise covariance q*dt
x - output, random walk process with n elements
External Matlab modules used: genrn
Method:
Direct implementation of the formula
Chapter 4 SDOP, SELECTD
- Page 4-36 -
x_new =x_old +w
where
w is a normally distributed random number with zero mean and standard deviation
equals to qdt
4.78 SDOP
Scope:
This MATLAB macro computes sub-dilution of precision (sub-DOP) quantities, i.e. DOP
quantities for all satellites subsets obtained from eliminating one satellite from the
original set. Five or more satellites are needed for the computation of sub-DOP.
Usage: [sgdop,spdop,shdop,svdop,stdop,dops] =sdop(g)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it should
be 3 columns)
sgdop - output, sub-GDOP for all satellites subsets
spdop - output, sub-PDOP for all satellites subsets
shdop - output, sub-HDOP for all satellites subsets
svdop - output, sub-VDOP for all satellites subsets
stdop - output, sub-TDOP for all satellites subsets
dops - output, dilution of precision quantities for the complete set of satellites
dops(1) =geometric dilution of precision (GDOP)
dops(2) =position dilution of precision (PDOP)
dops(3) =horizontal dilution of precision (HDOP)
dops(4) =vertical dilution of precision (VDOP)
dops(5) =time dilution of precision (TDOP)
Remark:
The sub-HDOP is useful in the RAIM detection process [7], [27].
References: [7], [27]
4.79 SELECTD
Scope:
This MATLAB module selects only the different elements from a specified array.
Usage: [xsel,nsel] =selectd(x)
Description of parameters:
x - input, columnwise array containing elements to be selected
xsel - output, array containing selected elements, vector with nsel elements
nsel - output, number of elements in the array xsel
Chapter 4 SGS85CON, SLOPEMAX
- Page 4-37 -
4.80 SGS85CON
Scope:
This MATLAB macro sets the SGS-85 (Soviet Geodetic System 1985) most used
constants as global variables.
Usage: sgs85con
Description of parameters:
a_smaxis - output, SGS-85 earth semi-major axis in meters
b_smaxis - output, SGS-85 earth semi-minor axis in meters
eccentr - output, SGS-85 earth eccentricity
eccentr2 - output, SGS-85 earth eccentricity squared
flatness - output, SGS-85 flatness (ellipticity)
gravpar - output, SGS-85 gravity parameter in meters**3/sec**2 earth's
gravitational constant (mass of earth including earth's atmosphere)
gravatm - output, SGS-85 gravitational constant of atmosphere in m**3/s**2
rot_rate - output, SGS-85 earth rotation rate in radians/second
c_speed - output, SGS-85 speed of light in vacuum in meters/ second
g0 - output, SGS-85 equatorial acceleration of gravity in meters/sec**2
gcoratm - output, SGS-85 correction to the acceleration of gravity at sea level
because of atmosphere, in meters/sec**2
j2 - output, SGS-85 second zonal harmonic of the geopotential
Reference: [34]
4.81 SLOPEMAX
Scope:
This MATLAB module determines slopemax value for the Receiver Autonomous
Integrity Monitoring (RAIM) baseline standard algorithm (constant alarm rate algorithm)
[7].
Usage: xoutput =slopemax(g)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it
should be 3 columns)
xoutput - output, value of the slopemax
Remark:
It is assumed that at least five line-of-sight unit vectors are specified as input.
Reference: [7]
Chapter 4 STATUP, SVPALM
- Page 4-38 -
4.82 STATUP
Scope:
This MATLAB module computes the running mean, standard deviation and root mean
square for a set of real samples.
Usage: [np1,am,astd,arms] =statup(np1,xnp1,am,astd,arms)
Description of parameters:
np1 - input, number of samples of the old set is np1 - 1
xnp1 - input, latest sample to be added to the old set to form the new set
am - input, mean of the old set
astd - input, standard deviation of the old set of samples
arms - input, root mean square of the old set of samples
np1 - output, number of samples of the new set
am - output, mean of the new set
astd - output, standard deviation of the new set of samples
arms - output, root mean square of the new set of samples
Remarks:
1) np1 should be greater or equal to 1.
2) The first call to this module should be with np1 =1, for the initialization - when the
computation of running mean, standard deviation and mean square root is beginning.
4.83 SVPALM
Scope:
This MATLAB macro computes ECEF satellite position based on satellite almanac data;
WGS-84 constants are used.
Usage: psa =svpalm(tsim,adata)
Description of parameters:
tsim - input, tsim, GPS system time at time of transmission, i.e. GPS time
corrected for transit time (range/speed of light), in seconds
adata(1) - input, toa, reference time almanac (time of applicability), in seconds
adata(2) - input, smaxis (a), semi-major axis, in meters
adata(3) - input, ecc (e), satellite eccentricity
adata(4) - input, izero (I_0), inclination angle at reference time, in radians
adata(5) - input, razero (OMEGA_0), right ascension at reference time, in radians
(longitude of ascending node of orbit plane at weekly epoch)
adata(6) - input, argper (omega), argument of perigee, in radians
adata(7) - input, mzero (M_0), mean anomaly at reference time, in radians
adata(8) - input, radot (OMEGA_DOT), rate of right ascension, in radians/second
psa - output, ECEF satellite position vector, the components are in meters
Chapter 4 SVPEPH, SVSEL4
- Page 4-39 -
External Matlab macros used: wgs84con
4.84 SVPEPH
Scope:
This MATLAB macro computes ECEF satellite position based on satellite ephemeris
data; WGS-84 constants are used.
Usage: pse =svpeph(tsim,edata)
Description of parameters:
tsim - input, tsim, GPS system time at time of transmission, i.e. GPS time
corrected for transit time (range/speed of light), in seconds
edata(1) - input, toe, reference time ephemeris, in seconds
edata(2) - input, smaxis (a), semi-major axis, in meters
edata(3) - input, ecc (e), satellite eccentricity
edata(4) - input, izero (I_0), inclination angle at reference time, in radians
edata(5) - input, razero (OMEGA_0), right ascension at reference time, in radians
(longitude of ascending node of orbit plane at weekly epoch)
edata(6) - input, argper (omega), argument of perigee, in radians
edata(7) - input, mzero (M_0), mean anomaly at reference time, in radians
edata(8) - input, radot (OMEGA_DOT), rate of right ascension, in radians/second
edata(9) - input, deln (delta_n), mean motion difference from computed value, in
radians/second
edata(10) - input, idot (I_DOT), rate of inclination angle, in radians/second
edata(11) - input, cic, amplitude of the cosine harmonic correction term to the angle
of inclination, in radians
edata(12) - input, cis, amplitude of the sine harmonic correction term to the angle of
inclination, in radians
edata(13) - input, crc, amplitude of the cosine harmonic correction term to the orbit
radius, in meters
edata(14) - input, crs, amplitude of the sine harmonic correction term to the orbit
radius, in meters
edata(15) - input, cuc, amplitude of the cosine harmonic correction term to the
argument of latitude, in radians
edata(16) - input, cus, amplitude of the sine harmonic correction term to the
argument of latitude, in radians
pse - output, ECEF satellite position vector, the components are in meters
External Matlab macros used: wgs84con
4.85 SVSEL4
Scope:
Chapter 4 SVSEL5
- Page 4-40 -
This MATLAB module determines the selection of a set of 4 satellites based on minimum
geometric dilution of precision (GDOP) from all possible sets available. For the selected
set of 4 satellites the computed dilution-of-precision (DOP) values are outputted.
Usage: [hmat,dops,svind] =svsel4(losuvec)
Description of parameters:
losuvec - input, line of sight unit vectors for all visible or selected satellites assembled
into a 3 by nrsv matrix, where nrsv is the number of satellites (nrsv 4)
hmat - output, 4 by 4 matrix containing the selected LOS vectors combination;
each column contains one LOS vector and 1 as the last component
dops - output, dilution-of-precision (DOP) values in the following order
dops(1) =geometric dilution of precision (GDOP)
dops(2) =position dilution of precision (PDOP)
dops(3) =horizontal dilution of precision (HDOP)
dops(4) =vertical dilution of precision (VDOP)
dops(5) =time dilution of precision (TDOP)
svind - output, indices of the selected optimum satellite combination (4 satellites);
indices are reflecting the order line of sight unit vectors are listed in the
input array losuvec
4.86 SVSEL5
Scope:
This MATLAB module determines the selection of a set of 5 satellites based on minimum
geometric dilution of precision (GDOP) from all possible sets available. For the selected
set of 5 satellites the computed dilution-of-precision (DOP) values are outputted.
Usage: [hmat,dops,svind] =svsel5(losuvec)
Description of parameters:
losuvec - input, line of sight unit vectors for all visible or selected satellites assembled
into a 3 by nrsv matrix, where nrsv is the number of satellites (nrsv 5)
hmat - output, 4 by 5 matrix containing the selected LOS vectors combination;
each column contains one LOS vector and 1 as the last component
dops - output, dilution-of-precision (DOP) values in the following order
dops(1) =geometric dilution of precision (GDOP)
dops(2) =position dilution of precision (PDOP)
dops(3) =horizontal dilution of precision (HDOP)
dops(4) =vertical dilution of precision (VDOP)
dops(5) =time dilution of precision (TDOP)
svind - output, indices of the selected optimum satellite combination (5 satellites); ind-
ices are reflecting the order line of sight unit vectors are in the array losuvec
Chapter 4 SVSEL6, SWDOP
- Page 4-41 -
4.87 SVSEL6
Scope:
This MATLAB module determines the selection of a set of 6 satellites based on minimum
geometric dilution of precision (GDOP) from all possible sets available. For the selected
set of 6 satellites the computed dilution-of-precision (DOP) values are outputted.
Usage: [hmat,dops,svind] =svsel6(losuvec)
Description of parameters:
losuvec - input, line of sight unit vectors for all visible or selected satellites assembled
into a 3 by nrsv matrix, where nrsv is the number of satellites (nrsv 6)
hmat - output, 4 by 6 matrix containing the selected LOS vectors combination;
each column contains one LOS vector and 1 as the last component
dops - output, dilution-of-precision (DOP) values in the following order
dops(1) =geometric dilution of precision (GDOP)
dops(2) =position dilution of precision (PDOP)
dops(3) =horizontal dilution of precision (HDOP)
dops(4) =vertical dilution of precision (VDOP)
dops(5) =time dilution of precision (TDOP)
svind - output, indices of the selected optimum satellite combination (6 satellites);
indices are reflecting the order line of sight unit vectors are listed in the input
array losuvec
4.88 SWDOP
Scope:
This MATLAB macro computes sub-weighted dilution of precision (sub-WDOP)
quantities, i.e. WDOP quantities for all satellites subsets obtained from eliminating one
satellite from the original set.
Usage: [swgdop,swpdop,swhdop,swvdop,swtdop,wdops] =swdop(g,wf)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it
should be 3 columns)
wf - input, array containing weighting factors, it should be one weighting factor
for each line-of-sight unit vector (in the same order)
swgdop - output, sub-WGDOP for all satellites subsets
swpdop - output, sub-WPDOP for all satellites subsets
swhdop - output, sub-WHDOP for all satellites subsets
swvdop - output, sub-WVDOP for all satellites subsets
swtdop - output, sub-WTDOP for all satellites subsets
wdops - output, weighted dilution of precision quantities for the complete set of
satellites; vector with the following components:
wdops(1) =geometric dilution of precision (WGDOP)
Chapter 4 TADMSRAD, TARADDMS, TECEFGD
- Page 4-42 -
wdops(2) =position dilution of precision (WPDOP)
wdops(3) =horizontal dilution of precision (WHDOP)
wdops(4) =vertical dilution of precision (WVDOP)
wdops(5) =time dilution of precision (WTDOP)
Remark:
Five or more satellites are needed for the computation of sub-WDOP. The sub-WHDOP
is useful in the RAIM detection process [7], [27].
References: [7], [27]
4.89 TADMSRAD
Scope:
This MATLAB module converts an angle value from degrees/minutes/seconds to radians.
Usage: arad =tadmsrad(adeg,amin,asec)
Description of parameters:
adeg - input, angle - degrees component, positive or negative number
amin - input, angle - minutes component, positive number only
asec - input, angle - seconds component, positive number only
arad - output, angle in radians
4.90 TARADDMS
Scope:
This MATLAB module converts an angle value from radians to degrees/minutes/seconds.
Usage: [adeg,amin,asec] =taraddms(arad)
Description of parameters:
arad - input, angle in radians
adeg - output, angle - degrees component
amin - output, angle - minutes component
asec - output, angle - seconds component
4.91 TECEFGD
Scope:
This MATLAB module performs the transformation from ECEF to geodetic coordinates
for a given position; WGS-84 constants are used.
Usage: [lat,lon,alt] =tecefgd(pecef)
Chapter 4 TECEFGD2, TGDECEF
- Page 4-43 -
Description of parameters:
pecef - input, ECEF position, with components in meters
lat - output, latitude of the position, in radians
lon - output, longitude of the position, in radians
alt - output, altittude of the position, in meters
Reference: [35]
External Matlab macros used: wgs84con
4.92 TECEFGD2
Scope:
This MATLAB macro performs the transformation from ECEF to geodetic coordinates
for a given position by using an iterative process; WGS-84 constants are used.
Usage: [lat,lon,alt] =tecefgd2(pecef)
Description of parameters:
pecef - input, ECEF position, with components in meters
lat - output, latitude of the position, in radians
lon - output, longitude of the position, in radians
alt - output, altitude of the position, in meters
External Matlab macros used: wgs84con
4.93 TGDECEF
Scope:
This MATLAB module performs the transformation from geodetic to ECEF coordinates
for a given position; WGS-84 constants are used.
Usage: pecef =tgdecef(lat,lon,alt)
Description of parameters:
lat - input, latitude of the given position, in radians
lon - input, longitude of the given position, in radians
alt - input, altittude (above ellipsoid) of the given position, in meters
pecef - output, ECEF position, with components in meters
External Matlab macros used: wgs84con
Chapter 4 TIMETR, TRAJS
- Page 4-44 -
4.94 TIMETR
Scope:
This MATLAB macro computes GPS time of transmission from time of measurement
(reception) for a satellite pseudorange measurement; WGS-84 constants are used.
Usage: xoutput =timetr(tmeas,toc,af,pr)
Description of parameters:
tmeas - input, time of measurement (reception), in seconds
toc - input, reference time of clock (from ephemeris data), in seconds
af - input, array containing ephemeris satellite clock parameters af0 -->af(1),
af1 -->af(2) and af2 -->af(3)
pr - input, satellite pseudorange, in meters
xoutput - output, time of transmission, in seconds
Remark:
The relativistic correction term given by
delta_tr =F * e * sqrt(a) * sin(Ek)
where
F =-4.442807633*10^(-10) sec/(meters)^0.5 in WGS-84
e is the satellite eccentricity
a is the satellite semi-major axis
Ek is ecentric anomaly (time dependent) can be added to delta_ts to improved
the computational accuracy.
External Matlab macros used: wgs84con
4.95 TRAJS
Scope:
This MATLAB macro computes the vehicle trajectory with the following characteristics:
straight segment with constant speed in ENU frame; the trajectory is specified in ECEF
and ENU frames. WGS-84 constants are used.
Usage: [trajecef,trajenu] =trajs(user0xyz,v0enu,deltat,nsteps)
Description of parameters:
user0xyz - input, user's initial ECEF position, the components are in meters
v0enu - input, ENU velocity vector, the components are in meters/second
deltat - input, time step, in seconds
nsteps - input, number of step desired
trajecef - output, ECEF position, the components are in meters; trajecef(k+1,:) is the
k-th time step value
trajenu - output, ENU position, the components are in meters; trajenu(k+1,:) is the
k-th time step value; the origin is the initial user's position
Chapter 4 TROPOC1, UCLOCK
- Page 4-45 -
External Matlab macros used: tecefgd, venuecef, wgs84con
4.96 TROPOC1
Scope:
This MATLAB macro computes tropospheric correction for a specified user by using a
simplified model [1]; WGS-84 constants are used.
Usage: tropoc =tropoc1(lat,lon,alt,elev,tgeoid)
Description of parameters:
lat - input, user's latitude, in radians (-pi/2 to +pi/2)
lon - input, user's longitude, in radians (0 to 2*pi)
alt - input, user's altitude above WGS-84 ellipsoid, in meters
elev - input, user's elevation angle, in radians
tgeoid - input, geoid heights table (in meters) for a 19 by 36 Latitude/Longitude grid;
the latitudes go northward from -90 to 90 degrees, and longitudes go eastward
from 0 to 350 degrees
tropoc - output, tropospheric correction, in meters
Reference: [29]
External Matlab macros used: geoidh
4.97 UCLOCK
Scope:
This MATLAB macro computes user clock bias and drift by using a simplified second
order model [1]. WGS-84 constants are used.
Usage: [cbias,cdrift] =uclock(nsteps,sb,sf,dt) when seed is not reset
[cbias,cdrift] =uclock(nsteps,sb,sf) when seed is not reset and dt =1 as
default values
Description of parameters:
nsteps - input, number of steps to be executed
sb - input, white noise spectral density amplitude for the first component
corresponding to clock bias, in seconds
sf - input, white noise spectral density amplitude for the second component
corresponding to clock drift, in second/second
dt - input (optional), time interval between two consecutive steps, in seconds;
the default value is 1 second
iseed - input (optional), seed value
cbias - output, clock bias vector for nsteps, in meters
Chapter 4 UERCOR, UPOSD4
- Page 4-46 -
cdrift - output, clock drift vector for nsteps, in meters/sec
Remark:
The initial clock bias and drift values can be changed; the default values are 0.
Reference: [8]
External Matlab macros used: wgs84con
4.98 UERCOR
Scope:
This MATLAB macro computes user earth rotation correction vector as per ICD-GPS-
200C [1]. WGS-84 constants are used.
Usage: xercor =uercor(upos,dt)
Description of parameters:
upos - input, user ECEF position, the components are in meters
dt - input, time delay of signal propagation from satellite to user, in seconds
xercor - output, user earth rotation correction vector, ECEF components are in meters
References: [4], [36]
External Matlab macros used: wgs84con
4.99 UPOSD4
Scope:
This MATLAB module computes GPS user's position by using a direct (non-iterative)
GPS solution method proposed by Bancroft [5], [9], when four satellite positions and the
corresponding pseudoranges are known.
Usage: [nsol,upos,ucbias] =uposd4(svpos,rho)
Description of parameters:
svpos - input, four ECEF satellite positions, each row contains the three component
for a satellite, all components are in meters
rho - input, columnwise four pseudoranges, the pseudoranges are in meters
nsol - output, number of solutions (0, 1 or 2)
upos - output, ECEF user's position, the components are in meters
ucbias - output, user's clock bias (the difference between user's time and GPS time)
measured in units of distance (meters)
Chapter 4 UPOSDG, UPOSIT, UVERV
- Page 4-47 -
References: [5], [9]
4.100 UPOSDG
Scope:
This MATLAB module computes GPS user's position by using a direct (non-iterative)
GPS solution method proposed by Bancroft [5], [9], when at least four satellite positions
and the corresponding pseudoranges are known.
Usage: [nsol,upos,ucbias] =uposdg(svpos,rho)
Description of parameters:
svpos - input, at least four ECEF satellite positions, each row contains the three
component for a satellite, all components are in meters
rho - input, columnwise, at least four pseudoranges, the pseudoranges are in
meters
nsol - output, number of solutions (0, 1 or 2)
upos - output, ECEF user's position, the components are in meters
ucbias - output, user's clock bias (the difference between user's time and GPS time)
measured in units of distance (meters)
References: [5], [9]
4.101 UPOSIT
Scope:
This MATLAB module computes GPS user's position by using an iterative method, when
four ECEF satellite positions and the corresponding pseudoranges are known.
Usage: [upos,ucbias] =uposit(svpos,rho,upos)
Description of parameters:
svpos - input, four ECEF satellite positions, each row contains the three component
for a satellite, all components are in meters
rho - input, columnwise four pseudoranges, the pseudoranges are in meters
upos - input/output, ECEF user's position, the components are in meters; as input,
the initialization value or the value from the previous iteration
ucbias - output, user's clock bias (the difference between user's time and GPS time)
measured in units of distance (meters)
4.102 UVERV
Scope:
Chapter 4 VBLLW, VECEFECI
- Page 4-48 -
This MATLAB module computes the unit vertical vector (up) for a given ECEF position
vector; WGS-84 constants are used.
Usage: up =uverv(p)
Description of parameters:
p - input, ECEF position vector, the components are in meters
up - output, unit vertical vector (up), the components are in meters
External Matlab macros used: wgs84con
4.103 VBLLW
Scope:
This MATLAB module performs the transformation from GPS body frame to wander
azimuth local level frame for a given position vector and referenced yaw/pitch/roll angles.
Usage: pllw =vbllw(pb,yaw,pitch,roll)
Description of parameters:
pb - input, GPS body frame position vector (with components in meters)
yaw - input, yaw angle in radians
pitch - input, pitch angle in radians
roll - input, roll angle in radians
pllw - output, local level wander azimuth position vector, with components in the
same units as the input GPS body frame position vector
Remark:
The coordinate axes for wander azimuth local level frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.104 VECEFECI
Scope:
This MATLAB macro performs the transformation from ECEF to ECI (Earth Centered
Inertial) coordinates for a given position vector and time elapsed since reference time;
WGS-84 earth's rotation rate constant is used.
Usage: peci =vecefeci(pecef,dtime)
Description of parameters:
pecef - input, ECEF position vector (with components in meters)
dtime - input, time elapsed since reference time in seconds
Chapter 4 VECEFENU, VECEFGD
- Page 4-49 -
peci - output, ECI position vector, with components in same units as the input ECEF
position vector
Remark:
The ECEF to ECI transformation takes into account only Earth's rotation, i.e. no Earth's
precession and mutation effects.
External Matlab macros used: wgs84con
4.105 VECEFENU
Scope:
This MATLAB module performs the transformation from ECEF frame to ENU (East,
North, Up) frame for a given position vector and referenced latitude/longitude angles.
Usage: penu =vecefenu(pecef,lat,lon)
Description of parameters:
pecef - input, ECEF position vector (with components in meters)
lat - input, reference latitude in radians
lon - input, reference longitude in radians
penu - output, ENU position vector, with components in same units as the input ECEF
position vector
4.106 VECEFGD
Scope:
This MATLAB module performs the transformation from ECEF frame to geodetic
coordinates for a given position vector; the reference point is given in geodetic
coordinates.
Usage: pgd =vecefgd(pecef,pgdref)
Description of parameters:
pecef - input, ECEF position vector, with components in meters
pgdref - input, geodetic position of the reference point, where
pgdref(1) =latitude in radians
pgdref(2) =longitude in radians
pgdref(3) =altitude in meters
pgd - output, geodetic position of the final point, where
pgd(1) =latitude in radians
pgd(2) =longitude in radians
pgd(3) =altitude in meters
External Matlab modules used: tecefgd, tgdecef
Chapter 4 VECEFINS, VECEFLLW,VECEFP90
- Page 4-50 -
4.107 VECEFINS
Scope:
This MATLAB module performs the transformation from ECEF to INS platform
coordinates (Wander / North, West, Up) for a given position vector and reference
latitude/longitude/wander azimuth angles.
Usage: pins =vecefins(pecef,lat,long,waz)
Description of parameters:
pecef - input, ECEF position vector (with components in meters)
lat - input, reference latitude in radians
lon - input, reference longitude in radians
waz - input, reference wander azimuth angle in radians
pins - output, INS platform position vector, with components in same units as the
input ECEF position vector
4.108 VECEFLLW
Scope:
This MATLAB module performs the transformation from ECEF frame to wander
azimuth local level frame for a given position vector and reference
latitude/longitude/wander azimuth angles.
Usage: pllw =vecefllw(pecef,lat,lon,waz)
Description of parameters:
pecef - input, ECEF position vector (with components in meters)
lat - input, reference latitude in radians
lon - input, reference longitude in radians
waz - input, reference wander azimuth angle in radians
pllw - output, local level wander azimuth position vector, with components in
same units as the input ECEF position vector
Remark:
The coordinate axes for wander azimuth local level frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.109 VECEFP90
Scope:
Chapter 4 VECEFS85, VECIECEF
- Page 4-51 -
This MATLAB macro performs the transformation from ECEF WGS-84 to PZ-90
("Parametri Zemli 1990", i.e. earth's parameters 1990) frame coordinates for a given
position vector with components expressed in meters.
Usage: ppz90 =vecefp90(pecef)
Description of parameters:
pecef - input, ECEF (WGS-84) position vector with components in meters
ppz90 - output, PZ-90 frame position vector, with components in meters
Reference: [37]
4.110 VECEFS85
Scope:
This MATLAB macro performs the transformation from ECEF WGS-84 to SGS-85
(Soviet Geodetic System 1985) frame coordinates for a given position vector with
components expressed in meters.
Usage: psgs85 =vecefs85(pecef)
Description of parameters:
pecef - input, ECEF (WGS-84) position vector with components in meters
psgs85 - output, SGS-85 frame position vector, with components in meters
Reference: [38]
4.111 VECIECEF
Scope:
This MATLAB macro performs the transformation from ECI (Earth Centered Inertial) to
ECEF coordinates for a given position vector and time elapsed since reference time;
WGS-84 earth's rotation rate constant is used.
Usage: pecef =veciecef(peci,dtime)
Description of parameters:
peci - input, ECI position vector (with components in meters)
dtime - input, time elapsed since reference time in seconds
pecef - output, ECEF position vector, with components in same units as the input ECI
position vector
Remark:
The ECI to ECEF transformation takes into account only Earth's rotation, i.e. no Earth's
precession and mutation effects.
Chapter 4 VENUECEF, VENUGD, VENULLW
- Page 4-52 -
External Matlab macros used: wgs84con
4.112 VENUECEF
Scope:
This MATLAB module performs the transformation from ENU (East, North, Up) to
ECEF coordinates for a given position vector and reference latitude/longitude angles.
Usage: pecef =venuecef(penu,lat,lon)
Description of parameters:
penu - input, ENU position vector (with components in meters)
lat - input, reference latitude in radians
lon - input, reference longitude in radians
pecef - output, ECEF position vector, with components in same units as the input ENU
position vector
4.113 VENUGD
Scope:
This MATLAB module performs the transformation from ENU (East, North, Up) to
geodetic coordinates for a given position vector and a reference point.
Usage: pgd =venugd(penu,pgdref)
Description of parameters:
penu - input, ENU position vector, with components in meters
pgdref - input, geodetic position of the reference point, where
pgdref(1) =latitude in radians
pgdref(2) =longitude in radians
pgdref(3) =altitude in meters
pgd - output, geodetic position of the final point, where
pgd(1) =latitude in radians
pgd(2) =longitude in radians
pgd(3) =altitude in meters
External Matlab modules used: tecefgd, tgdecef, venuecef
4.114 VENULLW
Scope:
Chapter 4 VEP, VGDECEF
- Page 4-53 -
This MATLAB module performs the transformation from ENU (East, North, Up) to
wander azimuth local level coordinates for a given position vector and a reference wander
azimuth angle.
Usage: pllw =venullw(penu,waz)
Description of parameters:
penu - input, ENU position vector (with components in meters)
waz - input, wander azimuth angle in radians
pllw - output, local level wander azimuth position vector, with components in
same units as the input ENU vector
Remark:
The coordinate axes for wander azimuth local level frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.115 VEP
Scope:
This MATLAB module computes the value of the vertical error probable (VEP).
Usage: yvep =vep(y)
Description of parameters:
y - input, error vector containing the errors on y axis
yvep - output, vertical error probable (VEP) value
4.116 VGDECEF
Scope:
This MATLAB module performs the transformation from geodetic to ECEF coordinates
for a given position vector specified by the external points in geodetic coordinates; WGS-
84 constants are used.
Usage: pecef =vgdecef(pgd,pgdref)
Description of parameters:
pgd - input, geodetic position of the final point, where
pgd(1) =latitude in radians
pgd(2) =longitude in radians
pgd(3) =altitude in meters
pgdref - input, geodetic position of the reference point, where
pgdref(1) =latitude in radians
Chapter 4 VGDENU, VINSECEF
- Page 4-54 -
pgdref(2) =longitude in radians
pgdref(3) =altitude in meters
pecef - output, ECEF position vector, with components in meters
External Matlab modules used: tgdecef, wgs84con.
4.117 VGDENU
Scope:
This MATLAB module performs the transformation from geodetic to ENU (East, North,
Up) coordinates for a given position vector specified by the external points in geodetic
coordinates; WGS-84 constants are used.
Usage: penu =vgdenu(pgd,pgdref)
Description of parameters:
pgd - input, geodetic position of the final point, where
pgd(1) =latitude in radians
pgd(2) =longitude in radians
pgd(3) =altitude in meters
pgdref - input, geodetic position of the reference point, where
pgdref(1) =latitude in radians
pgdref(2) =longitude in radians
pgdref(3) =altitude in meters
penu - output, ENU position vector, with components in meters
External Matlab modules used: tgdecef, vecefenu, wgs84con.
4.118 VINSECEF
Scope:
This MATLAB module performs the transformation from INS platform frame (Wander /
North, West, Up) to ECEF coordinates for a given position vector and reference
latitude/longitude/wander azimuth angles.
Usage: pecef =vinsecef(pins,lat,lon,waz)
Description of parameters:
pins - input, INS platform position vector (with components in meters)
lat - input, reference latitude in radians
lon - input, reference longitude in radians
waz - input, reference wander azimuth angle in radians
pecef - output, ECEF position vector, with components in same units as the input
INS platform position vector
Chapter 4 VLLWB, VLLWECEF
- Page 4-55 -
4.119 VLLWB
Scope:
This MATLAB module performs the transformation from wander azimuth local level
frame to GPS body frame for a given position vector and reference yaw/pitch/roll angles.
Usage: pb =vllwb(pllw,yaw,pitch,roll)
Description of parameters:
pllw - input, local level wander azimuth position vector (with components in
meters)
yaw - input, yaw angle in radians
pitch - input, pitch angle in radians
roll - input, roll angle in radians
pb - output, GPS body frame position vector (with components in same units as
the input local level wander azimuth position vector)
Remark:
The coordinate axes for wander azimuth local level frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.120 VLLWECEF
Scope:
This MATLAB module performs the transformation from wander azimuth local level
frame to ECEF frame for a given position vector and reference latitude/longitude/ wander
azimuth angles.
Usage: pecef =vllwecef(pllw,lat,lon,waz)
Description of parameters:
pllw - input, local level wander azimuth position vector (with components in
meters)
lat - input, reference latitude in radians
lon - input, reference longitude in radians
waz - input, reference wander azimuth angle in radians
pecef - output, ECEF position vector, with components in same units as the input
local level wander azimuth position vector
Remark:
The coordinate axes for wander azimuth local level frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
Chapter 4 VLLWENU, VP90ECEF, VS85ECEF
- Page 4-56 -
4.121 VLLWENU
Scope:
This MATLAB module performs the transformation from wander azimuth local level
frame to ENU (East, North, Up) frame for a given position vector and a reference wander
azimuth angle.
Usage: penu =vllwenu(pllw,waz)
Description of parameters:
pllw - input, local level wander azimuth position vector (with components in
meters)
waz - input, wander azimuth angle in radians
penu - output, ENU position vector, with components in same units as the input
local level wander azimuth position vector
Remark:
The coordinate axes for wander azimuth local level frame are defined as follows:
x - axis at wander azimuth angle counter-clockwise from East in local level plane,
y - axis at wander azimuth angle counter-clockwise from North in local level plane,
z - axis upward along local normal
4.122 VP90ECEF
Scope:
This MATLAB macro performs the transformation from PZ-90 ("Parametri Zemli 1990",
i.e. earth's parameters 1990) frame to ECEF WGS-84 frame coordinates for a given
position vector with components expressed in meters.
Usage: pecef =vp90ecef(pecef)
Description of parameters:
ppz90 - input, PZ-90 frame position vector, with components in meters
pecef - output, ECEF (WGS-84) position vector with components in meters
Reference: [37]
4.123 VS85ECEF
Scope:
This MATLAB macro performs the transformation from SGS-85 (Soviet Geodetic
System 1985) frame to ECEF WGS-84 frame coordinates for a given position vector with
components expressed in meters.
Usage: pecef =vs85ecef(psgs85)
Chapter 4 WDOP1, WDOP2
- Page 4-57 -
Description of parameters:
psgs85- input, SGS-85 frame position vector, with components in meters
pecef - output, ECEF (WGS-84) position vector with components in meters
Reference: [38]
4.124 WDOP1
Scope:
This MATLAB module computes weighted dilution of precision (WDOP) quantities
when at least three line-of-sight unit vectors are specified, by using a direct method.
Usage: dops =wdop1(g,wf)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it
should be 3 columns)
wf - input, array containing weighting factors, it should be one weighting factor
for each line-of-sight unit vector (in the same order)
wdops - output, weighted dilution of precision quantities
wdops(1) =weighted geometric dilution of precision (WGDOP)
wdops(2) =weighted position dilution of precision (WPDOP)
wdops(3) =weighted horizontal dilution of precision (WHDOP)
wdops(4) =weighted vertical dilution of precision (WVDOP)
wdops(5) =weighted time dilution of precision (WTDOP)
Remark:
When less than four line-of-sight unit vectors are specified the computation is not fully
significant, and it is conducted by using a pseudoinverse matrix instead of an inverse
matrix.
4.125 WDOP2
Scope:
This MATLAB module computes weighted dilution of precision (WDOP) quantities
when four line-of-sight unit vectors are specified, by using a direct method.
Usage: wdops =wdop2(g,wf)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it
should be 3 columns)
wf - input, array containing weighting factors, it should be one weighting factor
for each line-of-sight unit vector (in the same order)
Chapter 4 WDOPV, WGS72CON
- Page 4-58 -
wdops - output, weighted dilution of precision quantities
wdops(1) =weighted geometric dilution of precision (WGDOP)
wdops(2) =weighted position dilution of precision (WPDOP)
wdops(3) =weighted horizontal dilution of precision (WHDOP)
wdops(4) =weighted vertical dilution of precision (WVDOP)
wdops(5) =weighted time dilution of precision (WTDOP)
4.126 WDOPV
Scope:
This MATLAB module computes an approximate value for the weighted dilution of
precision (WDOP) when at least four line-of-sight unit vectors are specified by using an
approximate geometric method [18].
Usage: [wdops,ier] =wdopv(g,wf)
Description of parameters:
g - input, line-of-sight unit vectors, each vector is stored in another row (it
should be 3 columns)
wf - input, array containing weighting factors, it should be one weighting factor
for each line-of-sight unit vector (in the same order)
wdops - output, weighted dilution of precision quantities
wdops(1) =weighted geometric dilution of precision (WGDOP)
wdops(2) =weighted position dilution of precision (WPDOP)
wdops(3) =weighted horizontal dilution of precision (WHDOP)
wdops(4) =weighted vertical dilution of precision (WVDOP)
wdops(5) =weighted time dilution of precision (WTDOP)
ier - output, index of error
=0 computation performed
=1 computation is not performed, the corresponding matrix H is
numerically singular
=2 computation is not performed, numerical error during the computation
of WHDOP
Reference: [18]
4.127 WGS72CON
Scope:
This MATLAB module sets the WGS-72 most used constants as global variables.
Usage: wgs72con
Description of global parameters:
a_smaxis - output, WGS-72 earth semi-major axis in meters
Chapter 4 WGS84CON
- Page 4-59 -
b_smaxis - output, WGS-72 earth semi-minor axis in meters
eccentr - output, WGS-72 earth eccentricity
eccentr2 - output, WGS-72 earth eccentricity squared
flatness - output, WGS-72 flatness (ellipticity)
gravpar - output, WGS-72 gravity parameter in meters**3/sec**2 earth's
gravitational constant (mass of earth including earth's atmosphere)
rot_rate - output, WGS-72 earth rotation rate in radians/second
c_speed - output, speed of light in vacuum in meters/second
ucgrav - output, universal constant of gravity (G) in meters**3/sec**2/Kg
mearth - output, mass of earth (including the atmosphere) (M) in Kg
g0 - output, ellipsoidal equatorial gravity in meters/sec**2
4.128 WGS84CON
Scope:
This MATLAB module sets the WGS-84 most used constants as global variables.
Usage: wgs84con
Description of global parameters:
a_smaxis - output, WGS-84 earth semi-major axis in meters
b_smaxis - output, WGS-84 earth semi-minor axis in meters
eccentr - output, WGS-84 earth eccentricity
eccentr2 - output, WGS-84 earth eccentricity squared
flatness - output, WGS-84 flatness (ellipticity)
eprime - output, WGS-84 second eccentricity
eprime2 - output, WGS-84 second eccentricity squared
onemecc2 - output, WGS-84 one minus eccentricity squared
gravpar - output, WGS-84 gravity parameter in meters**3/sec**2, earth's
gravitational constant (mass of earth including earth's atmosphere)
rot_rate - output, WGS-84 earth rotation rate in radians/second
c_speed - output, speed of light in vacuum in meters/second
ucgrav - output, universal constant of gravity (G) in meters**3/sec**2/Kg
mearth - output, mass of earth (including the atmosphere) (M) in Kg
g0 - output, ellipsoidal equatorial gravity in meters/sec**2
c20 - output, normalized second degree zonal harmonic coefficient of the
gravitational potential (C20)
Chapter 4
- Page 4-60 -
Chapter 5 XAMBIG, XATRANSF
- Page 5-1 -
5.0 DETAILED SPECIFICATIONS FOR M-FILE MAIN PROGRAMS
5.1 XAMBIG
Scope:
This MATLAB program generates ambiguity numbers for a specified number of satellites.
Usage: xambig
Inputs:
From keyboard the user should enter the following data:
- maximum number of satellites used, nrsv (default is 32)
- random number seed value (default is 0)
- selection of the storage data file
- ambfile.mat (default)
- selected name for ASCII data file
- none, no storage
Outputs:
- output file storing the ambiguity number for the number of selected satellites: mat-file
ambfile.mat or defined ASCII data file; the output ambig array has one row and nrsv
columns
- display the ambiguity values for the number of selected satellites.
5.2 XATRANSF
Scope:
This MATLAB program performs the following unit transformations of a specified angle(s):
1) from degrees/minutes/seconds to radians transformation
2) from radians to degrees/minutes/seconds transformation
Usage: xatransf
Inputs:
- name of the output file if selected (the default is the screen)
1) For the degrees/minutes/seconds to radians:
- degrees value of the angle (including sign)
- minutes value of the angle
- seconds value of the angle
The values can be entered from keyboard or from a specified file (in this case each
row/record contains the degrees/minutes/seconds value of an angle).
2) For the radians to degrees/minutes/seconds:
- radians value of the angle (including sign)
The values can be entered from keyboard or from a specified file (in this case each
Chapter 5 XCEPVEP, XCON
- Page 5-2 -
row/record contains the radians value of an angle).
Outputs:
- input/output data stored on the selected output file or displayed on the computer screen,
namely
- values of the input/output angle in radians
- values of the output/input angle in degrees/minutes/seconds
External Matlab modules used: tadmsrad, taraddms
5.3 XCEPVEP
Scope:
This MATLAB program computes the value of circular error probable (CEP) or vertical error
probable (VEP) by using modules cep.m or vep.m.
Usage: xcepvep
Inputs:
- name of the input file containing x-y error data for CEP computation and x error data for
VEP computation; first column contains the x axis error data while the second column
contains the y axis error data
- name of the output file containing the results, optional
Outputs:
- input/output data stored on the selected output file or displayed on screen
External Matlab modules used: cep, vep
5.4 XCON
Scope:
This MATLAB program displays the constants specified by the modules convcon, gpscon,
wgs72con, wgs84con, sgs85con, and pz90con. Each macro sets the constants as global
variables.
Usage: xcon
Inputs:
- selection of the set of constants (see the displayed menu)
Outputs:
- displayed constants
Chapter 5 XDOP, XEBUDGET
- Page 5-3 -
External Matlab modules used: convcon, gpscon, pz90con, sgs85con, wgs72con, wgs84con
5.5 XDOP
Scope:
This MATLAB program computes dilution of precision (DOP) quantities when at least three
line-of-sight unit vectors are specified by using macro dop1.m or macro dop2.m when four
line-of-sight unit vectors are specified.
Usage: xdop
Inputs:
- name of the output file containing the results; the default is the display on screen
- selection of the macro to be used (dop1.m or dop2.m)
- name of the input file containing line-of-sight unit vectors; each row contains a line-of-
sight unit vector
Outputs:
- input/output data stored on the selected output file or displayed on screen
Remark:
When less than four line-of-sight unit vectors are specified the computation is not fully
significant, and it is conducted by using a pseudoinverse matrix instead of an inverse matrix.
External Matlab modules used: dop1, dop2
5.6 XEBUDGET
Scope:
This MATLAB program determines the error budget for a specified input data set.
Usage: xebudget
Inputs:
- input data from keyboard as follows
(1) space segment error
(2) control segment error
(3) user segment, tropo error
(4) user segment, iono error
(5) user segment, multipath error
(6) user segment, receiver error
(7) PDOP value
(8) HDOP value
Chapter 5 XECEF2GD_COMP
- Page 5-4 -
(9) VDOP value
(10) TDOP value
A complete default data set is provided.
Outputs:
- selected input data
- computed quantities, namely
(1) URE (User Range Error), in meters
(2) UEE (User Equipment Error), in meters
(3) URE (User Equivalent Range Error), in meters
(4) SEP (Spherical Error Probable, 50 percentage), in meters
(5) CEP (Circular Error Probable, 50 percentage), in meters
(6) LEP (Linear Error Probable, 50 percentage), in meters
(7) Time Error (50 percentage), in nanoseconds
(8) 3-D (Spherical) Position Error (95 percentage), in meters
(9) 2-D (Horizontal) Position Error (95 percentage), in meters
(10) Actual 2-D (Horizontal) Position Error (95 percentage), in meters
(11) Vertical Position Error (95 percentage), in meters
(12) Actual Vertical Position Error (95 percentage), in meters
(13) Time Error (95 percentage), in nanoseconds
(14) Actual Time Error (95 percentage), in nanoseconds
Remarks:
1) For 2-D Horizontal Position Error (95 percentage) the real percentage is in the range of
95.4% to 98.2%. The "Actual" is adjusted for a circular distribution.
2) For Vertical Position Error (95 percentage) and Time Error (95 percentage) the real
percentage is 95.4% rather than 95%. The "Actual" quantities are adjusted for this
difference.
5.7 XECEF2GD_COMP
Scope:
This MATLAB program performs the comparison between two different algorithms
implementing the ECEF to Geodetic coordinates transformation; WGS-84 constants are used.
Usage: xecef2gd_comp
Inputs:
- name of the output file if selected (the default is the screen)
- input data from the keyboard as follows:
- x-component of the ECEF position, in meters
- y-component of the ECEF position, in meters
- z-component of the ECEF position, in meters
The ECEF coordinates can be entered from keyboard or from a specified file (in this
case the record contains the x, y, and z components).
Chapter 5 XELAZ
- Page 5-5 -
Outputs:
- input/output data stored into the specified output file or displayed on screen
External Matlab macros used: tecefgd, tecefgd2, wgs84con
5.8 XELAZ
Scope:
This Matlab program determines elevation and azimuth angles for specified users and a
specified time interval, for all satellites in-view, and saves into a specified file; WGS-84
constants are used.
Usage: xelaz.m
Inputs:
- reduced almanac data; the default is data file wk749.dat. To create an input data file each
row contains the following quantities, for each satellite:
(1) satellite id, (2) time of applicability (toa), in seconds, (3) semi-major axis (a), in meters,
(4) eccentricity (e), (5) inclination angle at reference time (I_0), in radians, (6) right
ascension at reference time (OMEGA_0), in radians, (7) argument of perigee (omega), in
radians, (8) mean anomaly at reference time (M_0), in radians, (9) rate of right ascension
(OMEGA_DOT), in radians/second
- geographic location(s) for the test; the default is data file xelaz1.dat. The data can be
entered from a selected input file or from keyboard by specifying latitude in radians,
longitude in radians, and altitude above the ellipsoid in meters
- elevation mask angle limit; the default value is 5. degrees
- GPS time of week (simulation time); the default value is 0.
- time step; the default value is 120 seconds
- number of time samples; the default value is 360
- name of the output file; the default is xelaz1.out
- other parameters are initialized by default
Outputs:
- file containing for each time step and for each visible satellite the following (the default file
is xelaz1.out): 1) time step number, 2) user's position index, 3) number of visible satellites,
4) id of visible satellite, 5) elevation angle (radians), 6) azimuth angle (radians). The output
file can be used as input file for the program xpgelaz.m, which executes plots related to
above-listed quantities.
Remarks:
If the structures of the input/output datafiles are changed then the statements related to
reading and/or writing should also be changed.
External Matlab modules used: elevaz, svpalm, tecefgd, tgdecef, vecefenu, wgs84con
Chapter 5 XELIMRC, XFDNT
- Page 5-6 -
5.9 XELIMRC
Scope:
This MATLAB program tests the modules elimrow and elimcol.
Usage: xelimrc
Inputs:
- number of rows of the input matrix
- number of columns of the input matrix
Outputs:
- the resultant matrices after the elimination of rows/columns are displayed on the screen
External Matlab modules used: elimcol, elimrow
5.10 XFDNT
Scope:
This MATLAB program determines the fault detection normalized thresholds used in the
Receiver Autonomous Integrity Monitoring (RAIM), for a specified input data set.
Usage: xfdnt
Inputs:
- input data for probability of false alarm; a default value (of 3.33333e-7) can be selected
- name of the output file (optional); the default is the screen
Outputs:
- values of the selected input data
- computed fault detection normalized thresholds (for each degree of freedom, from 1 to 16)
Remark:
1) For the first degree of freedom case a Gaussian distribution is assumed, while for higher
degree of freedom cases a Chi-square distribution are assumed.
2) For the RAIM with constant false alarm thresholds [7], the un-normalized test statistic
thresholds can be determined as follows:
test statistic thresholds =(normalized threshold) * (standard deviation of
the measurements error).
References: [7], [27]
External Matlab macros used: chi2_dof, fdnt, gauss_1
Chapter 5 XFOM, XGCDR
- Page 5-7 -
5.11 XFOM
Scope:
This MATLAB program plots the figure of merit value versus the estimated position error.
Usage: xfom
Inputs:
- selection of the range of estimated position error; the default is 1 to 6000 meters
Outputs:
- plot of the figure of merit (based on ICD-059 table versus) versus estimated position error
External Matlab macros used: fom
5.12 XGCDR
Scope:
This MATLAB program determines great circle dead reckoning trajectory assuming a
spherical earth with radius equal to the local radius and constant altitude; WGS-84 constants
are used.
Usage: xgcdr
Inputs:
Selection of the default input data or enter the following input data from keyboard:
- initial latitude, in radians
- initial longitude, in radians
- altitude, in meters
- heading, in radians
- speed, in meters/second
- initial time, in seconds
- time step, in seconds
- number of steps
- selection of the output data file or exit the results on screen,
- selection of the plot option
Outputs:
- the recorded output data (at each time step) are as follows:
- time, in seconds,
- latitude, in radians,
- longitude, in radians,
- altitude, in meters,
- velocity north component, in meters/second,
- velocity east component, in meters/second
Chapter 5 XGCNAC, XGDOPV
- Page 5-8 -
on a specified file or on screen
- plot of the generated longitude-latitude trajectory (optional)
External Matlab macros used: convcon, geodes, wgs84con
5.13 XGCNAV
Scope:
This MATLAB program determines great circle navigation position velocity, and accelera-
tion when the ECEF initial position and velocity are specified; WGS-84 constants are used.
Usage: xgcnav
Inputs:
Selection of the default input data or enter the following input data from keyboard:
- initial ECEF x-component position, in meters,
- initial ECEF y-component position, in meters,
- initial ECEF z-component position, in meters,
- initial ECEF x-component velocity, in meters/second,
- initial ECEF y-component velocity, in meters/second,
- initial ECEF z-component velocity, in meters/second,
- time step, in seconds,
- number of steps
- selection of the output data file or exit the results on screen
Outputs:
- the recorded output data (at each time step) are as follows:
- time, in seconds,
- ECEF position, the components in meters,
- great circle velocity, the components in meters/second,
- great circle acceleration, the components in meters/second^2, on a specified file or on
screen
- plot of the generated ECEF trajectory in 3D and/or longitude-latitude trajectory (optional)
External Matlab macros used: gcnav, tecefgd, uverv, wgs84con
5.14 XGDOPV
Scope:
This MATLAB program computes an approximate value for the geometric dilution of
precision (GDOP) by using an approximate geometric method [18].
Chapter 5 XGENRN
- Page 5-9 -
Usage: xgdopv
Inputs:
- name of the output file containing the results
- name of the input file containing line-of-sight unit vectors; each row contains a line-of-
sight unit vector
Outputs:
- input/output data stored on the selected output file or displayed on screen
Reference: [18]
External Matlab modules used: gdopv
5.15 XGENRN
Scope:
This MATLAB program generates random numbers with normal (Gaussian) distribution,
with mean and standard deviation specified; plots the generated sequence, histogram, and the
normalized auto-correlation sequence (optional).
Usage: xgenrn
Inputs:
- number of random numbers to be generated (nstep)
- mean of random numbers to be generated
- standard deviation of random numbers to be generated
- value of the initial seed
- name of the output file, if the generated data are saved
Remarks:
The generation of the random number sequence is executed in one step, i.e. one call to the
module genrn.
Outputs:
- random numbers sequence plot
- histogram plot
- plot of the normalized auto-correlation sequence (optional)
External Matlab modules used: genrn1, rms, xcorr (optional, from Signal Processing
Toolbox)
Chapter 5 XGEODES, XGEOIDH
- Page 5-10 -
5.16 XGEODES
Scope:
This MATLAB program determines geodesic when the departure and destination points are
specified [1], [2]; WGS-84 earth model is used.
Usage: xgeodes
Inputs:
- default data are given. The data are specified in the following order
(each row represents a departure-destination pair):
- lat1, departure point latitude, in degrees
- lon1, departure point longitude, in degrees
- lat2, departure point latitude, in degrees
- lon2, departure point longitude, in degrees
- name of the input data file (optional)
- departure-destination data (optional)
- name of the output file (optional)
- selection of the longitude-latitude plot of the selected waypoints (optional)
Outputs:
- input/output data stored on the selected output file or displayed on screen. For each pair of
departure-destination point the range, departure bearing and destination bearing are
determined
- plot of the longitude-latitude of the specified waypoints (with geodesic distance) - optional
Remark:
The program can be easily modified to input latitude/longitude data in radians or degrees/
minutes/ seconds.
References: [1], [2]
External Matlab macros used: convcon, geodes, wgs84con
5.17 XGEOIDH
Scope:
This MATLAB program computes the WGS-84 geoid height correction for the current
location specified by latitude and longitude. Optional, the worldwide WGS-84 geoid height
correction contour map is plotted.
Usage: xgeoidh
Inputs:
- name of the output file containing the results
Chapter 5 XGMP1
- Page 5-11 -
- default - WGS-84 geoid heights data file (tgeoid84.dat)
- latitude in radians, - pi/2 to pi/2
- longitude in radians, 0 to 2*pi (automatically adjustable -2*pi to 4*pi)
- selection of the contour map (optional)
Outputs:
- input/output data stored on the selected output file or displayed on screen; geoid height
correction in meters
- plot of the worldwide WGS-84 geoid height correction contour map
Remark:
The program can be easily modified to enter a generic geoid height correction earth model
instead of the WGS-84 earth model (default).
Reference: [31]
External Matlab macros used: geoidh
5.18 XGMP1
Scope:
This MATLAB program generates first order Gauss-Markov sequence, plots the generated
sequence, histogram, and the normalized auto-correlation sequence (optional).
Usage: xgmp1
Inputs:
- number of steps in the sequence to be generated (nstep)
- value of the time constant (1./beta), in seconds
- standard deviation of the Gauss-Markov process (sigx)
- time interval between samples (deltat), in seconds
- value of the initial seed, e.g. 0
- name of the output file (optional), if the generated data are saved
Outputs:
- plot of the first order Gauss-Markov sequence
- histogram plot
- plot of the normalized auto-correlation sequence (optional)
Remark:
A default set of data for beta, sigx, and deltat is provided.
External Matlab modules used: genrn2, gmp1, rms, xcorr (optional, from Signal
Processing Toolbox)
Chapter 5 XGMP2, XGPSLSEC
- Page 5-12 -
5.19 XGMP2
Scope:
This MATLAB program generates second order Gauss-Markov sequence, plots the generated
sequence and determines and plots the normalized auto-correlation sequence.
Usage: xgmp2
Inputs:
- number of steps in the sequence to be generated (nstep)
- the value of the natural frequency in radians/second
- the value of the damping factor (less than 1.)
- the value of the constant c**2 in meters**2
- the value of the time step in seconds
- name of the output file, if the generated data are saved
Outputs:
- plot of the second order Gauss-Markov sequence - first state component
- plot of the normalized auto-correlation sequence - first state component
- plot of the second order Gauss-Markov sequence - second state component
- plot of the normalized auto-correlation sequence - second state component
Remark:
A default set of input data is provided.
External Matlab modules used: genrn2, gmp2, rms, xcorr (optional, from Signal
Processing Toolbox)
5.20 XGPSLSEC
Scope:
This MATLAB program determines the UTC leap seconds value for a specified year between
1980 and 2059; after the year 1999 the leap second value is only an estimate, and linear
interpolation between values is recommended.
Usage: xgpslsec
Inputs:
- name of the output file if selected (the default is the screen)
- year value (between 1980 and 2059)
Outputs:
- input/output data stored into the specified output file or displayed on screen
- plot of UTC leap seconds (for the period 1980-2000) versus year (optional)
Chapter 5 XGPSTIME, XGRIDW
- Page 5-13 -
5.21 XGPSTIME
Scope:
This MATLAB program performs the following GPS time related transformation:
1) from (year, month, day) to (GPS week, GPS roll number, day of week)
2) from (GPS week, day of week, GPS roll number) to (day of week, day, month, year)
3) from (day of week, hour, minute, second) to (time of week)
4) from (time of week) to (day of week, hour, minute, second)
Usage: xgpstime
Inputs:
- name of the output file if selected (the default is the screen)
1) For the (year, month, day) to (GPS week, GPS roll number, day of
week):
- year (1980 and greater)
- month (1 to 12)
- day (1 to 31)
2) For the (GPS week, day of week, GPS roll number) to (day of week, day, month, year):
- GPS week (0 to 1023)
- day of week (0 to 6)
- GPS roll number (0 to ...)
3) For the (day of week, hour, minute, second) to (time of week):
- day of week (0 to 6)
- hour (0 to 23)
- minute (0 to 59)
- second (0 to 60)
4) For the (time of week) to (day of week, hour, minute, second):
- time of week (0 to 604800)
Outputs:
- input/output data stored into the specified output file or displayed on screen
5.22 XGRIDW
Scope:
This MATLAB program generates and plots the longitude-latitude WAAS grid as specified
in [30].
Usage: xgridw
Inputs:
- selection of option to save the generated data; the mat-file fgridw.mat is the output file
Outputs:
Chapter 5 XHMATALL, XHPE
- Page 5-14 -
- generated latitude-longitude WAAS grid data into the specified mat-file (optional)
- graph of the latitude-longitude WAAS grid (2353 space points)
Reference: [30]
External Matlab macros used: gridwaas
5.23 XHMATALL
Scope:
This Matlab program tests the construction of the H matrix (based on line-of-sight, baro and
clock measurements). The following macros are tested: hmat, hmatb, hmatc and hmatbc.
Usage: xhmatall
Inputs:
- name of the input file containing ECEF satellite position
- name of the input file containing ECEF user position
- name of the output file, if the selection to store the data is made
Outputs:
- results stored into the output file or displayed on screen
Remark:
At least 4 measurements are required for the construction of H matrix.
External Matlab macros used: hmat, hmatb, hmatc, hmatbc.
5.24 XHPE
Scope:
This MATLAB program determines the horizontal position error (range) when latitude and
longitude for two points are given; WGS-84 constants are used.
Usage: xhpe
Inputs:
- selection of the output data file or dispay the results on screen
- input from keyboard, latitude of the first position point, in radians or degrees/minutes/
seconds
- input from keyboard, longitude of the first position point, in radians or degrees/minutes/
seconds
- input from keyboard, latitude of the second position point, in radians or degrees/minutes/
seconds
Chapter 5 XIONOC
- Page 5-15 -
- input from keyboard, longitude of the second position point, in radians or degrees/minutes/
seconds
Outputs:
- save on a specified file or display on screen, the input data and the horizontal position
error (range) between the two defined position points
Remark:
The computation accuracy is limited due to algorithm approximations; it is recommended
only when the range is less than 100 km.
External Matlab modules used: hpe, tadmsrad, wgs84con
5.25 XIONOC
Scope:
This Matlab program determines iono corrections for a specified satellite, time interval, and a
selected location by using the Klobuchar model; several representative plots are available.
WGS-84 constants are used.
Usage: xionoc
Inputs:
- name of the input almanac data file; the default is data file wk749.dat. Each record contains
the data related to a specific satellite in the following order:
1) satellite id,
2) satellite time of applicability (toa), in seconds,
3) satellite semi-major axis (a), in meters,
4) satellite eccentricity (e),
5) satellite orbital inclination (I_0), in radians,
6) satellite right ascension at toa (OMEGA_0), in radians,
7) satellite argument of perigee (omega), in radians,
8) satellite mean anomaly (M_0), in radians,
9) satellite rate of right ascension (OMEGA_DOT), radians/second
- geographic location for the test (latitude in degrees, longitude in degrees, altitude in
meters); the default is data file locat1.dat
- elevation angle limit; the default value is 5 degrees
- initial simulation time (GPS time of week), in seconds; the default value is 0.
- number of time samples and time step value (if more than one time step); the default values
are 1 and 300, respectively,
- name of the output file (optional); the default name is xionoc1.out
- other parameters are initialized by default
Outputs:
- iono correction data into a specified file (optional); each record contains iono correction
Chapter 5 XKFCOV
- Page 5-16 -
data for all satellites at a time sample (the value 0. is recorded when the satellite is not
visible)
- plot of number of visible satellites versus time sample number, when time sample number
is greater than 1
- 3-D plot of iono correction versus time sample number and satellite id, when time sample
number is greater than 1
- plot of iono correction versus satellite id for a selected time sample number
- plot of iono correction versus time number for a selected satellite, when time sample
number is greater than 1
References: [25], [29]
External Matlab macros used: eleva, ionoc, ionocon, svpalm, tecefgd, tgdecef, uverv,
vecefenu, wgs84con
5.26 XKFCOV
Scope:
This MATLAB program performs covariance analysis by using the conventional or alternate
conventional Kalman filter formulation.
Usage: xkfcov
Inputs:
- number of steps to be processed (nstep)
- selection of the variant to be used
- selection of the input data from a selected input data file or the default input data set.
The structure of the input file is as follows:
-- first row contains the values for state dimension (n) and measurement dimension (m)
-- next n rows contain the corresponding rows of the transition matrix (phi)
-- next n rows contain the corresponding rows of the process noise matrix (q)
-- next m rows contain the corresponding rows of the observation matrix (h)
-- next m rows contain the corresponding rows of the measurement noise matrix (r)
-- next n rows contain the corresponding rows of the initial covariance matrix (depending
on the variant used)
- index of the state covariance to be saved or/and plotted
- name of the output file, if the generated data are saved
Outputs:
- output file containing the generated data (optional). At each time step the following data
are stored: step number, standard deviation after and before measurement incorporation
- plot of the selected state standard deviation versus time sequence
External Matlab macros used: kfcov, kfcova
Chapter 5 XMAPDOP
- Page 5-17 -
5.27 XMAPDOP
Scope:
This Matlab program determines repartition of the number of visible satellites and the
corresponding DOPs for a specified geographical area.
Usage: xmapdop
Inputs:
- name of the input almanac data file; the default is data file wk749.dat. Each record contains
the data related to a satellite in the following order:
1) satellite id,
2) satellite time of applicability (toa), in seconds,
3) satellite semi-major axis (a), in meters,
4) satellite eccentricity (e),
5) satellite orbital inclination (I_0), in radians,
6) satellite right ascension at toa (OMEGA_0), in radians,
7) satellite argument of perigee (omega), in radians,
8) satellite mean anomaly (M_0), in radians,
9) satellite rate of right ascension (OMEGA_DOT), radians/second
- geographic locations for the test; the default is data file map01.dat. The first record of the
file should contain the latitude limits while the second record should contain the longitude
limits, both in degrees
- elevation angle limit; the default value is 5 degrees
- simulation time (GPS time of week), in seconds; the default value is 0.
- selection of xdop to be plotted
- number of time samples and time step value, in seconds (if more than one time step is
selected)
- name of the output file for satellite visibility statistics (optional)
- other parameters are initialized by default; the default latitude-longitude grid is 25 by 41
(default)
Outputs:
- plot presenting selected dop value and/or number of visible satellites versus latitude-
longitude location
- table containing test summary and satellite visibility statistics (optional)
Remark:
If more than one step then only the results from the last time sample are plotted.
External Matlab macros used: dop1, eleva, svpalm, tgdecef, uverv, vecefenu,
wgs84con, and world map data file worldmap.mat (optional)
Chapter 5 XMISDAT, XMPATH
- Page 5-18 -
5.28 XMISDAT
Scope:
Determine the missing data into a specified column of an input table, when the expected
increment between two consecutive data is given.
Usage: xmisdat
Inputs:
- selection of the input data file (with extension), e.g. xmisdat1.dat
- selection of the column number to be analyzed, e.g. 3
- selection the increment value between two consecutive data, e.g. 0.1
Outputs:
- the following output data are listed for the selected column of the specified data table: first
record value, last record value, maximum number of records, number of missing records,
and specific missing values.
5.29 XMPATH
Scope:
This MATLAB program generates and saves the multipath pseudorange errors for a specified
number of satellites and time steps.
Usage: xmpath
Inputs:
From keyboard the user should enter the following data:
- maximum number of satellites used, nrsv (default is 12)
- number of time steps to be generated, nrstep (default is 1800)
- random number seed value (default is 0)
- selection of the storage data file
-- mpfile.mat
-- selected name for ASCII data file
-- none, no storage (default)
- selection of multipath plots from generated data
- satellite(s) number for which the generated data is plotted
- application specific parameters are initialized by default (see sigma, order and wn) and
time step is 1 second
Outputs:
- output file storing the generated multipath pseudorange errors, mat-file pfile.mat or defined
ASCII data file; the output array has nrstep rows and nrsv columns, each row contains
multipath data for a specific time step and all selected satellites
Chapter 5 XMTRANSF
- Page 5-19 -
- plot of multipath pseudorange errors versus time step, for specified satellites
Reference: [28]
External Matlab macros used: rms
5.30 XMTRANSF
Scope:
This MATLAB program constructs the following coordinate transformation matrices:
1) from ECEF to ENU coordinates
2) from ENU to ECEF coordinates
3) from ECEF to LLWA coordinates
4) from LLWA to ECEF coordinates
5) from ECEF to INS coordinates
6) from INS to ECEF coordinates
7) from ENU to LLWA coordinates
8) from LLWA to ENU coordinates
9) from LLWA to GPS body coordinates
10) from GPS body to LLWA coordinates
11) from ECEF to ECI coordinates
12) from ECI to ECEF coordinates
Usage: xmtransf
Inputs:
- name of the output file if selected (the default is the screen)
1) For the ECEF/ENU to ENU/ECEF transformation:
- latitude, in radians
- latitude, in radians
2) For the ECEF/LLWA to LLWA/ECEF transformation:
- latitude, in radians
- longitude, in radians
- wander azimuth angle, in radians
3) For the ECEF/INS to INS/ECEF transformation:
- latitude, in radians
- longitude, in radians
- wander azimuth angle, in radians
4) For the ENU/LLWA to LLWA/ENU transformation:
- wander azimuth angle, in radians
5) For the LLWA/GPS Body to GPS Body/LLWA transformation:
- yaw angle, in radians
- pitch angle, in radians
- roll angle, in radians
Chapter 5 XMUDDU, XMUDM
- Page 5-20 -
6) For the ECEF/ECI to ECI/ECEF transformation:
- time elapsed since reference time, in seconds
Outputs:
- input/output data stored into the specified output file or displayed on screen
External Matlab modules used: mecefenu, menuecef, mecefllw, mllwecef, mecefins,
minsecef, menullw, mllwenu, mllwb, mbllw, mecefeci, meciecef, wgs84con
5.31 XMUDDU
Scope:
This MATLAB program executes the decomposition and reconstruction of a real symmetric
positive (semi)definite matrix into and from its U-D factors.
Usage: xmuddu
Inputs:
- name of the output file if selected; the default is the screen
- dimension of state vector n, n 2
- elements of the input matrix A, real array of length n*(n+1)/2, only the upper triangular
part, columnwise, is stored
- computation accuracy (tolerance), selected default is machine dependent accuracy eps
Outputs:
- input/output data stored into the specified output file or displayed on screen
External Matlab modules used: mudd, msc2f, mudc2f, mcud
5.32 XMUDM
Scope:
This MATLAB program tests the macros: mudm, mudm1 and mreast, the implementation of
the discrete Kalman filter measurement updating using Bierman's U-D measurement update
algorithm. Only a scalar measurement is processed, and the U-D covariance factors and the
state estimate (optional) are updated. The macro mudm has the scalar measurement as an
input, while the macro mudm1 has the measurement residual as an input. The macro mreast
executes the measurement reasonableness test for a specific measurement.
Usage: xmudm
Inputs:
- name of the output file if selected; the default is the screen
- dimension of state vector n, n 2
Chapter 5 XOPCR
- Page 5-21 -
- elements of the U-D factors, ud, real array of length (n+1)*(n+2)/2. The first n*(n+1)/2
elements store the input/output U-D factors; the D elements are stored on diagonal.
The last n+1 elements store the input/output state vector x and the scalar value z-
h**(transpose)*x(a priori) in ud((n+1)*(n+2)/2).
If index =0 then the state x (and z) need not be included and the dimension of the
array should be n*(n+1)/2.
- measurement variance, r
- vector of measurement coefficients (first n elements) and h(n+1) =z if index =0.
If index =0 the dimension of the array h should be n.
- index of updating type
= 0 then only the U-D factors are updated (the state is not updated)
0 then the U-D factors and state are updated
- reasonableness test threshold
Outputs:
- input/output data stored into the specified output file or displayed on screen
The output data are as follows:
- for the computation executed by using macro mreast
- a pass/fail test message
- for the computation executed by using macro mudm
- UD matrix (output)
- state vector (output), optional
- for the computation executed by using macro mudm1
- UD matrix (output)
- state vector (output), optional
External Matlab modules used: mreast, mudc2f, mudm, mudm1
5.33 XOPCR
Scope:
This program determines operation counts (flops) for four different implementations of
RAIM algorithm (only the computation of the. decision variable for the RAIM algorithm
proposed by Sturza [22]).
Usage: xopcr
Inputs:
- name of the input file containing line-of-sight unit vectors, each vector is stored in another
row (it should be 3 columns)
- name of the output file containing the results
Outputs:
- table containing the computed operation counts (flops) for all four implementations
Chapter 5 XPBAR, XPBIAS
- Page 5-22 -
References: [10], [22]
5.34 XPBAR
Scope:
This MATLAB program plots a bar graph for a selected column from an ASCII data file
against the selected x-axis column from the same ASCII file; manual scaling is available. In
addition, the selected bar graph can incorporate statistics, i.e. mean, standard deviation and
root mean square (rms).
Usage: xpbar
Inputs:
- name of the ASCII input data file,
- selected x-axis column index,
- column number to be bar-plotted,
- title of the plot,
- y-axis label,
- x-axis label,
- optional, new axes limits [xmin xmax ymin ymax].
Outputs:
- selected bar-graph
Remarks:
The user can select the x-axis column; the other columns are used for y-axis coordinates.
Each y column data (when selected) is independently bar-plotted against x column data.
The computed/listed statistics is for the selected range of the specified bar-graph.
External Matlab modules used: rms
5.35 XPBIAS
Scope:
This MATLAB program computes the value of the parity bias (pbiasb); for the 5 satellites
case the Gaussian distribution is used, while for 6 up to 14 satellites case the Chi-square
distribution is used [26].
Usage: xpbias
Inputs:
- probability of missed detection (pmd)
- td_table, table containing fault detection normalized thresholds td for degree-of-freedom
(dof) 1 to 10 and the corresponding probability of false alarm (pfa); a default table is given
Chapter 5 XPELAZA
- Page 5-23 -
for pfa =3.3333e-7
- for degree-of-freedom =1 (Gausssian ditribution)
--> initial guess for pbiasb
for degree-of-freedom >=2 (Chi-square distribution)
--> initial guess for lambda
Outputs:
- input data (normalized thresholds, pfa and pmd) for dof 1 to 10
- parity bias (pbiasb) for a specified set of input data for dof 1 to 10
Remark:
1) Table td_table can be generated by using the program XFDNT.m.
2) The parity bias values can be used in the computation of horizontal protection limit, and
fault detection availability in the case of RAIM with constant false alarm
Reference: [26]
External Matlab macros used: fbias_c.m, fbias_g.m, ncchi2_2.m, ncchi2_3.m,
ncchi2_4.m, ncchi2_5.m , ncchi2_6.m, ncchi2_7.m,
ncchi2_8.m ncchi2_9.m, ncchi2_10.m
5.36 XPELAZA
Scope:
This Matlab program executes the plots of azimuth-elevation and number of visible satellites
for a specified user's position, almanac and time interval, for all satellites in-view; WGS-84
constants are used.
Usage: xpelaza
Inputs:
- reduced almanac data; the default is data file wk749.dat. To create an input data file each
row contains the following quantities, for each satellite: 1) satellite id, 2) time of
applicability (toa), in seconds, 3) semi-major axis (a), in meters, 4) eccentricity (e), 5)
inclination angle at reference time (I_0), in radians, 6) right ascension at reference time
(OMEGA_0), in radians, 7) argument of perigee (omega), in radians 8) mean anomaly at
reference time (M_0), in radians, 9) rate of right ascension (OMEGA_DOT), in radians/
second
- geographic location(s) for the test; the default is data file xelaz1.dat. The data can be
entered from a selected input file or from keyboard by specifying latitude in radians,
longitude in radians, and altitude above the ellipsoid in meters
- elevation mask angle limit; the default value is 5. degrees
- simulation time (GPS time of week); the default value is 0.
- time step; the default value is 120 seconds
- number of time samples; the default value is 60
Chapter 5 XPELAZS
- Page 5-24 -
- name of the output file; the default is xelaz1.out
- other parameters are initialized by default
Outputs:
- azimuth-elevation plot, for all satellites in view, and for selected
- number of visible satellites plot
External Matlab macros used: elevaz, svpalm, tecefgd, tgdecef, vecefenu, wgs84con
5.37 XPELAZS
Scope:
This MATLAB program plots graphs related to the number of visible satellites, elevation and
azimuth angles, and azimuth-elevation configuration for a specified satellite and selected
user; the input file can be generated by the program xelaz.m.
Usage: xpelazs
Inputs:
- name of the input file; the default is xpgelaz1.dat (i.e. xelaz1.out generated by the program
xelaza.m). The file contains for each time step and for each visible satellite the following:
1)time step number, 2) user's position index, 3) number of visible satellites, 4) id of visible
satellite, 5) elevation angle, 6) azimuth angle
- selected time steps in seconds (see also program xelaza.m) - from keyboard; the default is
120 seconds
- selected satellite index to be analyzed - from keyboard
- selected user's location index to be analyzed - from keyboard
- selected graph type (from the menu) for a selected satellite and specified user, namely:
1) number of visible satellites versus Time,
2) elevation angle versus Time,
3) azimuth angle versus time,
4) elevation and azimuth angles versus Time,
5) elevation versus azimuth (polar plot)
Outputs:
- selected graphs
Remarks:
For a specific interval, manual scaling and statistics are available by using several other
programs, for example xyp1s.
External Matlab macros used: selectd
Chapter 5 XPFWLS
- Page 5-25 -
5.38 XPFWLS
Scope:
This Matlab program determines position fix using weighted least squares algorithm; the
horizontal position error can be plotted and/or recorded into a specified output file. It is
assumed that the user is stationary and the pseudorange error at each time step are randomly
generated. WGS-84 constants are used.
Usage: xpfwls
Inputs:
- name of the input almanac data file; the default is data file wk749.dat. Each record contains
the nine data related to a satellite in the following order:
1) satellite id,
2) satellite time of applicability (toa), in seconds,
3) satellite semi-major axis (a), in meters,
4) satellite eccentricity (e),
5) satellite orbital inclination (I_0), in radians,
6) satellite right ascension at toa (OMEGA_0), in radians,
7) satellite argument of perigee (omega), in radians,
8) satellite mean anomaly (M_0), in radians,
9) satellite rate of right ascension (OMEGA_DOT), radians/second
- user's true position (latitude, longitude and altitude) entered from keyboard or a specified
data file
-- elevation angle limit in degrees; the default is 5. degrees
-- selection of the measurement error standard deviation; the default is 33.3 meters for SPS
with SA on and 6.5 meters for SPS with SA off; at the same time specific uniformly
distributed weighted factors are selected for up to 33 satellite measurements
-- initial simulation time (GPS time of week); the default value is 0.
-- number of time steps
-- time step, in seconds
-- name of the output file (optional)
-- selection of the graph
- other parameters are initialized by default (for example, weighting factors)
Outputs:
- file containing data for each time step (time step number, time, number of visible satellites,
horizontal position error, 3-component position error in ENU frame) (see file pf2)
- graph of horizontal (East-North) position error
- graph of East/North/Up position error versus time step
- graph of magnitudes of horizontal/vertival/3-dimensional position error versus time step
Remark:
The program can be modified to have a selection of weighting factors instead of using the
default values.
Chapter 5 XPPVA, XPPVAJ
- Page 5-26 -
External Matlab macros used: convcon, eleva, genrn, svpalm, uverv, vecefenu, wgs84con
5.39 XPPVA
Scope:
This MATLAB program determines acceleration from the input data of time, position and
velocity, and plots all relevant trajectory information.
Usage: xppva
Inputs:
- selection of the (1) default data file(s) or (2) user's defined data file.
Each record of the ASCII input data file contains the following data:
-- time, in seconds
-- latitude, in radians
-- longitude, in radians
-- altitude, in meters
-- East velocity component, in meters/second
-- North velocity component, in meters/second
-- Up velocity component, in meters/second
- name of the scenario/trajectory, e.g. Low/Medium/High Dynamics
Outputs:
- the following plots are executed
-- plot 1 - trajectory latitude/longitude/altitude versus time
-- plot 2 - trajectory latitude versus longitude
-- plot 3 - trajectory East/North/Up velocity versus time
-- plot 4 - trajectory East/North/Up acceleration versus time
-- plot 5 - trajectory velocity/acceleration magnitude versus time
5.40 XPPVAJ
Scope:
This MATLAB program determines acceleration and jerk from the input data of time,
position and velocity, and plots all relevant trajectory information.
Usage: xppvaj
Inputs:
- name of the ASCII input data file,
Each record of the ASCII input data file contains the following data:
-- time, in seconds
-- latitude, in radians
Chapter 5 XPRADR
- Page 5-27 -
-- longitude, in radians
-- altitude, in meters
-- East velocity component, in meters/second
-- North velocity component, in meters/second
-- Up velocity component, in meters/second
- name of the scenario/trajectory, e.g. Low/Medium/High Dynamics
Outputs:
- the following plots are executed
-- plot 1 - trajectory latitude/longitude/altitude versus time
-- plot 2 - trajectory latitude versus longitude
-- plot 3 - trajectory East/North/Up velocity versus time
-- plot 4 - trajectory East/North/Up acceleration versus time
-- plot 5 - trajectory East/North/Up jerk versus time
-- plot 6 - trajectory velocity/acceleration magnitude versus time
5.41 XPRADR
Scope:
This Matlab program determines pseudorange and accumulated delta range for a specified
satellite. WGS-84 constants are used.
Usage: xpradr
Inputs:
- name of the input almanac data file; the default is data file wk749.dat. Each record contains
the eight data related to a satellite in the following order:
(1) satellite id,
(2) satellite time of applicability (toa), in seconds,
(3) satellite semi-major axis (a), in meters,
(4) satellite eccentricity (e),
(5) satellite orbital inclination (I_0), in radians,
(6) satellite right ascension at toa (OMEGA_0), in radians,
(7) satellite argument of perigee (omega), in radians,
(8) satellite mean anomaly (M_0), in radians,
(9) satellite rate of right ascension (OMEGA_DOT), radians/second
- geographic location for the test (latitude in degrees, longitude in degrees, altitude in
meters); the default is data file locat1.dat
- elevation angle limit; the default value is 5 degrees
- initial simulation time (GPS time of week), in seconds; the default value is 0.
- number of time samples and time step value (if more than one time step); the default values
are 1 and 300, respectively,
- selection of value for model flags as follows
flags(1) - iono error flag (0 value means iono is not used)
flags(2) - tropo error flag (0 value means tropo is not used)
Chapter 5 XPTRANSF
- Page 5-28 -
flags(3) - SA error flag (0 value means SA error is not used)
flags(4) - multipath flag (0 value means multipath is not used)
flags(5) - user clock bias flag (0 value means clock bias is not used)
flags(6) - earth rotation error flag (0 value means it is not used)
flags(7) - pseudorange noise flag (0 value means it is not used)
flags(8) - carrier phase flag (0 value means is not generated)
flags(9) - delta range noise flag (0 value means is not used)
- selection of a satellite index to be plotted (pseudorange and accumulated delta range)
- other parameters are initialized by default
Note that some data are transmitted to the module pradr by globals.
Outputs:
- plots of number of visible satellites and repartition of visible satellites versus time sample number,
- plot of all pseudoranges versus time sample number
- plot of all accumulated delta ranges versus time sample number
- plot of pseudorange and accumulated delta range for a selected satellite
References: [25], [29]
External Matlab macros used: eleva, ionoc, ionocon, svpalm, tecefgd, tgdecef, uverv,
vecefenu, wgs84con,
5.42 XPTRANSF
Scope:
This MATLAB program performs the following coordinate transformations:
1) from ECEF to Geodetic coordinates
2) from Geodetic to ECEF coordinates
WGS-84 constants are used.
Usage: xptransf
Inputs:
- name of the output file if selected (the default is the screen)
- input data from keyboard as follows:
1) For the ECEF to Geodetic transformation:
- x-component of the ECEF position, in meters
- y-component of the ECEF position, in meters
- z-component of the ECEF position, in meters
The ECEF coordinates can be entered from keyboard or from a specified file (in this
case each row/record contains the x, y, and z components)
2) For the Geodetic to ECEF transformation:
- latitude of the position, in radians or degrees/minutes/seconds
- longitude of the position, in radians or degrees/minutes/seconds
- altitude (above ellipsoid) of the position, in meters
Chapter 5 XQRUPA, XRAIMDA
- Page 5-29 -
The Geodetic coordinates can be entered from keyboard or from a specified file (in this case
each row/record contains the latitude, longitude and altitude of a specific point) with 3 or 7
columns when latitude/longitude is entered in radians or in degrees/minutes/seconds,
respectively.
Outputs:
- input/output data stored into the specified output file or displayed on screen
External Matlab modules used: tadmsrad, taraddms, tecefgd2, tgdecef, wgs84con
5.43 XQRUPA
Scope:
This MATLAB program tests the updating algorithm for Q-R factorization of the modified
measurement matrix when a new clock measurement is added.
Usage: xqrupa
Inputs:
- name of the output file if selected; the default is the screen
- line-of-sight for the satellites used, entered from a specified file or the specified default
values
- ratio between pseudorange measurements standard deviation and clock standard
deviation (denoted by alpha), entered from a specified file or the specified default values
Outputs:
- input/output data stored into the specified output file or displayed on screen; operation
count summary for two methods (direct Q-R re-factorization and updating Q-R factoriza-
tion) is included
Reference: [10]
External Matlab modules used: qrupa
5.44 XRAIMDA
Scope:
This Matlab program determines the Receiver Autonomous Integrity Monitoring (RAIM)
fault detection availability based on a constant false alarm rate algorithm [1], [7]. WGS-84
constants are used.
Usage: xraimda
Inputs:
- almanac data; the default file is svprime.dat. Each record contains the nine data related
Chapter 5 XRAIMDA
- Page 5-30 -
to a satellite in the following order:
1) satellite id,
2) satellite time of applicability (toa), in seconds,
3) satellite semi-major axis (a), in meters,
4) satellite eccentricity (e),
5) satellite orbital inclination (I_0), in radians,
6) satellite right ascension at toa (OMEGA_0), in radians,
7) satellite argument of perigee (omega), in radians,
8) satellite mean anomaly (M_0), in radians,
9) satellite rate of right ascension (OMEGA_DOT), radians/second
- geographic locations for the test; the default is data file mops24.dat. Each record contains
the data related to a location in the following order: latitude (degrees), longitude (degrees),
altitude (meters)
- elevation mask angle limit in degrees; the default is 5. degrees
- GPS receiver type: Standard Position System (SPS) with SA on, SPS without SA, or user's
selected standard deviation of measurement error, in meters
- phase-of-flight (Non-Precision Approach, Terminal, En-Route, Oceanic and user defined
HAL)
- probability of false alarm, probability of missed detection, and the corresponding pbias
thresholds; default values are provided
- initial simulation time (GPS time of week); the default value is 0.
- number of time steps; default value is 48 [1]
- time increment, in seconds; default value is 1800 [1]
- name of the statistics output file, the default is the screen
- name of the output file containing unavailable cases (optional)
- selection of the bar graph of visible satellites (optional)
- selection of the histogram plot of horizontal protection level (HPL) repartition (optional)
- other parameters are initialized by default
Outputs:
- table containing RAIM fault detection availability test summary and satellite visibility
statistics (see file pf1 or on sceen)
- file containing data for RAIM unavailable cases (time, location, number of visible
satellites, critical satellite index, horizontal protection level and horizontal alarm limit)
(see file pf2)
- bar graph presenting repartition of visible satellites (optional)
- histogram plot presenting repartition of horizontal protection level for all available cases
(optional)
References: [1], [7], [26]
External Matlab macros used: eleva, svpalm, tgdecef, uverv, vecefenu, wgs84con
Chapter 5 XRAIMEA
- Page 5-31 -
5.45 XRAIMEA
Scope:
This Matlab program determines the Receiver Autonomous Integrity Monitoring (RAIM)
fault exclusion availability based on a constant false alarm rate algorithm [1], [7]. WGS-84
constants are used.
Usage: xraimea
Inputs:
- almanac data; the default is data file svprime.dat. Each record contains the nine data related
to a satellite in the following order:
1) satellite id,
2) satellite time of applicability (toa), in seconds,
3) satellite semi-major axis (a), in meters,
4) satellite eccentricity (e),
5) satellite orbital inclination (I_0), in radians,
6) satellite right ascension at toa (OMEGA_0), in radians,
7) satellite argument of perigee (omega), in radians,
8) satellite mean anomaly (M_0), in radians,
9) satellite rate of right ascension (OMEGA_DOT), radians/second
- geographic locations for the test; the default is data file mops24.dat. Each record contains
the data related to a location in the following order: latitude (degrees), longitude (degrees),
altitude (meters)
- elevation mask angle limit in degrees; the default is 5. degrees
- GPS receiver type: Standard Position System (SPS) with SA on, SPS without SA, or user's
selected standard deviation of measurement error, in meters
- phase-of-flight (Non-Precision Approach, Terminal, En-Route, Oceanic and user defined
HAL)
- probability of false alarm, probability of missed detection, and the corresponding pbias
thresholds; default values are provided
- initial simulation time (GPS time of week); the default value is 0.
- number of time steps; default value is 48 [1]
- time increment, in seconds; default value is 1800 [1]
- name of the statistics output file, the default is the screen
- name of the output file containing unavailable cases (optional)
- selection of the bar graph of visible satellites (optional)
- selection of the histogram plot of horizontal exclusion level (HEL) repartition (optional)
- other parameters are initialized by default
Outputs:
- table containing RAIM fault exclusion availability test summary and satellite visibility
statistics (see file pf1 or on screen)
- file containing data for RAIM unavailable cases (time, location, number of visible
satellites, critical satellite index, horizontal protection level and horizontal alarm limit) (see
file pf2)
Chapter 5 XRAIMFD, XRAIMST
- Page 5-32 -
- bar graph presenting repartition of visible satellites (optional)
- histogram plot presenting repartition of horizontal exclusion level of all available cases
(optional)
References: [1], [7], [26]
External Matlab macros used: eleva, elimcol, svpalm, tgdecef, uverv, vecefenu, wgs84con
5.46 XRAIMFD
Scope:
This MATLAB program implements the fault detection algorithm for the Receiver
Autonomous Integrity Monitoring (RAIM), for a specified set of input data.
Usage : xraimfd
Inputs :
- name of the data file containing line-of-sight unit vectors, each vector is stored in
another row (it should be 3 columns); a set of default values is specified
- number of steps to be executed; the default is 1
- number of measurements for each step; the default is 7
- name of the output file (optional); the default is the screen
Note: Values for probability of false alarm, probability of missed detection and standard
deviation of measurement noise are automatically selected.
Outputs:
- values of the selected input data set
- status of the output flags (false alarm, true alarm, missed detection, normal operation and
unavailable) for each step
Reference: [23]
External Matlab modules used : raimfd
5.47 XRAIMST
Scope:
This MATLAB program determines availability and failure flags for the Receiver
Autonomous Integrity Monitoring (RAIM) baseline standard algorithm (constant alarm rate
algorithm) [7] for a specified set of input data.
Usage: xraimst
Chapter 5 XREADALM
- Page 5-33 -
Inputs:
- name of the data file containing line-of-sight unit vectors, each vector is stored in
another row (it should be 3 columns); a set of default values is specified
- name of the data file containing errors in true ranges; a set of default values is specified
- name of the output file (optional); the default is the screen
Note: Values for threshold and approximate radial error protected ceiling are automatical-ly
selected.
Outputs:
- alues of the selected input data set
- status of the availability flag and the test statistic / failure flag
References: [1], [7]
External Matlab modules used: raimst
5.48 XREADALM
Scope:
This MATLAB program reads almanac data from a Yuma format input file and stores the
data into an ASCII data file (each record contains the data related to a satellite); a reduced
almanac data set is stored into another file.
Usage: xreadalm
Inputs:
- name of the Yuma format almanac input data file
- name of the output data files (for the complete almanac and the reduced almanac used by
the module svpalm.m)
Outputs:
- almanac data into the specified output files.
For the complete almanac data each record contains the data related to a satellite in the
following order:
(1) satellite id number
(2) satellite health
(3) satellite eccentricity (e)
(4) satellite time of applicability (toa), in seconds
(5) satellite orbital inclination (I_0), in radians
(6) satellite rate of right ascension (OMEGA_DOT), radians/second
(7) satellite square root of semi-major axis (sqrt(a)), in meters^1/2
(8) satellite right ascension at toa (OMEGA_0), in radians
(9) satellite argument of perigee (omega), in radians
(10) satellite mean anomaly (M_0), in radians
(11) satellite af0, in seconds
Chapter 5 XRINEXN
- Page 5-34 -
(13) satellite af1, in second/second
(14) satellite week
For the reduced almanac data each record contains the data related to a healthy satellite in
the following order:
(1) satellite id number
(2) satellite time of applicability (toa), in seconds
(3) satellite semi-major axis (a), in meters
(4) satellite eccentricity (e)
(5) satellite orbital inclination (I_0), in radians
(6) satellite right ascension at toa (OMEGA_0), in radians
(7) satellite argument of perigee (omega), in radians
(8) satellite mean anomaly (M_0), in radians
(9) satellite rate of right ascension (OMEGA_DOT), radians/second number of satellites
read (on screen)
5.49 XRINEXN
Scope:
This Matlab program reads a RINEX 2 navigation message file and writes the data into three
files; one output file contains the complete navigation information, while the other output
files contain the reduced ephemeris and almanac data.
Usage: xrinexn
Inputs:
- name of the ephemeris data file, RINEX 2 navigation message file
- name of the output file containing all navigation data information
- name of the output file containing reduced ephemeris data
- name of the output file containing reduced almanac data
Outputs:
- file containing all navigation data information; each record includes the data in the same
order as the input file
- file containing the reduced ephemeris data; each record includes the following data:
svprn, toe, smaxis, ecc, i0, Omega0, omega, M0, Omegadot, deltan, idot, cic, cis, crc, crs,
cuc, cus
- file containing the reduced almanac data; each record includes the following data:
svprn, toe, smaxis, ecc, i0, Omega0, omega, M0, Omegadot
Remark:
The reduced ephemeris and almanac data files can be used by macros svpeph and svpalm,
respectively; both files contain data only for healthy satellites.
Chapter 5 XRWALK, XSAERR
- Page 5-35 -
5.50 XRWALK
Scope:
This MATLAB program generates a random walk process, and plots the random walk
sequence and the normalized auto-correlation sequence (optional).
Usage: xrwalk
Inputs:
- number of random number to be generated
- value of the noise covariance, q*dt
- name of the output file (optional), if the generated data are saved
Outputs:
- plot of the random walk sequence
- plot of the normalized auto-correlation sequence (optional)
External Matlab modules used: genrn, rms, rwalk, xcorr (optional, from Signal
Processing Toolbox)
5.51 XSAERR
Scope:
This MATLAB program generates and saves the SA (Selective Availability) errors for a
specified number of satellites and time steps.
Usage: xsaerr
Inputs:
From keyboard the user should enter the following data:
- maximum number of satellites used, nrsv (default is 12)
- number of time steps to be generated, nrsteps (default is 1800)
- random number seed value (default is 0)
- SA model data (second order Gauss-Markov process); default data is available
- selection of the storage data file
- safile.mat
- selected name for ASCII data file
- none, no storage (default)
- selection of multipath plots from generated data
- satellite(s) number for which the generated data is plotted
- application specific parameters are initialized by default (see sigma, order and wn) and
time step is 1 second
Outputs:
- output file storing the SA errors, mat-file safile.mat or defined ASCII data file; the output
Chapter 5 XSDOP, XSLOPE
- Page 5-36 -
array has nrsteps rows and nrsv columns, each row contains multipath data for a specific
SA model and all selected satellites
- plot of SA errors versus time step, for the specified satellites
References: {1], [2]
5.52 XSDOP
Scope:
This MATLAB program computes sub-dilution of precision (sub-DOP) quantities, i.e. DOP
quantities for all satellites subsets obtained from eliminating one satellite from the original
set.
Usage: xsdop
Inputs:
- name of the output file containing the results if selected; the default in on screen
- name of the input file containing line-of-sight unit vectors; each row contains a line-of-
sight unit vector
Outputs:
- input/output data stored on the selected output file or displayed on screen
Remark:
Five or more satellites are needed for the computation of sub-DOP. The sub-HDOP is useful
in the RAIM detection process [7], [27].
References: [7], [27]
External Matlab macros used: sdop
5.53 XSLOPE
Scope:
This MATLAB program determines slope_max and delta_h_max for the Receiver
Autonomous Integrity Monitoring (RAIM) baseline standard algorithm (constant alarm rate
algorithm) [7] for a specified set of input data.
Usage: xslope
Inputs:
- name of the data file containing line-of-sight unit vectors, each vector is stored in another
row (it should be 3 columns); set of default values is specified
- name of the output file (optional); the default is the screen
Chapter 5 XSORTREC, XSTAT
- Page 5-37 -
Outputs:
- values of the selected input data set
- computed slope_max and delta_h_max
- computed error =(slope_max - delta_h_max * sqrt(number of measurements - 4))
Remark:
The following related formula may be used
slopemax =delta_h_max * sqrt(number of measurements - 4)
References: [7], [27]
External Matlab macros used:dhmax, slopemax
5.54 XSORTREC
Scope:
This MATLAB program reads a data file (each row is a record), sorts the records by the
elements of a specified column in ascending order, and writes the result into an external file.
Usage: xsortrec
Inputs:
- name of the input file
- index of the column used in ordering the records
- name of the output file (optional)
Outputs:
- ordered data records on the specified file or on screen
Remark:
The format of the output file should be changed to reflect the number and data types used in
each record (the default is for the structure used in file data2.dat).
5.55 XSTAT
Scope:
This MATLAB program tests the following modules: rms, rss, rssxy, and statup. In addition,
results from internal modules mean and std are recorded.
Usage: xstat
Inputs:
- name of the input file containing one column data
Chapter 5 XSTATC, XSVPALM
- Page 5-38 -
- name of the output file if selected, otherwise the data are displayed on screen
Outputs:
- input/output data stored on the selected output file or displayed on the screen
External Matlab modules used: rms, rss, rssxy, statup
5.56 XSTATC
Scope:
This MATLAB program determines mean, standard deviation and root mean square (rms) of
the elements of a specified column of the input array.
Usage: xstatc
Inputs:
- name of the input file containing the input data array
- name of the output file if selected, otherwise the data are displayed on screen
- index for the selected column
Outputs:
- output data stored on the selected output file or displayed on the screen
Remark:
External Matlab macros used: rms
5.57 XSVPALM
Scope:
This MATLAB program computes ECEF satellite position based on satellite almanac data;
WGS-84 constants are used.
Usage: xsvpalm
Inputs:
- tsim, GPS system time at time of transmission, i.e. GPS time corrected for transit time
(range/speed of light), in seconds
- satellite almanac data from a specified data file; default data are given. The almanac
satellite data is specified in the following order (each record is for a different satellite):
(1) satelitte number
(2) toa, reference time almanac (toa, time of applicability), in seconds
(3) smaxis, satellite semi-major axis (a), in meters
(4) ecc, satellite eccentricity (e)
Chapter 5 XXSVPCOMP
- Page 5-39 -
(5) izero, inclination angle at reference time (I_0), in radians
(6) razero, right ascension at reference time (OMEGA_0), in radians (longitude of
ascending node of orbit plane at weekly epoch)
(7) argper, argument of perigee (omega), in radians
(8) mzero, mean anomaly at reference time (M_0), in radians
(9) radot, rate of right ascension (OMEGA_DOT), in radians/second
- name of the input data file (optional)
- name of the output file (optional)
Outputs:
- input/output data stored on the selected output file or displayed on screen
External Matlab modules used: svpalm, , wgs84con
5.58 XSVPCOMP
Scope:
This MATLAB program computes RSS between ECEF satellite position based on satellite
ephemeris data and the corresponding ECEF satellite position based on almanac data; WGS-
84 constants are used.
Usage: xsvpcomp
Inputs:
- tsim, GPS system time at time of transmission, i.e. GPS time corrected for transit time
(range/speed of light), in seconds
- satellite ephemeris data from a specified data file; default data are given. The ephemeris
satellite data are specified in the following order:
(1) satellite number
(2) toe, reference time ephemeris, in seconds
(3) smaxis (a), satellite semi-major axis, in meters
(4) ecc (e), satellite eccentricity
(5) izero (I_0), inclination angle at reference time, in radians
(6) razero (OMEGA_0), right ascension at reference time, in radians, (longitude of
ascending node of orbit plane at weekly epoch)
(7) argper (omega), argument of perigee, in radians
(8) mzero (M_0), mean anomaly at reference time, in radians
(9) radot (OMEGA_DOT), rate of right ascension, in radians/second
(10) deln (delta_n), mean motion difference from computed value, in radians/second
(11) idot (I_DOT), rate of inclination angle, in radians/second
(12) cic, amplitude of the cosine harmonic correction term to the angle of inclination, in
radians
(13) cis, amplitude of the sine harmonic correction term to the angle of inclination, in
radians
(14) crc, amplitude of the cosine harmonic correction term to the orbit radius, in meters
Chapter 5 XXSVPEPH
- Page 5-40 -
(15) crs, amplitude of the sine harmonic correction term to the orbit radius, in meters
(16) cuc, amplitude of the cosine harmonic correction term to the argument of latitude, in
radians
(17) cus, amplitude of the sine harmonic correction term to the argument of latitude, in
radians
- satellite almanac data from a specified data file; default data are given. The almanac
satellite data are specified in the following order:
(1) satellite number
(2) toe, reference time ephemeris, in seconds
(3) smaxis (a), satellite semi-major axis, in meters
(4) ecc (e), satellite eccentricity
(5) izero (I_0), inclination angle at reference time, in radians
(6) razero (OMEGA_0), right ascension at reference time, in radians, (longitude of
ascending node of orbit plane at weekly epoch)
(7) argper (omega), argument of perigee, in radians
(8) mzero (M_0), mean anomaly at reference time, in radians
(9) radot (OMEGA_DOT), rate of right ascension, in radians/second
- name of the input data files (optional)
- number of time steps (integer)
- time step value, in seconds; initial time is tsim
- name of the output files (optional)
Outputs:
- plot of the RSS between the satellite ephemeris position and satellite almanac position
- two output data files (optional) storing the ECEF satellite position based on ephemeris/
almanac; each record contains the following data: time step number, satellite ECEF x-
component, satellite ECEF y-component, and satellite ECEF z-component
External Matlab macros used: svpalm, svpeph, wgs84con
5.59 XSVPEPH
Scope:
This MATLAB program computes ECEF satellite position based on satellite ephemeris data;
WGS-84 constants are used.
Usage: xsveph
Inputs:
- tsim, GPS system time at time of transmission, i.e. GPS time corrected for transit time
(range/speed of light), in seconds
- satellite ephemeris data from a specified data file; default data are given. The ephemeris
satellite data are specified in the following order:
(1) satellite number
(2) toe, reference time ephemeris, in seconds
Chapter 5 XSVSEL
- Page 5-41 -
(3) smaxis (a), satellite semi-major axis, in meters
(4) ecc (e), satellite eccentricity
(5) izero (I_0), inclination angle at reference time, in radians
(6) razero (OMEGA_0), right ascension at reference time, in radians, (longitude of
ascending node of orbit plane at weekly epoch)
(7) argper (omega), argument of perigee, in radians
(8) mzero (M_0), mean anomaly at reference time, in radians
(9) radot (OMEGA_DOT), rate of right ascension, in radians/second
(10) deln (delta_n), mean motion difference from computed value, in radians/second
(11) idot (I_DOT), rate of inclination angle, in radians/second
(12) cic, amplitude of the cosine harmonic correction term to the angle of inclination, in
radians
(13) cis, amplitude of the sine harmonic correction term to the angle of inclination, in
radians
(14) crc, amplitude of the cosine harmonic correction term to the orbit radius, in meters
(15) crs, amplitude of the sine harmonic correction term to the orbit radius, in meters
(16) cuc, amplitude of the cosine harmonic correction term to the argument of latitude, in
radians
(17) cus, amplitude of the sine harmonic correction term to the argument of latitude, in
radians
- name of the input data file (optional)
- name of the output data file (optional)
Outputs:
- input/output data stored on the selected output file or displayed on screen
External Matlab modules used: svpeph
5.60 XSVSEL
Scope:
This MATLAB program executes the selection of 4, 5 or 6 satellites based on minimum
geometric dilution of precision (GDOP) criteria from all possible sets available. For the
selected set of 4, 5 or 6 satellites the computed dilution-of-precision (DOP) values are
outputted.
Usage: xsvsel
Inputs:
- name of the input filename; the default file is xsvsel1.dat
- name of the output filename; the default file is xsvsel.out
- number of satellites to be selected
Outputs:
- number of satellites available
Chapter 5 XSWDOP, XTRAJS
- Page 5-42 -
- number of satellites to be used
- indices of the selected satellites
- dilution-of-precision (DOP) values for the selected satellites set
External Matlab modules used: svsel4, svsel5, svsel6, dop1
5.61 XSWDOP
Scope:
This MATLAB program computes sub-weighted dilution of precision (sub-WDOP)
quantities, i.e. WDOP quantities for all satellite subsets obtained by eliminating one satellite
from the original set.
Usage: xswdop
Inputs:
- name of the output file containing the results; the default is on screen
- name of the input file containing line-of-sight unit vectors; each row contains a line-of-
sight (LOS) unit vector
- weighting factors (from keyboard) for each LOS
Outputs:
- input/output data stored on the selected output file or displayed on screen
Remark:
Five or more satellites are needed for the computation of sub-WDOP. The sub-WHDOP is
useful in the RAIM detection process [7], [27].
References: [7], [27]
External Matlab macros used: swdop
5.62 XTRAJS
Scope:
This MATLAB program determines the vehicle trajectory with the following characteristics:
straight segment with constant speed in ENU frame; the trajectory is specified in ECEF and
ENU frames. WGS-84 constants are used.
Usage: xtrajs
Inputs:
- selection of the default input data or enter the following input data from keyboard:
- initial ECEF position, the components in meters
Chapter 5 XTROPOC1, XUCLOCK
- Page 5-43 -
- ENU velocity (constant), the components in meters/second,
- t ime step, in seconds,
- number of steps
- selection of the output data file or exit the results on screen
Outputs:
- the recorded output data (at each time step) are as follows:
- trajecef, ECEF position, the components are in meters; trajecef(k+1,:) is the k-th time step
value
- trajenu , ENU position, the components are in meters; trajenu(k+1,:) is the k-th time step
value; the origin is the initial user's position on a specified file or on screen
- plots of the generated 3-D ECEF trajectory, 2-D ENU trajectory, and longitude-latitude
trajectoru (optional).
External Matlab macros used: tecefgd, trajs, venuecef, wgs84con
5.63 XTROPOC1
Scope:
This Matlab program determines tropospheric delay contours for a specified location
(latitude/longitude), elevation range, and altitude range by using a simplified model [29];
WGS-84 constants are used.
Usage: xtropoc1
Inputs:
- WGS-84 geoid heights data file, by default tgeoid84.dat
- location (latitude/longitude), in radians
- other parameters are initialized by default
Outputs:
- plot of tropo corrections (contour grapg) for the specified location
Reference: [29]
External Matlab macros used: geoidh, tropoc1
5.64 XUCLOCK
Scope:
This MATLAB program generates and saves the user clock bias and drift for a specified
number of time steps and number of users (receivers), by using a simplified second order
model [8]; WGS-84 constants are used.
Chapter 5 XUERCOR
- Page 5-44 -
Usage: xuclock
Inputs:
From keyboard the user should enter the following data:
- maximum number of users (receivers), nru (default is 6)
- number of time steps to be generated, nrsteps (default is 1800)
- time step value, in seconds (default is 1 second)
- white noise spectral density amplitude (Sb) for the first component corresponding to clock
bias, in seconds
- white noise spectral density amplitude (Sd) for the second component corresponding to
clock drift, in second/second
- random number seed value (default is 0)
- selection of the storage data file
- mat-files: ucbfile.mat and ucdfile.mat
- selected name for two ASCII data files
- none, no storage (default)
- selection of user clock bias and drift plots from generated data
- some application specific parameters are initialized by default (see Sb and Sd for a clock
with crystal oscillator)
Outputs:
- output file storing the generated user clock bias and drift, mat-files ucbfile.mat and
ucdfile.mat, or two selected ASCII data file; each output array has nrsteps rows and nru
columns
- plot of clock bias and drift versus time step
Reference: [8]
External Matlab macros used: uclock, rms, wgs84con
5.65 XUERCOR
Scope:
This MATLAB program generates and plots the magnitude of the user earth rotation
correction vector (Coriolis factor) for a specified longitude/latitude grid. WGS-84 constants
are used.
Usage: xuercor
Inputs:
- name of the input almanac data file; the default is data file wk749.dat. Each record
contains the data related to a satellite in the following order:
(1) satellite id,
(2) satellite time of applicability (toa), in seconds,
(3) satellite semi-major axis (a), in meters,
Chapter 5 XUPOSD4
- Page 5-45 -
(4) satellite eccentricity (e),
(5) satellite orbital inclination (I_0), in radians,
(6) satellite right ascension at toa (OMEGA_0), in radians,
(7) satellite argument of perigee (omega), in radians,
(8) satellite mean anomaly (M_0), in radians,
(9) satellite rate of right ascension (OMEGA_DOT), radians/second
- elevation mask angle, in degrees; the default value is 5 degrees
- simulation time, time of week, in seconds; the default value is 0.
- index of the selected satellite (prn)
- longitude/latitude/altitude grid by default (longitude and latitude by 10 degrees from 0 to
360, and -90 to 90, respectively, and altitude is always 0 meters); the grid can be easily
modified
- option to save the generated data in the file ercor.mat
Outputs:
- generated earth rotation correction vector magnitude for the longitude/latitude/altitude grid
into the file ercor.mat (optional)
- surface plot of the magnitude of the earth rotation correction vector magnitude for the
longitude/latitude/altitude grid
References: [4], [36]
External Matlab macros used: eleva, svpalm, tgdecef, uercor, uverv, wgs84con
5.66 XUPOSD4
Scope:
This MATLAB program computes GPS user's position by using a direct (non-iterative) GPS
solution method proposed by Bancroft [5], [9], when four satellite positions and the
corresponding pseudoranges are known.
Usage: xuposd4
Inputs:
- name of the output file if selected, otherwise the data are displayed on screen
- name of the ASCII input file with four rows and four columns; each row contains the
three components of the ECEF satellite position and the corresponding pseudorange (all
values are in meters)
Outputs:
- input data, ECEF position and corresponding pseudorange for each satellite
- computed ECEF user's position and computed user's clock bias measurement in units of
distance (for each solution)
References: [5], [9]
Chapter 5 XUPOSDG, XUPOSIT
- Page 5-46 -
External Matlab modules used: uposd4
5.67 XUPOSDG
Scope:
This MATLAB program computes GPS user's position by using a direct (non-iterative) GPS
solution method proposed by Bancroft [5], [9], when at least four satellite positions and the
corresponding pseudoranges are known.
Usage: xuposdg
Inputs:
- name of the output file if selected, otherwise the data are displayed on screen
- name of the ASCII input file with at least four rows and four columns; each row
contains the three components of the ECEF satellite position and the corresponding
pseudorange (all values are in meters)
Outputs:
- input data, ECEF position and corresponding pseudorange for each satellite
- computed ECEF user's position and computed user's clock bias measurement in units of
distance (for each solution)
References: [5], [9]
External Matlab modules used: uposdg
5.68 XUPOSIT
Scope:
This MATLAB program computes GPS user's position by using an iterative method, when
four ECEF satellite positions and the corresponding pseudoranges are known.
Usage: xuposit
Inputs:
- name of the output file if selected, otherwise the data are displayed on screen
- name of the ASCII input data file; each row contains the three components of the ECEF
satellite position and the corresponding pseudorange (all values are in meters)
- number of iterations to be executed; at least 3 iterations is recommended
- initial user's position in ECEF; the default value is (0., 0., 0.)
Outputs:
- input data, ECEF position and corresponding pseudorange for each satellite
Chapter 5 XVTRANSF
- Page 5-47 -
- computed ECEF user's position and computed user's clock bias measurement in units of
distance (for each solution)
External Matlab modules used: uposit
5.69 XVTRANSF
Scope:
This MATLAB program performs the following coordinate transformations of a given vector
and reference point/angles (optional):
1) from ECEF to ENU coordinates
2) from ENU to ECEF coordinates
3) from ECEF to LLWA coordinates
4) from LLWA to ECEF coordinates
5) from ECEF to INS coordinates
6) from INS to ECEF coordinates
7) from ENU to LLWA coordinates
8) from LLWA to ENU coordinates
9) from LLWA to GPS body coordinates
10) from GPS body to LLWA coordinates
11) from ECEF to Geodetic coordinates
12) from Geodetic to ECEF coordinates
13) from ENU to Geodetic coordinates
14) from Geodetic to ENU coordinates
15) from ECEF to ECI coordinates
16) from ECI to ECEF coordinates
17) from ECEF WGS-84 to SGS-85 coordinates
18) from SGS-85 to ECEF WGS-84 coordinates
19) from ECEF WGS-84 to PZ-90 coordinates
20) from PZ-90 to ECEF WGS-84 coordinates
Usage: xvtransf
Inputs:
- name of the output file if selected (the default is the screen)
1) For the ECEF/ENU to ENU/ECEF transformation:
- input vector
- reference latitude, in radians
- reference latitude, in radians
2) For the ECEF/LLWA to LLWA/ECEF transformation:
- input vector
- reference latitude, in radians
- reference longitude, in radians
- reference wander azimuth angle, in radians
Chapter 5 XWDOP
- Page 5-48 -
3) For the ECEF/INS to INS/ECEF transformation:
- input vector
- reference latitude, in radians
- reference longitude, in radians
- reference wander azimuth angle, in radians
4) For the ENU/LLWA to LLWA/ENU transformation:
- input vector
- reference wander azimuth angle, in radians
5) For the LLWA/GPS Body to GPS Body/LLWA transformation:
- input vector
- yaw angle, in radians
- pitch angle, in radians
- roll angle, in radians
6) For the ECEF/Geodetic to Geodetic/ECEF transformation:
- input vector
- reference latitude, in radians
- reference longitude, in radians
- reference altitude, in meters
7) For the ENU/Geodetic to Geodetic/ENU transformation:
- input vector
- reference latitude, in radians
- reference longitude, in radians
- reference altitude, in meters
8) For the ECEF/ECI to ECI/ECEF transformation:
- input vector
- time elapsed since reference time, in seconds
9) For the ECEF WGS-84/SGS-85 to SGS-85/ECEF WGS-84 transformation:
- input vector
10) For the ECEF WGS-84/PZ-90 to PZ-90/ECEF WGS-84 transformation:
- input vector
Outputs:
- input/output data stored into the specified output file or displayed on screen
External Matlab modules used: vecefenu, venuecef, vecefllw, vllwecef, vecefins,
vinsecef, venullw, vllwenu, vllwb, vbllw, vecefgd, vgdecef, venugd, vgdenu, vecefeci,
veciecef, vecefs85, vs85ecef, vecefp90, vp90ecef, tecefgd, tgdecef, wgs84con
5.70 XWDOP
Scope:
This MATLAB program computes weighted dilution of precision (WDOP) quantities when
at least three line-of-sight unit vectors are specified by using macro WDOP1.m or WDOP2.m
four line-of-sight unit vectors are specified.
Chapter 5 XWDOPV, XYP1
- Page 5-49 -
Usage: xwdop
Inputs:
- name of the output file containing the results; the default is the display on the screen
- selection of the macro to be used (wdop1 or wdop2)
- name of the input file containing line-of-sight unit vectors, e.g. geom7.dat; each row
contains a line-of-sight unit vector
- weighting factors (from keyboard) for each line-of-sight
Outputs:
- input/output data stored on the selected output file or displayed on screen
External Matlab modules used: wdop1, wdop2
5.71 XWDOPV
Scope:
This MATLAB program computes the weighted dilution of precision (WDOP) quantities
when four line-of-sight unit vectors and the corresponding weighting factors are specified, by
using a geometric method [18].
Usage: xwdopv
Inputs:
- name of the output file containing the results
- name of the input file containing line-of-sight unit vectors; each row contains a line-of-
sight (LOS) unit vector
- weighting factors (from keyboard) for each line-of-sight (LOS) unit vector
Outputs:
- input/output data stored on the selected output file or displayed on screen
Reference: [18]
External Matlab modules used: wdopv
5.72 XYP1
Scope:
This MATLAB program plots a x-y graph for a selected column from an ASCII data file;
manual scaling is available.
Usage: xyp1
Chapter 5 XYP1S
- Page 5-50 -
Inputs:
- name of the ASCII input data file (with extension),
- selected x-axis column index,
- column number to be plotted,
- title of the plot,
- y-axis label,
- x-axis label,
- optional, new axes limits [xmin xmax ymin ymax].
Outputs:
- selected graph
Remark:
The user can select the x-axis column; the other columns are used for y-axis coordinates.
Each y column data (when selected) is independently plotted against x column data. If
statistics is needed use xyp1s.
5.73 XYP1S
Scope:
This MATLAB program plots a x-y graph for a selected column from an ASCII data file;
manual scaling is available. In addition, the plot can incorporate statistics related to the
selected graph, i.e. mean, standard deviation and root mean square (rms).
Usage: xyp1s
Inputs:
- name of the ASCII input dta file (with extension),
- selected x-axis column index,
- column number to be plotted,
- title of the plot,
- y-axis label,
- x-axis label,
- optional, new axes limits [xmin xmax ymin ymax].
Outputs:
- selected graph
Remarks:
The user can select the x-axis column; the other columns are used for y-axis coordinates.
Each y column data (when selected) is independently plotted against x column data. The
computed/listed statistics is for the selected range of the specified plot.
External Matlab modules used: rms
Chapter 5 XYP2W, XYP3W
- Page 5-51 -
5.74 XYP2W
Scope:
This MATLAB program plots a x-y graph for two selected columns in two different windows
/subplots from an ASCII data file; manual scaling is available. In addition, the plots can
incorporate statistics related to the selected graphs, i.e. mean, standard deviation and root
mean square (rms).
Usage: xyp2w
Inputs:
- the name of the ASCII input data file (with extension),
- x-axis column number,
- y-axis column number (for each subplot),
- title of the plot (for each subplot),
- y- axis label (for each subplot),
- x- axis label (for each subplot),
- optional, new axes limits [xmin xmax ymin ymax] for both plots.
Outputs:
- selected graphs
Remark:
The computed/listed statistics is for the selected range of the specified plot. The program can
be easily modified to allow the selection of columns for x-axes independently.
External Matlab macros used: rms
5.75 XYP3W
Scope:
This MATLAB program plots a x-y graph for three selected columns in three different
windows/subplots from an ASCII data file; manual scaling is available. In addition, the plots
can incorporate statistics related to the selected graphs, i.e. mean, standard deviation and root
mean square (rms).
Usage: xp3w
Inputs:
- name of the ASCII input data file (with extension),
- x-axis column number,
- y-axis column number (for each subplot),
- title of the plot (for each subplot),
- y-axis label (for each subplot),
Chapter 5 XYPC2
- Page 5-52 -
- x-axis label (for each subplot),
- optional, new axes limits [xmin xmax ymin ymax] for all plots.
Outputs:
- selected graphs
Remark:
The computed/listed statistics is for the selected range of the specified plot. The program can
be easily modified to allow the selection of columns for x-axes independently.
External Matlab macros used: rms
5.76 XYPC2
Scope:
This MATLAB program plots a x-y graph of the difference between two data columns from
different data files against a selected data column from the first input file as x-axis; manual
scaling is available. In addition, the plot can incorporate statistic related to the selected graph,
i.e. mean, standard deviation, and root mean square (rms).
Usage: xypc2
Inputs:
- name of the first ASCII data input file (with extension),
- name of the second ASCII data input file (with extension),
- selected x-axis column index,
- column number to be compared between data files,
- title of the plot,
- y-axis label,
- x-axis label,
- optional, new axes limits [xmin xmax ymin ymax].
Outputs:
- selected graph
Remark:
The column used as x-axis is selected from the first input data file. The computed/listed
statistics is for the selected range of the x-axis. The comparison can use the same file.
External Matlab macros used: rms
Chapter 5 XYPC2RSS, XYPM
- Page 5-53 -
5.77 XYPC2RSS
Scope:
This MATLAB program plots a x-y graph for root sum square (RSS) of three specified
columns from the difference of two ASCII data files; manual scaling is available. In addition,
the plot can incorporate statistics related to the selected graph, i.e. mean, standard deviation
and root mean square (rms).
Usage: xypc2rss
Inputs:
- name of the first ASCII input data file (with extension),
- name of the second ASCII input data file (with extension),
- selected x-axis column index,
- columns number for the RSS plotting,
- title of the plot,
- y-axis label,
- x-axis label,
- optional, new axes limits [xmin xmax ymin ymax].
Outputs:
- selected graph
Remark:
The column used as x-axis is selected from the first input data file. The computed/listed
statistics is for the selected range of the x-axis. The comparison can use the same file
External Matlab macros used: rms
5.78 XYPM
Scope:
This MATLAB program plots a x-y graph for the selected columns of the specified ASCII
data file; manual scaling is available.
Usage: xypm
Inputs:
- name of the ASCII input data file (with extension),
- number of the columns to be plotted,
- the indices for the columns to be plotted,
- title of the plot,
- y-axis label,
- x-axis label,
Chapter 5 XYPRSS, XYPRSS2W
- Page 5-54 -
- optional, new axes limits [xmin xmax ymin ymax].
Outputs:
- selected graphs
Remark:
The first column of the input array contains the x coordinates, and other columns store the y
coordinates.
5.79 XYPRSS
Scope:
This MATLAB program plots a x-y graph for root sum square (RSS) of three specified
columns with data from an ASCII data file; manual scaling is available.
Usage: xyprss
Inputs:
- the name of the ASCII input file which must have a "dat" extension,
- the columns number for the RSS plotting,
- title of the plot,
- y-axis label,
- x-axis label,
- new axes limits [xmin xmax ymin ymax], optional.
Outputs:
- selected graph
Remark:
The first column of the input array contains the x coordinates, and other columns store the y
coordinates. From the three selected y columns data, for each x coordinate a RSS value is
determined and plotted against x column data.
5.80 XYPRSS2W
Scope:
This MATLAB program plots a x-y graph for root sum square (RSS) of three columns
corresponding to the position and velocity errors from an ASCII data file; manual scaling is
available. In addition, the plots can incorporate statistics related to the selected graphs, i.e.
mean, standard deviation and root mean square (rms).
Usage: xyprss2w
Inputs:
- name of the ASCII input data file (with extension),
Chapter 5 XYPVSTD
- Page 5-55 -
- title of the plot,
- optional, new axes limits [xmin xmax ymin ymax] for both plots.
Outputs:
- selected graphs
Remark:
The first column of the input array contains the x coordinates, columns 2 to 4 contain
position error components, and columns 5 to 7 contain velocity error components. The units
used in the legend are: seconds, meters, and meters/second. The computed/listed statistics is
for the selected range of the specified plot. The program can be easily modified to allow the
selection of columns for x and y axes.
External Matlab macros used: rms
5.81 XYPVSTD
Scope:
This MATLAB program plots a x-y graph for a selected variable and the associated envelope
(standard deviation) from two specified columns of an ASCII data file when the first column
data is used as x-axis; manual scaling is available. In addition, the plot can incorporate
statistics related to the selected graph, i.e. mean, standard deviation and root mean square
(rms) of the selected variable.
Usage: xypvstd
Inputs:
- name of the ASCII input data file (with extension),
- column number for the selected variable to be plotted,
- the column number for the associated standard deviation,
- title of the plot,
- y-axis label,
- x-axis label,
- optional, new axes limits [xmin xmax ymin ymax].
Outputs:
- selected graphs
Remark:
The first column of the input array contains the x coordinates, and other columns store the y
coordinates. The computed/listed statistics is for the selected range of the specified graph.
External Matlab macros used: rms
Chapter 5
- Page 5-56 -
Chapter 6 References
- Page 6-1 -
6.0 REFERENCES
1 Anon., Minimum operational performance standards for airborne supplemental navigation
equipment using Global Positioning System (GPS). Document No. RTCA/DO-208, J uly
1991, Prepared by SC-159.
2 Anon., Changes to RTCA/DO-208, Minimum operational performance standards for airborne
supplemental navigation equipment using Global Positioning System (GPS). September
1991, Prepared by SC-159.
3 Anon., Global Positioning System. Monographs published by The Institute of Navigation,
Vol. I (1980), Vol. II (1984), Vol. III (1986), Vol. IV (1993), Vol. V (1998).
4 Anon., ICD-GPS-200C (GPS Interface Control Document). GPS J oint Program Office,
October 10, 1993.
5 Bancroft, S., An algebraic solution of the GPS equations. IEEE Transactions on Aerospace
and Electronic Systems, vol. AES-21, No. 7, 1985, pp. 56-59.
6 Bierman, G, J ., Factorization methods for discrete sequential estimation. Academic Press,
New York, 1977.
7 Brown, R. G., A baseline RAIM scheme and a note on the equivalence of three RAIM
methods. Proceedings of the National Technical Meeting, Institute of Navigation, San Diego,
CA, J an. 27-29, 1992, pp. 127-137.
8 Brown, R. G., Hwang, P. Y. C., Introduction to random signals and applied Kalman filtering.
Third Edition, J ohn Wiley & Sons, 1997.
9 Chaffee, J . W., Abel, J . S., Bifurcation of pseudorange equations. Institute of Navigation,
Proceedings of the 1993 National Technical Meeting, San Francisco, CA, J an. 20-22, 1993,
pp. 203-211.
10 Copps, E. M., Lupash, L., Extending the generality and robustness of RAIM algorithms.
Proceedings of the 1994 Technical Meeting, Institute of Navigation, San Diego, 24-26, 1994,
pp. 31-39.
11 Etter, D. M., Engineering problem solving with MATLAB. Prentice Hall, Englewood Cliffs,
NJ , 1993.
12 Gelb, A., Applied optimal estimation. The MIT Press, Cambridge, MA, 1974.
13 Green, G. B., Massatt, P. D., Rhodus, N. W., The GPS 21 primary satellite constellation.
Navigation, J ournal of the Institute of Navigation, vol. 36, No. 1, Spring 1989, pp. 9-24.
14 Grewald, M. S., Andrews, A. P., Kalman filtering. Theory and applications. Prentice Hall
Inc., 1993.
15 Kaplan, E., Editor, Understanding GPS: Principles and Applications. Artech House, 1996.
16 Leonard, N. E., Levine, W. S., Using MATLAB to analyze and design control systems. The
Benjamin/Cummings Publishing Company Inc., Redwood City, CA, 1992.
17 Logsdon, T., Understanding the Navstar, GPS, GIS, and IVHS. Van Nostrand Reinhold,
1995.
18 Massatt, P., Rudnick, K., Geometric formulas for dilution of precision calculations.
Navigation, J ournal of the Institute of Navigation, Vol. 37, No. 4, 1990-91, pp. 379-391.
19 Minkler, G., Minkler, J ., Aerospace coordinate systems and transformations. Magellan Book
Company, Baltimore, MD, 1990.
20 Press, W. H., and others, Numerical recipes. The art of scientific computing. Cambridge
University Press, 1986.
21 Saadat, H., Computational aids in control systems using MATLAB. Mc Graw-Hill, Inc.,
1993.
22 Sturza, M. A., Navigation system integrity monitoring using redundant measurements.
Navigation, J ournal of the Institute of Navigation, Vol. 35, No. 4, Winter 1988-89, pp. 483-
501.
Chapter 6 References
- Page 6-2 -
23 Van Graas, F., Farrell, J . L., Baseline fault detection and exclusion algorithm. Institute of
Navigation, Proceedings of the 49th Annual Meeting, Cambridge, MA, J une 21-23, 1993, pp.
413-420.
24 Lupash, L., Wlad, J ., TA-12 RAIM test results and analysis. Proceedings of the ION 55
th
Annual Meeting, 28-30 J une 1999, Cambridge, MA, pp. 546-555.
25 Parkinson, B. W., Spilker, J . J . jr, and others, Global Positioning System: Theory and
Applications, vol I and ii. AIAAA, Progress in Astronautics and Aeronautics, vol. 163-164,
1996.
26 Brown, R. G., Chin, G. V., GPS RAIM: Calculation of thresholds and protection radius using
Chi-square methods A geometric approach. RTCA Paper No. 491-94/SC159-584,
November 1994.
27 Brown, A. K., Sturza, M. A., The effect of geometry on integrity monitoring performance.
The Institute of Navigation 46
th
Annual Meeting, J une 1990, pp. 121-129.
28 Hofman,-Wellenhof, B., Lichtenegger, H., Collins, J ., Global Positioning System. Theory
and Practice, Springer-Verlag, 1997.
29 Farrell, J ., Barth, M., The Global Positioning System and Inertial Navigation. McGraw Hill,
1998.
30 Anon., Minimum operational performance standards for Global Positioning System/Wide
Area Augmentation System airborne equipment. Document No. RTCA/DO-229, J anuary 16,
1996, Prepared by SC-159.
31 Anon., Department of Defense World Geodetic System 1984. DMA Technical Report
8350.2, Second Edition, September 1, 1991.
32 Montenbruck, O., Gill, E., Satellite orbits. Models, methods, and applications. Springer,
2000.
33 Tsui, J . B-Y., Fundamentals of Global Positioning System receivers. A software approach.
J ohn Wiley & Sons Inc., 2000.
34 Langley, R.B., GLONASS: Review and update. GPS World, vol. 8, Sept. 1997, pp. 46-51.
35 Lupash, L., A new algorithm for the computation of the geodetic coordinates as a function
of Earth-Center Earth-Fixed coordinates. J ournal of Guidance, Control, and Dynamics, vol.
8, No. 6, 1985, pp. 787-789.
36 DiEsposti, R., Time-dependency and coordinate system issue in GPS measurement models.
ION GPS-2000, Salt Lake City, UT, Sept. 19-23, 2000.
37 Misra, P. N., Abbott, R. I., Gaposchkin, E. M., Integrated use of GPS and GLONASS:
Transformation between WGS84 and PZ-90. Proceedings of ION GPS-96, Kansas City,
September 16-20, 1996, pp. 307-314.
38 Misra, P. N., Abbott, R. I., SGS85 - WGS84 transformation. Manuscripta geodaetica, Vol.
19, 1994, pp. 300-308.
Appendix List of modules
- Page 7-1
APPENDIX A. List of functions and input/output files in alphabetical order
For a complete description of all modules and main programs by topics please see Table
2-1.
A.1 List of m-file modules (in alphabetical order)
1. CEP
2. CHI2_DOF
3. CONVCON
4. DHMAX
5. DOP1
6. DOP2
7. ELEVA
8. ELEVAR
9. ELEVAZ
10. ELIMCOL
11. ELIMROW
12. FDNT
13. FOM
14. FPBIAS_C
15. FPBIAS_G
16. GAUSS_1
17. GCNAV
18. GDOPV
19. GENRN
20. GEODES
21. GEOIDH
22. GMP1
23. GMP2
24. GPSCON
25. GPSLSEC
26. GRIDWAAS
27. HMAT
28. HMATB
29. HMATBC
30. HMATC
31. HPE
32. IONOC
33. IONOCON
34. KFCOV
35. KFCOVA
36. MBLLW
37. MCUD
38. MECEFECI
Appendix List of modules
- Page 7-2
39. MECEFENU
40. MECEFINS
41. MECEFLLW
42. MECIECEF
43. MENUECEF
44. MENULLW
45. MINSECEF
46. MLLWB
47. MLLWECEF
48. MLLWENU
49. MREAST
50. MSC2F
51. MSF2C
52. MUDC2F
53. MUDD
54. MUDF2C
55. MUDM
56. MUDM1
57. NCCHI2_10
58. NCCHI2_2
59. NCCHI2_3
60. NCCHI2_4
61. NCCHI2_5
62. NCCHI2_6
63. NCCHI2_7
64. NCCHI2_8
65. NCCHI2_9
66. PIONOC
67. PRADR
68. PZ90CON
69. QRUPA
70. RAIMFD
71. RAIMST
72. RANGE
73. RMS
74. RMS2
75. RSS
76. RSSXY
77. RWALK
78. SDOP
79. SELECTD
80. SGS85CON
81. SLOPEMAX
82. STATUP
83. SVPALM
84. SVPEPH
Appendix List of main programs
- Page 7-3
85. SVSEL4
86. SVSEL5
87. SVSEL6
88. SWDOP
89. TADMSRAD
90. TARADDMS
91. TECEFGD
92. TECEFGD2
93. TGDECEF
94. TIMETR
95. TRAJ S
96. TROPOC1
97. UCLOCK
98. UERCOR
99. UPOSD4
100. UPOSDG
101. UPOSIT
102. UVERV
103. VBLLW
104. VECEFECI
105. VECEFENU
106. VECEFGD
107. VECEFINS
108. VECEFLLW
109. VECEFP90
110. VECEFS85
111. VECIECEF
112. VENUECEF
113. VENUGD
114. VENULLW
115. VEP
116. VGDECEF
117. VGDENU
118. VINSECEF
119. VLLWB
120. VLLWECEF
121. VLLWENU
122. VP90ECEF
123. VS85ECEF
124. WDOP1
125. WDOP2
126. WDOPV
127. WGS72CON
128. WGS84CON
Appendix List of output files
- Page 7-4
A.2 List of m-file main programs (in alphabetical order)
1. XAMBIG
2. XATRANSF
3. XCEPVEP
4. XCON
5. XDOP
6. XEBUDGET
7. XECEF2GD_COMP
8. XELAZ
9. XELIMRC
10. XFDNT
11. XFOM
12. XGCDR
13. XGCNAV
14. XGDOPV
15. XGENRN
16. XGEODES
17. XGEOIDH
18. XGMP1
19. XGMP2
20. XGPSLSEC
21. XGPSTIME
22. XGRIDW
23. XHMATALL
24. XHPE
25. XIONOC
26. XKFCOV
27. XMAPDOP
28. XMISDAT
29. XMPATH
30. XMTRANSF
31. XMUDDU
32. XMUDM
33. XOPCR
34. XPBAR
35. XPBIAS
36. XPELAZA
37. XPELAZS
38. XPFWLS
39. XPPVA
40. XPPVAJ
41. XPRADR
42. XPTRANSF
43. XQRUPA
Appendix List of output files
- Page 7-5
44. XRAIMDA
45. XRAIMEA
46. XRAIMFD
47. XRAIMST
48. XREADALM
49. XRINEXN
50. XRWALK
51. XSAERR
52. XSDOP
53. XSLOPE
54. XSORTREC
55. XSTAT
56. XSTATC
57. XSVPALM
58. XSVPCOMP
59. XSVPEPH
60. XSVSEL
61. XSWDOP
62. XTRAJ S
63. XTROPOC1
64. XUCLOCK
65. XUERCOR
66. XUPOSD4
67. XUPOSDG
68. XUPOSIT
69. XVTRANSF
70. XWDOP
71. XWDOPV
72. XYP1
73. XYP1S
74. XYP2W
75. XYP3W
76. XYPC2
77. XYPC2RSS
78. XYPM
79. XYPRSS
80. XYPRSS2W
81. XYPVSTD
A.3 List of input files (in alphabetical order)
*.dat files:
1. ELLIPS.DAT
2. GEOM1.DAT
3. GEOM2.DAT
Appendix List of output files
- Page 7-6
4. GEOM3.DAT
5. GEOM4.DAT
6. GEOM5.DAT
7. GEOM6.DAT
8. GEOM7.DAT
9. LOCAT1.DAT
10. MAP01.DAT
11. MOPS24.DAT
12. SV2POS.DAT
13. SV3POS.DAT
14. SV3POSR.DAT
15. SV4BPOSR.DAT
16. SV4POS.DAT
17. SV4POSR.DAT
18. SV5BPOSR.DAT
19. SV5POS.DAT
20. SV5POSR.DAT
21. SV6BPOSR.DAT
22. SV6POS.DAT
23. SV6POSR.DAT
24. SV7BPOSR.DAT
25. SV7POS.DAT
26. SV7POSR.DAT
27. SVPRIME.DAT
28. TGEOID84.DAT
29. USER1.DAT
30. WK749.DAT
31. XCEPVEP1.DAT
32. XELAZ1.DAT
33. XGEODES1.DAT
34. XGEODES2.DAT
35. XKFCOV1.DAT
36. XPBAR1.DAT
37. XSVSEL1.DAT
RINEX 2 files:
38. RINEXNAV.99N
YUMA format almanac files:
39. WK749.ALM
40. WK749.YUM
zip-files (large data files):
41. POSVELHD.ZIP (for POSVELHD.DAT)
42. POSVELMD.ZIP (for POSVELMD.DAT)
43. PVHD_200.ZIP (for PVHD_200.DAT)
Appendix List of output files
- Page 7-7
44. XMISDAT1.ZIP (for XMISDAT1.DAT)
A.4 List of output files
*.out files:
1. DATA2.OUT
2. XDOP1.OUT
3. XECEF2GD_COMP1.OUT
4. XECEF2GD_COMP2.OUT
5. XELAZ1.OUT
6. XELAZ2.OUT
7. XFDNT1.OUT
8. XFDNT2.OUT
9. XGCDR1.OUT
10. XGCNAV1.OUT
11. XGCNAV2.OUT
12. XGDOPV1.OUT
13. XGEODES1.OUT
14. XGMP1_1.OUT
15. XGMP2_1.OUT
16. XGPSTIME1.OUT
17. XHMATALL.OUT
18. XHPE1.OUT
19. XIONOC1.OUT
20. XKFCOV.OUT
21. XKFCOV1_1.OUT
22. XKFCOV1_2.OUT
23. XMAPDOP1.OUT
24. XMAPDOP2.OUT
25. XMPATH1.OUT
26. XOPCR1,OUT
27. XPBIAS1.OUT
28. XPBIAS2.OUT
29. XQRUPA1.OUT
30. XRAIMDA1.OUT
31. XRAIMDA2.OUT
32. XRAIMEA1.OUT
33. XRAIMEA2.OUT
34. XRINEXN1.OUT
35. XRINEXN2.OUT
36. XRINEXN3.OUT
37. XRWALK1.OUT
38. XSTAT1.OUT
39. XSTAT2.OUT
40. XSTATC1.OUT
Appendix List of output files
- Page 7-8
41. XSVCOMPA.OUT
42. XSVCOMPE.OUT
43. XSVPALM1.OUT
44. XSVPALM2.OUT
45. XSVPEPH1.OUT
46. XSVSEL1.OUT
47. XTRAJ S1.OUT
*.dat files (from *.alm data files):
48. WK749.DAT
*.dat files (from *.yum data files):
49. WK749.DAT
A.5 List of input and output mat-files (in alphabetical order)
*.mat files:
1. AMBFILE.MAT
2. FGRIDW.MAT
3. LATLON.MAT
4. MPFILE.MAT
5. SAFILE.MAT
6. UCBFILE.MAT
7. UCDFILE.MAT
8. WORLDMAP.MAT
Registration form
R E G I S T R A T I O N F O R M
Complete this form and return it to Lupash Consulting in order to become a
registered user. As a registered user, you will receive important user benefits, including:
free technical support by fax or telephone for one year
future updates by e-mail for one year
future versions at significant discount price
Send this form to: Lupash Consulting
2625 Monterey Place
Fullerton, CA 92833-2084
USA
or e-mail to: L3l@aol.com (see also the electronic form included)
________________________________________________________________________
REGISTRATION INFORMATION
GPS Toolbox Serial Number . . . . . . .
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Company/University . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Street address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
City . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
State/Zip/Country . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Telephone/Fax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E-mail address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
________________________________________________________________________

Das könnte Ihnen auch gefallen