Compare commits
306 Commits
RELEASE_0_
...
RELEASE_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd85fa2457 | ||
|
|
430136fdc9 | ||
|
|
a616aa8e55 | ||
|
|
05b9166c25 | ||
|
|
71770eb92e | ||
|
|
2089a2a956 | ||
|
|
488efa2316 | ||
|
|
44551dad2d | ||
|
|
00e0e72bca | ||
|
|
a611b70087 | ||
|
|
757ed2dfe7 | ||
|
|
8971a67aca | ||
|
|
5a343da5cc | ||
|
|
4c77c1691b | ||
|
|
aadff33011 | ||
|
|
25d7705379 | ||
|
|
867ba3c7da | ||
|
|
3f08d9604e | ||
|
|
5d813aa4d0 | ||
|
|
ce3a1ddcb0 | ||
|
|
e37752f957 | ||
|
|
40d920ddc9 | ||
|
|
4362eb79e6 | ||
|
|
f6c9af488b | ||
|
|
a34ac6a596 | ||
|
|
3b3baa996b | ||
|
|
d6b81a9721 | ||
|
|
a460c753e7 | ||
|
|
9f59e956fa | ||
|
|
bd02eb8e6b | ||
|
|
a266790a25 | ||
|
|
3462e3b6c1 | ||
|
|
ed29944b91 | ||
|
|
a0251b3256 | ||
|
|
557474095f | ||
|
|
b7dd267807 | ||
|
|
58a0b1d2c3 | ||
|
|
d8acc3a8f2 | ||
|
|
5f21c75e02 | ||
|
|
79d72b6292 | ||
|
|
aa67c738a1 | ||
|
|
117628bf7e | ||
|
|
70dbbf52f0 | ||
|
|
99bf2c6f9e | ||
|
|
3fdeea7f65 | ||
|
|
ea9d110036 | ||
|
|
16ad232e0d | ||
|
|
5b8e5fce20 | ||
|
|
0633d703d0 | ||
|
|
ec6ce9fcd8 | ||
|
|
c9e53d5a30 | ||
|
|
828e10773c | ||
|
|
34b5c1a1b9 | ||
|
|
b2a7975493 | ||
|
|
f0af686d17 | ||
|
|
eda1121054 | ||
|
|
d97eb240d9 | ||
|
|
8c296d96c7 | ||
|
|
65a49bb6e4 | ||
|
|
cfedc90fdd | ||
|
|
5665a62938 | ||
|
|
36521869ae | ||
|
|
84fd7a49ad | ||
|
|
24b5f05522 | ||
|
|
17415424bf | ||
|
|
920c0fdb62 | ||
|
|
40414f2823 | ||
|
|
3d43bc0480 | ||
|
|
7bee5f1ab6 | ||
|
|
a43f5c8d21 | ||
|
|
8361069344 | ||
|
|
c9661e2732 | ||
|
|
bd13cf84a1 | ||
|
|
e54cfc002b | ||
|
|
5aac63d9f5 | ||
|
|
6a19bbee7d | ||
|
|
2e5c4b4515 | ||
|
|
79d1aaf7f5 | ||
|
|
a659969bcf | ||
|
|
53bdf9dac4 | ||
|
|
ad394fb090 | ||
|
|
92a123a47d | ||
|
|
755173bd2e | ||
|
|
27477402c9 | ||
|
|
dc9c41e119 | ||
|
|
3c7f9e7ba4 | ||
|
|
fbf018598e | ||
|
|
83b4dcb55c | ||
|
|
5812571df4 | ||
|
|
b1c688abe8 | ||
|
|
f4b30bbdd7 | ||
|
|
e4008862ce | ||
|
|
2b7079eed2 | ||
|
|
983685fde3 | ||
|
|
eef1cc716d | ||
|
|
34e2a9dc37 | ||
|
|
1786692406 | ||
|
|
c37afce303 | ||
|
|
1ea99cdd4d | ||
|
|
4c1d22b8a6 | ||
|
|
5f22c93db7 | ||
|
|
13a42f1d9e | ||
|
|
c4d5d85c3e | ||
|
|
d915ccec6e | ||
|
|
ea1b70191c | ||
|
|
19815c3bce | ||
|
|
66fb6b5a1c | ||
|
|
94ac87f4f5 | ||
|
|
79d5bf66a7 | ||
|
|
a4535c92c3 | ||
|
|
cecdb15692 | ||
|
|
3c08eae85b | ||
|
|
db928ea1ae | ||
|
|
bb002356b4 | ||
|
|
431e78cf09 | ||
|
|
81b9ec50b0 | ||
|
|
e0ba803ca9 | ||
|
|
7ae57483f3 | ||
|
|
d22640ef4e | ||
|
|
f3eeeb760f | ||
|
|
695e112039 | ||
|
|
133e67adb8 | ||
|
|
6079cd3df8 | ||
|
|
6f4fd2dc6e | ||
|
|
b30eb9c00c | ||
|
|
1236d8be19 | ||
|
|
cb35ecb4b0 | ||
|
|
54550aa002 | ||
|
|
d3db963dce | ||
|
|
1dde23a0c9 | ||
|
|
5feccc73c7 | ||
|
|
1cf13a7c1a | ||
|
|
7289ac645a | ||
|
|
699909f808 | ||
|
|
344610e24b | ||
|
|
092901b9ea | ||
|
|
3ac6b34f4b | ||
|
|
d56b961c47 | ||
|
|
858a73e187 | ||
|
|
1623aee1e0 | ||
|
|
c0a633ea1d | ||
|
|
5628c85b51 | ||
|
|
2e1accc0f3 | ||
|
|
93b747f1ba | ||
|
|
21c16b4a51 | ||
|
|
e5e1e165b9 | ||
|
|
8ae39ae8d4 | ||
|
|
110e01a861 | ||
|
|
578e774778 | ||
|
|
d7d13e458c | ||
|
|
0bf579cf27 | ||
|
|
77cefa924c | ||
|
|
1fe26901af | ||
|
|
0dd50cf3d8 | ||
|
|
54b3c711c3 | ||
|
|
f404161d23 | ||
|
|
5a13068aaa | ||
|
|
32067b9adf | ||
|
|
ea2f5f0035 | ||
|
|
ea6540ef90 | ||
|
|
1d5c1de5d3 | ||
|
|
4b11d87a22 | ||
|
|
c2149f9ea6 | ||
|
|
73a4994cac | ||
|
|
c9a4a6975c | ||
|
|
1a1aa37a0e | ||
|
|
7d3abdc512 | ||
|
|
db4c2243e3 | ||
|
|
6dc243e1af | ||
|
|
adb5fb3bee | ||
|
|
7955319771 | ||
|
|
3da76522f8 | ||
|
|
c9ac1b5a06 | ||
|
|
51dff6b537 | ||
|
|
1f4b55e98e | ||
|
|
229ea27050 | ||
|
|
505b4c434d | ||
|
|
12ab6872ec | ||
|
|
4c78e887e1 | ||
|
|
8871655a9b | ||
|
|
db1966c156 | ||
|
|
d4c0c8940b | ||
|
|
d4134195ea | ||
|
|
a8fd1b4c16 | ||
|
|
086473c8eb | ||
|
|
5642ef61ca | ||
|
|
fec7c62b17 | ||
|
|
e046b1bfdb | ||
|
|
01007986dc | ||
|
|
ad56ba1bfa | ||
|
|
54c2d5a6cc | ||
|
|
25ad84e5cb | ||
|
|
dcdf8a4d5c | ||
|
|
5d24be8c51 | ||
|
|
fa42efcf91 | ||
|
|
7f4f778bb1 | ||
|
|
8a2e5cace8 | ||
|
|
23c66b6cfe | ||
|
|
b65fe814a0 | ||
|
|
e74c8587bd | ||
|
|
ab34b86574 | ||
|
|
011ecd980d | ||
|
|
9ca1c6666e | ||
|
|
ba5316ca8e | ||
|
|
f957227576 | ||
|
|
70f763dbe0 | ||
|
|
f8201e6478 | ||
|
|
e053941467 | ||
|
|
17e2478522 | ||
|
|
17df7141ae | ||
|
|
5167dee0e3 | ||
|
|
a1a596b02a | ||
|
|
27f98d24eb | ||
|
|
51ef4568dd | ||
|
|
4c731de8b7 | ||
|
|
fc692cb540 | ||
|
|
cedfade08d | ||
|
|
eedbc7f436 | ||
|
|
b6a683eb6e | ||
|
|
df677ff8aa | ||
|
|
1d8b352d2d | ||
|
|
c8432e3763 | ||
|
|
b3f88735a8 | ||
|
|
789b56872c | ||
|
|
009ed26fd2 | ||
|
|
5ed0ce79ab | ||
|
|
8b8a82bb67 | ||
|
|
94c22fec46 | ||
|
|
8be760b594 | ||
|
|
42b4ec310f | ||
|
|
4ea676b229 | ||
|
|
dda676b1b2 | ||
|
|
f7a3dbc5ed | ||
|
|
1f3947ea4c | ||
|
|
cb7589cc95 | ||
|
|
2ca4b30553 | ||
|
|
bb238c4106 | ||
|
|
4b0b49d1ed | ||
|
|
dd080de16c | ||
|
|
1ae257944b | ||
|
|
a2c8cfb84d | ||
|
|
c01740d516 | ||
|
|
1ce5cd154a | ||
|
|
1fce27f0c3 | ||
|
|
4fc985b518 | ||
|
|
0e999f281b | ||
|
|
aadc802fdd | ||
|
|
d8a7589752 | ||
|
|
f1021ab820 | ||
|
|
8bd3cccc08 | ||
|
|
78fbfa1dde | ||
|
|
16dd841ce5 | ||
|
|
992de38184 | ||
|
|
835e86ad19 | ||
|
|
ef5fb7a98e | ||
|
|
e8cb3cbfa4 | ||
|
|
68b2c9e7d3 | ||
|
|
e78427483c | ||
|
|
25364aa2a6 | ||
|
|
525d2df3cc | ||
|
|
701031a473 | ||
|
|
1960e02ab7 | ||
|
|
ca2ed1c941 | ||
|
|
bde8528859 | ||
|
|
86392857c5 | ||
|
|
95c6c16851 | ||
|
|
ce4f0c4fee | ||
|
|
2d081e6ce6 | ||
|
|
000106200f | ||
|
|
2bb4274517 | ||
|
|
5cd81b8c92 | ||
|
|
5712053ad8 | ||
|
|
192db1c343 | ||
|
|
a3bd57489a | ||
|
|
d69e76959b | ||
|
|
6d784a1a7e | ||
|
|
11d2bca8a7 | ||
|
|
f922e84eb6 | ||
|
|
e2bca737f0 | ||
|
|
940ce98d2c | ||
|
|
72590e6b8f | ||
|
|
3e81ca7da5 | ||
|
|
c4fa7a965d | ||
|
|
1a6e14c3bb | ||
|
|
7379d8a54d | ||
|
|
b63464d239 | ||
|
|
1dac4b2dc1 | ||
|
|
44e7b36a8b | ||
|
|
a26c677df4 | ||
|
|
5d10dda5a1 | ||
|
|
0253a46dbb | ||
|
|
9593059258 | ||
|
|
3f0efc2a6f | ||
|
|
b9593adc7c | ||
|
|
6cf3b54b4b | ||
|
|
78411d29a7 | ||
|
|
f8a49c41ef | ||
|
|
a0a0c8e308 | ||
|
|
e5814dad73 | ||
|
|
f076594288 | ||
|
|
7dfe0bf9b2 | ||
|
|
d9ce8828c9 | ||
|
|
cb2df234ae | ||
|
|
7d73dc6602 | ||
|
|
16bd8cef38 | ||
|
|
f2567f9af4 |
@@ -7,3 +7,4 @@ config.cache
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
do-config.sh
|
||||
|
||||
18
Doxyfile
18
Doxyfile
@@ -22,7 +22,7 @@ PROJECT_NAME = SimGear
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 0.3.0
|
||||
PROJECT_NUMBER = 0.3.5
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
@@ -64,14 +64,14 @@ EXTRACT_STATIC = NO
|
||||
# various overviews, but no documentation section is generated.
|
||||
# This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_MEMBERS = YES
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy.
|
||||
# If set to NO (the default) these class will be included in the various
|
||||
# overviews. This option has no effect if EXTRACT_ALL is enabled.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_UNDOC_CLASSES = YES
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
|
||||
# include brief member descriptions after the members that are listed in
|
||||
@@ -298,6 +298,7 @@ WARN_LOGFILE =
|
||||
# with spaces.
|
||||
|
||||
INPUT = \
|
||||
DoxygenMain.cxx \
|
||||
simgear/bucket \
|
||||
simgear/compiler.h \
|
||||
simgear/constants.h \
|
||||
@@ -307,13 +308,14 @@ INPUT = \
|
||||
simgear/magvar \
|
||||
simgear/math \
|
||||
simgear/misc \
|
||||
simgear/props \
|
||||
simgear/route \
|
||||
simgear/scene \
|
||||
simgear/screen \
|
||||
simgear/serial \
|
||||
simgear/sg_inlines.h \
|
||||
simgear/sg_traits.hxx \
|
||||
simgear/sg_zlib.h \
|
||||
simgear/sky \
|
||||
simgear/sound \
|
||||
simgear/threads \
|
||||
simgear/timing \
|
||||
simgear/xml
|
||||
@@ -335,7 +337,7 @@ RECURSIVE = YES
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE = simgear/metakit simgear/zlib
|
||||
EXCLUDE = simgear/scene/sky/clouds3d
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
@@ -385,7 +387,7 @@ FILTER_SOURCE_FILES = NO
|
||||
# of all compounds will be generated. Enable this if the project
|
||||
# contains a lot of classes, structs, unions or interfaces.
|
||||
|
||||
ALPHABETICAL_INDEX = NO
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
@@ -514,7 +516,7 @@ COMPACT_LATEX = NO
|
||||
# by the printer. Possible values are: a4, a4wide, letter, legal and
|
||||
# executive. If left blank a4wide will be used.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
PAPER_TYPE = letter
|
||||
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
108
DoxygenMain.cxx
Normal file
108
DoxygenMain.cxx
Normal file
@@ -0,0 +1,108 @@
|
||||
/* This is a dummy code file that only contains doxygen main page
|
||||
documentation. It has a .cxx extension so that emacs will happily
|
||||
autoindent correctly. */
|
||||
|
||||
/** \mainpage SimGear
|
||||
* Simulation, Visualization, and Game development libraries.
|
||||
|
||||
* \section intro Introduction
|
||||
*
|
||||
* SimGear is a collection of libraries which provide a variety of
|
||||
* functionality useful for building simulations, visualizations, and
|
||||
* even games. All the SimGear code is designed to be portable across
|
||||
* a wide variety of platforms and compilers. It has primarily been
|
||||
* developed in support of the FlightGear project, but as development
|
||||
* moves forward, we are generalizing the code to make more of it
|
||||
* useful for other types of applications.
|
||||
*
|
||||
* Some of the functionality provide includes
|
||||
*
|
||||
* - Compiler and platform abstractions for many tricky differences.
|
||||
* (compiler.h)
|
||||
*
|
||||
* - A whole earth tiling/indexing scheme. (SGBucket)
|
||||
*
|
||||
* - A console debugging output scheme that tracks severity and
|
||||
* category that can be completely compiled out for a final build release.
|
||||
* (logstream.hxx)
|
||||
*
|
||||
* - Code to manage "real" time (SGTime), time zones (SGTimeZone), and
|
||||
* millesecond time differences (SGTimeStamp).
|
||||
*
|
||||
* - Code to calculate accurate positions of sun, moon, stars, and
|
||||
* planets for a given time, date, season, earth location, etc.
|
||||
* (SGEphemeris)
|
||||
*
|
||||
* - Code to render a realistic sky dome, cloud layers, sun, moon,
|
||||
* stars, and planets all with realistic day/night/sunset/sunrise
|
||||
* effects. Includes things like correct moon phase, textured moon,
|
||||
* sun halo, etc. (SGSky is built on top of SGCloudLayer ...)
|
||||
*
|
||||
* - Simple serial (SGSerial), file (SGFile), socket (SGSocket), and
|
||||
* UDP socket (SGSocketUDP) I/O abstractions.
|
||||
*
|
||||
* - Code to calculate magnetic variation. (SGMagVar)
|
||||
*
|
||||
* - A variety of classes and functions for interpolation tables
|
||||
* (SGInterpTable), least squares computation (leastsqs.hxx), 3D
|
||||
* point/vectors (Point3D), 3D polar math and conversions (polar3d.hxx),
|
||||
* WGS-84 math and conversions (sg_geodesy.hxx), random number abstraction
|
||||
* (sg_random.h), STL conglomerates for common list types (sg_types.hxx),
|
||||
* and other vector and linear algebra routines (vector.hxx)
|
||||
*
|
||||
* - An abstraction to hide platform dependent path naming schemes. (SGPath)
|
||||
*
|
||||
* - A C++ streams wrapper to handle compress input/output streams.
|
||||
* (sg_gzifstream)
|
||||
*
|
||||
* - An optimized "property manager" which associates ascii property
|
||||
* names with their corresponding value. This can be a great way to build
|
||||
* loose linkages between modules, or build linkages/connections that can
|
||||
* be determined from config files or at runtime. (SGPropertyNode)
|
||||
* Also included is a set of functions to dump the property tree into a
|
||||
* standard xml file and subsequently read/parse a standard xml file and
|
||||
* rebuild the associated property tree. (props_io.hxx)
|
||||
*
|
||||
* - Scene management and drawing routines:
|
||||
* - material property management
|
||||
* - object management
|
||||
* - terrain tile management and paging
|
||||
* - sky dome rendering (with ephemeral objects)
|
||||
*
|
||||
* - Code to handle screen dumps (screen-dump.hxx) and ultra-hires
|
||||
* tile rendered screen dumps (tr.h)
|
||||
*
|
||||
* - A sound effects manager. (SGSoundMgr, SGSimpleSound, SGSound)
|
||||
*
|
||||
* - A threading abstraction. (SGThread)
|
||||
*
|
||||
* - A simple but highly functional XML parser that interfaces nicely
|
||||
* with the property manager. (easyxml.hxx)
|
||||
|
||||
* \section supports Supported Platforms
|
||||
* SimGear has been built on the following platforms:
|
||||
*
|
||||
* - Linux (x86)
|
||||
* - Windows (MSVC, Cygwin, Mingwin)
|
||||
* - SGI (native compilers)
|
||||
* - Mac OS X
|
||||
* - FreeBSD
|
||||
|
||||
* \section depends Dependencies
|
||||
*
|
||||
* SimGear depends on several other open source packages. These must
|
||||
* be installed before SimGear can be installed:
|
||||
*
|
||||
* - glut and opengl
|
||||
* - plib (http://plib.sf.net)
|
||||
* - metakit
|
||||
* - zlib
|
||||
* - libjpeg (optional)
|
||||
* - pthread (optional)
|
||||
|
||||
* \section license Licensing
|
||||
*
|
||||
* SimGear is licensed under the terms of the LGPL
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
EXTRA_DIST = \
|
||||
acinclude.m4 \
|
||||
autogen.sh \
|
||||
DoxygenMain.cxx
|
||||
README.MSVC \
|
||||
README.metakit \
|
||||
README.zlib \
|
||||
@@ -10,7 +11,7 @@ EXTRA_DIST = \
|
||||
SUBDIRS = src-libs simgear
|
||||
|
||||
dist-hook:
|
||||
(cd $(top_srcdir); $(HOME)/projects/FlightGear-0.7/admin/am2dsp.pl)
|
||||
(cd $(top_srcdir); $(HOME)/projects/FlightGear-0.9/admin/am2dsp.pl)
|
||||
|
||||
#
|
||||
# Rule to build RPM distribution package
|
||||
|
||||
89
NEWS
89
NEWS
@@ -1,3 +1,92 @@
|
||||
New in 0.3.5
|
||||
* March 26, 2004
|
||||
|
||||
* Added Andy's nasal interpreter for small built in scripting tasks.
|
||||
Nasal integrates nicely with FlightGear's property system.
|
||||
* Added new (much simpler) metar parsing code (removed older more
|
||||
complex code.)
|
||||
* Support VASI/PAPI lights correctly.
|
||||
* Fixes to cloud animation.
|
||||
* Updates to sky dome coloring as well as sun/moon coloring.
|
||||
* Vary environment lighting with visibility (subtlely.)
|
||||
* Support control of alpha test in model animation.
|
||||
* Complete rewrite of the event manager.
|
||||
* Updates to low level socket code to make it more flexible.
|
||||
* Win32 serial port communication fixes.
|
||||
* sg_geodesy rewritten to be more accurate and robust and symmetric.
|
||||
|
||||
|
||||
New in 0.3.4
|
||||
* October 22, 2003
|
||||
|
||||
* Removed Metakit, FlightGear no longer uses it.
|
||||
* Removed all glut dependencies from SimGear.
|
||||
* Moved FGEventMgr and FGSubsystemMgr over to SimGear.
|
||||
* Some more incremental work on 3D clouds.
|
||||
* Added some "fastmath" functions.
|
||||
* Some lighting tweaks and fixes (especially for taxiways.)
|
||||
* Added support for "blend" and "scale" and "texture" animations.
|
||||
* Added support for animating rotations around an arbitrary axis (so the
|
||||
aircraft designer isn't forced to figure out animations as a combination
|
||||
of rotations around X, Y, and X axes.
|
||||
* Updates to sky dome modeling and make cloud layers follow the curve
|
||||
of the earth (sort of.)
|
||||
* Updates to sky dome, cloud, and sunrise/sunset color and lighting
|
||||
effects to make them more realistic and lifelike.
|
||||
* Better support for detecting and using OpenGL extensions at run time.
|
||||
* Add support for win32-pthreads in MSVC.NET
|
||||
* Various MSVC fixes.
|
||||
* Various Solaris fixes.
|
||||
* Various cygwin/mingwin fixes.
|
||||
* Various Mac OS X fixes.
|
||||
* Various Irix fixes.
|
||||
|
||||
|
||||
New in 0.3.3
|
||||
* June 3, 2003
|
||||
|
||||
* Fix a compile problem for cygwin
|
||||
* Updated/tweaked doxygen documentation in several areas
|
||||
|
||||
|
||||
New in 0.3.2
|
||||
* June 2, 2003
|
||||
|
||||
* Moved quite a bit of low level model management and "state"
|
||||
management code from FlightGear into SimGear and did a substantial
|
||||
amount of restructuring and dependency clean up in the process.
|
||||
Created a "scene" subdirectory with sub-subdirectories for material
|
||||
management, basic model and model animation management, sky
|
||||
rendering, and low level loaders for the "TerraGear" tile object format.
|
||||
* Removed support of the flat shaded and non-textured material
|
||||
property varients. You can still do these things, but extra states
|
||||
are no longer set up automatically.
|
||||
* Removed 3d clouds from the default build ... these need a maintainer
|
||||
or better yet, a complete plib-based rewrite.
|
||||
* Moved the FlightGear sound effect manager code over to SimGear.
|
||||
* Updated the cloud layer surface to better follow the inverted bowl
|
||||
shape.
|
||||
* Much work on cloud/sky coloring, and also much work on
|
||||
sunset/sunrise coloring.
|
||||
* Fixed an obscure bug in cloud texture loading which caused each
|
||||
cloud texture to be loaded 5 times. Ouch!
|
||||
* Various class and function renaming to make them better fit into the
|
||||
standard SimGear naming scheme.
|
||||
* Added some additional convenience functions to the SGPath class.
|
||||
* Upgraded the distributed version of metakit.
|
||||
* FreeBSD fixes.
|
||||
* Irix fixes (better STL/ISO C++ header support.)
|
||||
* Mingwin fixes.
|
||||
* Better MacOS support
|
||||
* MSVC fixes.
|
||||
|
||||
|
||||
New in 0.3.1
|
||||
* December 4, 2002
|
||||
|
||||
* Fix a major packaging blunder with several missing files.
|
||||
|
||||
|
||||
New in 0.3.0
|
||||
* December 3, 2002
|
||||
|
||||
|
||||
285
README.metakit
285
README.metakit
@@ -1,285 +0,0 @@
|
||||
For your convenience (and with the author's permission) a copy of the
|
||||
MetaKit source is bundled with SimGear in $(top_srcdir)/src-libs/.
|
||||
You must have metakit installed before you can build SimGear.
|
||||
|
||||
- Most linux distributions have a metakit package. For linux
|
||||
developers, we recommend ysou install your distributions package
|
||||
rather than building from source.
|
||||
|
||||
- For developers on most other platforms, you will have to build
|
||||
metakit from source and install it yourself. For your convenience a
|
||||
tar ball of the metakit source is included with the simgear source
|
||||
distribution. Untar the metakit source, and follow the included
|
||||
build and installation instructions.
|
||||
|
||||
Once metakit is installed you can return to configuring and building
|
||||
Simgear.
|
||||
|
||||
=============================================================================
|
||||
|
||||
Potentially important build note:
|
||||
|
||||
Later on when you are linking programs with -lmk4 (i.e. FlightGear or one
|
||||
of it's associated programs) if you come across an error similar to the
|
||||
following:
|
||||
|
||||
c++ -Wall -O2 -L/usr/local/lib -o gensimple gensimple.o libAirports.a
|
||||
-lsgdebug -lsgmisc -lmk4 -lz -lm
|
||||
/usr/local/lib/libmk4.a(view.o)(.text+0x1c8):view.cpp: multiple definition
|
||||
of `c4_View::~c4_View(void)'
|
||||
libAirports.a(simple.o)(.text$_$_7c4_View+0x0):simple.cxx: first defined
|
||||
here
|
||||
collect2: ld returned 1 exit status
|
||||
make[2]: *** [gensimple] Error 1
|
||||
make[2]: Leaving directory `/home/curt/FlightGear-0.7.7/src/Airports'
|
||||
make[1]: *** [all-recursive] Error 1
|
||||
make[1]: Leaving directory `/home/curt/FlightGear-0.7.7/src'
|
||||
make: *** [all-recursive] Error 1
|
||||
|
||||
Then you need to come back and rebuild Metakit with the -DNDEBUG flag.
|
||||
For unix/cygwin systems, modify the unix/Makefile file and add -DNDEBUG
|
||||
to the CFLAGS line.
|
||||
|
||||
Now we return you to the official metakit readme ... :-)
|
||||
|
||||
|
||||
The MetaKit Library 2.01 March 2000
|
||||
==============================================================================
|
||||
|
||||
|
||||
WHAT IT IS - MetaKit is an embeddable database which runs on Unix, Windows,
|
||||
Macintosh, and other platforms. It lets you build applications which
|
||||
store their data efficiently, in a portable way, and which will not need a
|
||||
complex runtime installation. In terms of the data model, MetaKit takes
|
||||
the middle ground between RDBMS, OODBMS, and flat-file databases - yet it
|
||||
is quite different from each of them.
|
||||
|
||||
WHAT IT ISN'T - MetaKit is not: 1) multi-user/-threading, 2) scalable to
|
||||
gigabytes, 3) proprietary software, 4) full of bugs, 5) just a toy.
|
||||
|
||||
TECHNOLOGY - Everything is stored variable-sized yet with efficient positional
|
||||
row access. Changing an existing datafile structure is as simple as re-
|
||||
opening it with that new structure. All changes are transacted. You can
|
||||
mix and match software written in C++, Python, and Tcl. Things can't get
|
||||
much more flexible...
|
||||
|
||||
CORE - The Metakit core library is written in C++. It has a code footprint of
|
||||
just over 100 Kb on Windows. It can be used as DLL, or linked statically.
|
||||
Debug builds include extensive assertion checks to catch problems early.
|
||||
|
||||
PYTHON - The binding for Python is called "Mk4py". It uses SCXX by Gordon
|
||||
McMillan as C++ glue interface. The source is in directory "python/".
|
||||
|
||||
TCL/TK - The MK extension for Tcl is called "Mk4tcl". It is being used in a
|
||||
number of commercial projects, for in-house use as well as in commercially
|
||||
distributed products. The source is in directory "tcl/".
|
||||
|
||||
LICENSE AND SUPPORT - MetaKit 2.01 is distributed as open source software (the
|
||||
X/MIT-style license is at the end of this document). Commercial support
|
||||
is available through an Enterprise License, see the URL mentioned below.
|
||||
|
||||
DOCUMENTATION - All documentation uses HTML. The main page is "MetaKit.html",
|
||||
which leads to the rest of the documentation in the "doc/" directory.
|
||||
|
||||
WEBSITE URLS - The main pages on the world wide web, for news and downloads:
|
||||
Homepage: http://www.equi4.com/metakit/
|
||||
Python news: http://www.equi4.com/metakit/python.html
|
||||
Tcl/Tk news: http://www.equi4.com/metakit/tcl.html
|
||||
License info: http://www.equi4.com/metakit/license.html
|
||||
Contact info: http://www.equi4.com/contact.html
|
||||
|
||||
|
||||
INSTALLATION
|
||||
============
|
||||
|
||||
Starting with this release, all platform builds and language bindings are now
|
||||
designed to work from a single common "builds/" directory. It turns out to
|
||||
be impossible to keep build side-effects limited to *just* this directory
|
||||
(CodeWarrior can't be told where to place its temp data, and Visual C++ still
|
||||
alters a few files next to the project ".dsw" file, to name two offenders).
|
||||
|
||||
UNIX
|
||||
|
||||
It is no longer advised to build the Unix code in the "unix/" directory.
|
||||
Instead, you should perform the following steps:
|
||||
% cd builds
|
||||
% ../unix/configure
|
||||
% make
|
||||
% make test
|
||||
And optionally (this only installs the core lib, not script extensions):
|
||||
% make install
|
||||
|
||||
By switching to the "builds/" directory, you will keep the distribution
|
||||
directory tree 100% unaltered. All changes are made in this subdir, and
|
||||
all final build results are left behind in this same subdir.
|
||||
|
||||
Nastiness: if you build Mk4tcl, please do a "make Mk4tcl.so" as well.
|
||||
And if you intend to create the Python extension, do a "make Mk4py.so".
|
||||
The "libmk4tcl.so.0.0.0" and "libMk4py.so.0.0.0" targets are bogus ones.
|
||||
|
||||
You will probably have to make changes in the makefile to locate the
|
||||
proper includes and libs for Python (Tcl has been fixed, see "--with-tcl).
|
||||
You probably only need to adjust "CXX_SWITCHES_PY" to find the headers.
|
||||
|
||||
To build with STL containers and strings, you can do the following:
|
||||
make CXXFLAGS='-Dq4_STD' test # add -O3 etc, as needed
|
||||
This passes the test suite on Linux RedHat 5.2 with gcc 2.95-2.
|
||||
|
||||
See below for some platform-specific build notes.
|
||||
|
||||
WINDOWS
|
||||
|
||||
There is a "win/" directory which contains subdirectories for a number of
|
||||
compiler systems. MetaKit has been built with many different compilers
|
||||
in the past (Microsoft, Borland, Watcom, Symantec, Metrowerks, Optima),
|
||||
but to preserve my sanity (there are 12 configurations for MSVC6 alone!),
|
||||
I am limiting myself to MSVC6, MWCW5, Borland C++ Builder 4, and Cygwin.
|
||||
|
||||
The MS Visual C++ 6.0 project is "win/msvc60/mksrc.dsw", with subprojects
|
||||
for the C++ demo (mkdemo), building dll's (mkdll), static libs (mklib),
|
||||
regression tests (mktest), as well as Tcl (mktcl) and Python (mkpython).
|
||||
It has been set up to place all intermediate files and final results in
|
||||
the "builds/" subdirectory, even though you'll launch it from "win/".
|
||||
|
||||
To build with STL containers and strings under MSVC, define "q4_STD".
|
||||
To build with MFC containers and strings under MSVC, define "q4_MFC".
|
||||
|
||||
The Metrowerks Codewarrior project is in the "mac/" directory, and can be
|
||||
used to build both Mac and Windows versions (on either Mac *or* Windows).
|
||||
The core libraries are built with "mac/cw5.mcp", demos / tests are built
|
||||
with "cw5apps.mcp", Tcl is "cw5tcl.mcp", and Python is "cw5python.mcp".
|
||||
|
||||
The Borland C++ Builder projects have not yet been incorporated in this
|
||||
release, but the "KitViewer" application is an example of how to use BCB.
|
||||
|
||||
The Cygwin build (B20.1 / gcc 2.95.2) is different, because it uses the
|
||||
unix autoconf system, and must be launched as described above for UNIX.
|
||||
I have upgraded to the latest development of libtool to be able to build
|
||||
DLL's with Cygwin. You can build the "-mno-cygwin" version by editing
|
||||
the Makefile by hand and adding that option to CXXFLAGS.
|
||||
|
||||
Rob Bloodgood adds that the following GCC options are for maximum code
|
||||
efficiency on x86 hardware: "-O2 -m486 -malign-loops=2 -malign-jumps=2".
|
||||
I have not yet tried this myself, but am passing on the tip.
|
||||
|
||||
MACINTOSH
|
||||
|
||||
The Mac version requires Metrowerks CodeWarrior 5. See the info above
|
||||
in the Windows section (MWCW is multi-platform). The projects are all
|
||||
located in the "mac/" folder, which is also where MWCW will place its own
|
||||
"... Data" folders with intermediate results. As with all other setups,
|
||||
final results are made to end up in the "builds/" directory.
|
||||
|
||||
Static 68K builds appear to work fine, the 68K CFM variants will need
|
||||
some more work (I couldn't get the libraries to export their symbols).
|
||||
|
||||
|
||||
PLATFORM-SPECIFIC NOTES
|
||||
=======================
|
||||
|
||||
* Linux RH 5.2 / gcc 2.95.2
|
||||
|
||||
Builds with gcc 2.95.2 work out of the box. The Tcl extension ends up as
|
||||
".libs/libmk4tcl.so.0.0.0" (to please libtool), and should be renamed to
|
||||
"Mk4tcl.so". Similarly, ".libs/libMk4py.so.0.0.0" is in fact the Python
|
||||
extension, and *must* be renamed to "Mk4py.so" to call it from Python.
|
||||
|
||||
The core MK libs end up as ".libs/libmk4.a" and ".libs/libmk4.so.0.0.0".
|
||||
|
||||
* Solaris 2.6 / gcc 2.8.1
|
||||
|
||||
The Solaris builds are nasty for several reasons:
|
||||
|
||||
- I do not own such a machine, and often have to make arrangements
|
||||
(or fight limited space on one of the machines I can telnet to).
|
||||
- The gcc 2.8.1 optimizer appears to be buggy, I have had to turn off
|
||||
the default "-O3" flag to prevent compiler crashes (several files).
|
||||
This problems appears to be resolved with gcc 2.95.
|
||||
- Locking on Solaris (especially w.r.t NFS) remains a mystery to me.
|
||||
The Tcl and Python extensions both use locking (the core not yet).
|
||||
See tcl/Mk4tcl.cpp around line 520, and python/PyStorage.cpp around
|
||||
line 80 for details. It's all pretty messy, and not 100% correct.
|
||||
|
||||
Despite this, I'm doing my best to resolve these issues. Having a solid
|
||||
build of the core *and* of Tcl / Python extensions is quite important.
|
||||
|
||||
* Other Unix systems
|
||||
|
||||
No further notes, though many systems will build fine out of the box.
|
||||
|
||||
* Windows
|
||||
|
||||
MSVC 6 builds MK as static lib and as DLL (universal config, I have not
|
||||
yet created build versions with MFC or STL, mainly because MK can now be
|
||||
used in all contexts regardless of how it was built). The Python and Tcl
|
||||
extensions build as dynamic extensions (a static build is easy to add).
|
||||
|
||||
MWCW 5 builds MK as static lib and as DLL (interestingly enough, the DLL
|
||||
is slightly smaller than MSVC 6 - 102 vs 108 Kb - when their runtimes are
|
||||
linked in dynamically as well). I have not added Win builds for Tcl or
|
||||
Python, since MSVC 6 has those already.
|
||||
|
||||
Cygwin B20.1, with gcc 2.95.2 ugrade, also builds MK as static lib and as
|
||||
DLL. Both "pure" Cygwin (i.e. requiring cygwin1.dll) and mingw32 (using
|
||||
the -mno-cygwin flag) build, but there are some hairy include issues when
|
||||
it comes to choosing the right locking model for Tcl and Python. These
|
||||
issues have not been resolved fully.
|
||||
|
||||
* Macintosh
|
||||
|
||||
MWCW 5 builds PPC shared libs, PPC static libs, and 68K static libraries.
|
||||
|
||||
Building 68K CFM libraries leads to a "MetaKit 68K.shlb" which comes out
|
||||
of the linker without errors, but the result does not seem to have any
|
||||
export symbols defined (despite the fact that the library is over 200 K).
|
||||
Because of that, I've been unable to build apps or Mk4tcl/Mk4py so far.
|
||||
|
||||
The other three configurations build, but for some reason MK's regression
|
||||
test stops at L03 (everything up to that point looks ok, i.e. over 90%).
|
||||
|
||||
The Mk4tcl PPC extension appears to work (quick manual test), and so does
|
||||
the Python extension, "Mk4py.PPC.slb". I have not yet given these two
|
||||
a serious workout, hoping to have a basic test harness in place soon.
|
||||
|
||||
* VMS, BeOS, ...
|
||||
|
||||
No news yet, please report your findings with any other platform builds.
|
||||
|
||||
|
||||
WHAT'S MISSING HERE
|
||||
===================
|
||||
|
||||
- a section on basic concepts (or maybe it doesn't belong here?)
|
||||
- a section on getting started (C++, Python, Tcl all differ - point to
|
||||
the respective intro pages)
|
||||
- maybe a small sample for each of C++ / Tcl / Python, to give an idea
|
||||
- mention TclKit, scripted docs (WiKit/Tequila?), VFS?
|
||||
- I forgot... please tell me :)
|
||||
|
||||
|
||||
LICENSE AND COPYRIGHT STATEMENT
|
||||
===============================
|
||||
|
||||
Copyright (c) 1996-2000 Jean-Claude Wippler
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
==============================================================================
|
||||
-- Jean-Claude Wippler <jcw@equi4.com>
|
||||
2191
SimGear.dsp
2191
SimGear.dsp
File diff suppressed because it is too large
Load Diff
359
configure.ac
359
configure.ac
@@ -1,16 +1,16 @@
|
||||
dnl Process this file with aclocal ; automake -a ; autoconf to produce a
|
||||
dnl working configure script.
|
||||
dnl Process this file with autoget.sh to produce a working configure
|
||||
dnl script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([simgear/bucket/newbucket.cxx])
|
||||
|
||||
# Require at least automake 2.52
|
||||
dnl Require at least automake 2.52
|
||||
AC_PREREQ(2.52)
|
||||
|
||||
dnl Initialize the automake stuff
|
||||
AM_INIT_AUTOMAKE(SimGear, 0.3.0)
|
||||
AM_INIT_AUTOMAKE(SimGear, 0.3.5)
|
||||
|
||||
dnl Specify KAI C++ compiler and flags.
|
||||
dnl Borrowed with slight modification from blitz distribution.
|
||||
@@ -38,20 +38,45 @@ AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
|
||||
dnl set the $host variable based on local machine/os
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# Used on the Irix platform
|
||||
AR="ar"
|
||||
ARFLAGS="cru"
|
||||
OS=`uname -s`
|
||||
if test "$OS" = "IRIX" -o "$OS" = "IRIX64"; then
|
||||
if test "$CXX" = "CC"; then
|
||||
AR="CC -ar"
|
||||
dnl Used on the Irix platform
|
||||
case "${host}" in
|
||||
*-*-irix*)
|
||||
if test "x$CXX" = "xCC" -o "x$CXX" = "xccache CC"; then
|
||||
AR="$CXX -ar"
|
||||
ARFLAGS="-o"
|
||||
CXXFLAGS="$CXXFLAGS -I$(top_srcdir)/simgear/compatibility/MIPSpro740"
|
||||
compatibility_DIR="compatibility"
|
||||
MIPSpro_DIRS="MIPSpro740"
|
||||
AC_MSG_CHECKING([for MIPSpro compiler version 7.4 or newer])
|
||||
AC_TRY_RUN([
|
||||
int main() {
|
||||
if ( _COMPILER_VERSION < 740 ) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
], AC_MSG_RESULT(yes),
|
||||
[ AC_MSG_RESULT(no)
|
||||
CXXFLAGS="$CXXFLAGS -I$(top_srcdir)/simgear/compatibility/MIPSpro721"
|
||||
MIPSpro_DIRS="$(MIPSpro_DIRS) MIPSpro721"
|
||||
AC_MSG_WARN([Using our own subset of the STL headers])
|
||||
], AC_MSG_RESULT(yes))
|
||||
AC_SUBST(MIPSpro_DIRS)
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AR="ar"
|
||||
ARFLAGS="cru"
|
||||
compatibility_DIR=
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(AR)
|
||||
AC_SUBST(ARFLAGS)
|
||||
|
||||
AC_SUBST(compatibility_DIR)
|
||||
|
||||
if echo $includedir | egrep "simgear$" > /dev/null; then
|
||||
echo "includedir is" $includedir "libdir is" $libdir
|
||||
@@ -60,8 +85,7 @@ else
|
||||
echo "includedir changed to" $includedir "libdir is" $libdir
|
||||
fi
|
||||
|
||||
# set logging default value
|
||||
# with_logging=yes
|
||||
dnl set logging; default value of with_logging=yes
|
||||
AC_ARG_WITH(logging, [ --with-logging Include logging output (default)])
|
||||
if test "x$with_logging" = "xno" ; then
|
||||
AC_DEFINE([FG_NDEBUG], 1, [Define for no logging output])
|
||||
@@ -89,39 +113,34 @@ else
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_JPEG_SERVER, test "x$with_jpeg_factory" = "xyes")
|
||||
|
||||
# specify the plib location
|
||||
AC_ARG_WITH(plib, [ --with-plib=PREFIX Specify the prefix path to plib])
|
||||
|
||||
dnl Check for MS Windows environment
|
||||
AC_CHECK_HEADER(windows.h)
|
||||
|
||||
AC_EGREP_CPP(yes,
|
||||
[#ifdef __MINGW32__
|
||||
yes
|
||||
#endif
|
||||
],is_mingw=yes, is_mingw=no)
|
||||
|
||||
echo "IS_MINGW = $is_mingw"
|
||||
AM_CONDITIONAL(IS_MINGW, test "x$is_mingw" = "xyes")
|
||||
|
||||
AC_EGREP_CPP(yes,
|
||||
[#ifdef __CYGWIN__
|
||||
yes
|
||||
#endif
|
||||
],is_cygwin=yes, is_cygwin=no)
|
||||
|
||||
echo "IS_CYGWIN = $is_cygwin"
|
||||
AM_CONDITIONAL(IS_CYGWIN, test "x$is_cygwin" = "xyes")
|
||||
|
||||
if test "x$HOSTTYPE" != "xmacintosh" -a "x$is_mingw" != "xyes"; then
|
||||
dnl extra library and include directories
|
||||
EXTRA_DIRS="/usr/X11R6"
|
||||
|
||||
if test -d /opt/X11R6 ; then
|
||||
EXTRA_DIRS="$EXTRA_DIRS /opt/X11R6"
|
||||
fi
|
||||
if test "x$with_plib" != "x" ; then
|
||||
echo "plib prefix is $with_plib"
|
||||
EXTRA_DIRS="${EXTRA_DIRS} $with_plib"
|
||||
fi
|
||||
|
||||
dnl Determine an extra directories to add to include/lib search paths
|
||||
case "${host}" in
|
||||
*-apple-darwin* | *-*-mingw32*)
|
||||
echo no EXTRA_DIRS for $host
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -d /usr/X11R6 ; then
|
||||
EXTRA_DIR1="/usr/X11R6"
|
||||
fi
|
||||
if test -d /opt/X11R6 ; then
|
||||
EXTRA_DIR2="/opt/X11R6"
|
||||
fi
|
||||
EXTRA_DIRS="${EXTRA_DIRS} $EXTRA_DIR1 $EXTRA_DIR2"
|
||||
;;
|
||||
|
||||
esac
|
||||
wi_EXTRA_DIRS(no, ${EXTRA_DIRS})
|
||||
|
||||
|
||||
dnl Using AM_CONDITIONAL is a step out of the protected little
|
||||
dnl automake fold so it is potentially dangerous. But, we are
|
||||
dnl beginning to run into cases where the standard checks are not
|
||||
@@ -129,67 +148,113 @@ dnl enough. AM_CONDITIONALS are then referenced to conditionally
|
||||
dnl build a Makefile.in from a Makefile.am which lets us define custom
|
||||
dnl includes, compile alternative source files, etc.
|
||||
|
||||
dnl X11 might be installed on Mac OS X, don't want to use it if it is.
|
||||
if test "x$HOSTTYPE" != "xmacintosh" ; then
|
||||
dnl Check for X11 (fancy)
|
||||
dnl X11 might be installed on Mac OS X or cygwin/mingwin, we don't want
|
||||
dnl to use it if it is.
|
||||
case "${host}" in
|
||||
*-apple-darwin* | *-*-cygwin* | *-*-mingw32*)
|
||||
echo no fancy X11 check
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_PATH_XTRA
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
null_LIBS="$LIBS"
|
||||
|
||||
AC_CHECK_LIB(m, cos)
|
||||
|
||||
base_LIBS="$LIBS"
|
||||
|
||||
dnl Thread related checks
|
||||
AC_CHECK_LIB(pthread, pthread_exit)
|
||||
AC_CHECK_HEADER(pthread.h)
|
||||
AC_CHECK_LIB(pthread, pthread_exit)
|
||||
if test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||
CXXFLAGS="$CXXFLAGS -D_REENTRANT"
|
||||
CFLAGS="$CFLAGS -D_REENTRANT"
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_THREADS, test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes")
|
||||
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
|
||||
dnl X11 might be installed, but we don't want to use it for OSX -dw-
|
||||
if test "x$HOSTTYPE" != "xmacintosh" ; then
|
||||
AC_CHECK_LIB(X11, XCreateWindow)
|
||||
AC_CHECK_LIB(Xext, XShmCreateImage)
|
||||
AC_CHECK_LIB(Xi, XGetExtensionVersion)
|
||||
AC_CHECK_LIB(ICE, IceOpenConnection)
|
||||
AC_CHECK_LIB(SM, SmcOpenConnection)
|
||||
AC_CHECK_LIB(Xt, XtMalloc)
|
||||
AC_CHECK_LIB(Xmu, XmuLookupStandardColormap)
|
||||
if test "x$ac_cv_lib_pthread_pthread_exit" != "xyes" -a "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||
dnl FreeBSD: System has pthread.h, but -lpthread library check
|
||||
dnl fails. See if we need -pthread instead of -lpthread and look
|
||||
dnl for the functions in libc_r.
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CXXFLAGS="-pthread $CXXFLAGS"
|
||||
CFLAGS="-pthread $FLAGS"
|
||||
save_LIBS=$LIBS
|
||||
AC_CHECK_LIB(c_r, pthread_exit)
|
||||
if test "x$ac_cv_lib_c_r_pthread_exit" != "xyes"; then
|
||||
CXXFLAGS=$save_CXXFLAGS
|
||||
CFLAGS=$save_CFLAGS
|
||||
else
|
||||
dnl This is cheating a bit. pthread_exit comes with using -pthread, not
|
||||
-lpthread
|
||||
ac_cv_lib_pthread_pthread_exit="yes"
|
||||
fi
|
||||
LIBS=$save_LIBS
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_THREADS, test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h" = "xyes")
|
||||
|
||||
thread_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
|
||||
dnl search for network related libraries
|
||||
AC_SEARCH_LIBS(inet_addr, xnet)
|
||||
AC_SEARCH_LIBS(socket, socket)
|
||||
|
||||
network_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
|
||||
dnl check for some default libraries
|
||||
AC_SEARCH_LIBS(cos, m)
|
||||
|
||||
base_LIBS="$LIBS"
|
||||
|
||||
dnl check for OpenGL related libraries
|
||||
case "${host}" in
|
||||
*-*-cygwin* | *-*-mingw32*)
|
||||
dnl CygWin under Windoze.
|
||||
|
||||
AM_CONDITIONAL(EXTGL_NEEDED, test "x$ac_cv_header_windows_h" = "xyes")
|
||||
echo Win32 specific hacks...
|
||||
AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
|
||||
AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms])
|
||||
|
||||
if test "x$HOSTTYPE" = "xmacintosh" ; then
|
||||
dnl Macintosh OSX
|
||||
LIBS="$LIBS -framework OpenGL -framework GLUT"
|
||||
elif test "x$ac_cv_header_windows_h" != "xyes" ; then
|
||||
dnl Reasonable stuff for X-Windows based machines
|
||||
LIBS="$LIBS -lglu32 -lopengl32"
|
||||
LIBS="$LIBS -luser32 -lgdi32 -lwinmm"
|
||||
|
||||
AC_CHECK_LIB(GLcore, glNewList)
|
||||
if test "x$ac_cv_lib_GLcore_glNewList" = "xno" ; then
|
||||
dnl if no GLcore, check for GL
|
||||
AC_CHECK_LIB(GL, glNewList)
|
||||
if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
|
||||
dnl if no GL, check for MesaGL
|
||||
AC_CHECK_LIB(MesaGL, glNewList)
|
||||
fi
|
||||
else
|
||||
dnl add -lwsock32 for mingwin
|
||||
case "${host}" in
|
||||
*-*-mingw32*)
|
||||
base_LIBS="$base_LIBS -lws2_32"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Will link apps with $LIBS"
|
||||
;;
|
||||
|
||||
*-apple-darwin*)
|
||||
dnl Mac OS X
|
||||
|
||||
LIBS="$LIBS -framework OpenGL -framework Carbon -lobjc"
|
||||
;;
|
||||
|
||||
*)
|
||||
dnl X-Windows based machines
|
||||
|
||||
AC_SEARCH_LIBS(XCreateWindow, X11)
|
||||
AC_SEARCH_LIBS(XShmCreateImage, Xext)
|
||||
AC_SEARCH_LIBS(XGetExtensionVersion, Xi)
|
||||
AC_SEARCH_LIBS(IceOpenConnection, ICE)
|
||||
AC_SEARCH_LIBS(SmcOpenConnection, SM)
|
||||
AC_SEARCH_LIBS(XtMalloc, Xt)
|
||||
AC_SEARCH_LIBS(XmuLookupStandardColormap, Xmu)
|
||||
|
||||
AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
|
||||
if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
|
||||
dnl if GLcore found, then also check for GL
|
||||
AC_CHECK_LIB(GL, glXCreateContext)
|
||||
AC_SEARCH_LIBS(glXCreateContext, GL)
|
||||
fi
|
||||
|
||||
dnl if using mesa, check for xmesa.h
|
||||
if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then
|
||||
if test "x$ac_cv_search_glNewList" = "x-lMesaGL"; then
|
||||
AC_CHECK_HEADER(GL/fxmesa.h)
|
||||
if test "x$ac_cv_header_GL_fxmesa_h" = "xyes"; then
|
||||
AC_DEFINE([XMESA], 1, [Define for fxmesa])
|
||||
@@ -197,76 +262,22 @@ elif test "x$ac_cv_header_windows_h" != "xyes" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(GLU, gluLookAt)
|
||||
if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then
|
||||
dnl if no GLU, check for MesaGLU
|
||||
AC_CHECK_LIB(MesaGLU, gluLookAt)
|
||||
fi
|
||||
AC_SEARCH_LIBS(gluLookAt, [ GLU MesaGLU ])
|
||||
;;
|
||||
|
||||
dnl check for glut
|
||||
AC_CHECK_LIB(glut, glutGetModifiers)
|
||||
|
||||
dnl test for glutGameModeString, but avoid adding glut a second time into
|
||||
dnl the list of libraries
|
||||
save_LIBS="$LIBS"
|
||||
AC_CHECK_LIB(glut, glutGameModeString)
|
||||
LIBS="$save_LIBS"
|
||||
else
|
||||
dnl Win32 libs
|
||||
|
||||
echo Win32 specific hacks...
|
||||
AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
|
||||
AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms])
|
||||
|
||||
dnl just define these to true and hope for the best
|
||||
ac_cv_lib_glut_glutGetModifiers="yes"
|
||||
ac_cv_lib_glut_glutGameModeString="yes"
|
||||
|
||||
if test "x$with_sgi_opengl" = "xyes" ; then
|
||||
echo "Building with glut.dll, glu.dll, and opengl.dll"
|
||||
WIN32_GLUT=glut
|
||||
WIN32_GLU=glu
|
||||
WIN32_OPENGL=opengl
|
||||
else
|
||||
echo "Building with glut32.dll, glu32.dll, and opengl32.dll"
|
||||
WIN32_GLUT=glut32
|
||||
WIN32_GLU=glu32
|
||||
WIN32_OPENGL=opengl32
|
||||
fi
|
||||
|
||||
LIBS="$LIBS -l${WIN32_GLUT} -l${WIN32_GLU} -l${WIN32_OPENGL}"
|
||||
LIBS="$LIBS -luser32 -lgdi32"
|
||||
if test "x$is_mingw" = "xyes" ; then
|
||||
EXTRA_DIRS="${EXTRA_DIRS}"
|
||||
fi
|
||||
echo "Will link apps with $LIBS"
|
||||
fi
|
||||
|
||||
if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
|
||||
echo
|
||||
echo "Unable to find the necessary OpenGL or GLUT libraries."
|
||||
echo "See config.log for automated test details and results ..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "x$ac_cv_lib_glut_glutGameModeString" = "xno"; then
|
||||
echo
|
||||
echo "Your version of glut doesn't support game mode."
|
||||
echo "You need to install the latest version of glut. If your"
|
||||
echo "distribution doesn't provide a newer version, you can get the source"
|
||||
echo "code from:"
|
||||
echo
|
||||
echo " http://reality.sgi.com/opengl/glut3/glut3.html"
|
||||
exit 1
|
||||
fi
|
||||
esac
|
||||
|
||||
opengl_LIBS="$LIBS"
|
||||
LIBS="$base_LIBS"
|
||||
|
||||
AC_SUBST(base_LIBS)
|
||||
AC_SUBST(opengl_LIBS)
|
||||
AC_SUBST(thread_LIBS)
|
||||
AC_SUBST(network_LIBS)
|
||||
|
||||
AM_CONDITIONAL(HAVE_XWINDOWS, test "x$ac_cv_lib_X11_XCreateWindow" = "xyes" )
|
||||
dnl Check for MS Windows environment
|
||||
AC_CHECK_HEADER(windows.h)
|
||||
AM_CONDITIONAL(EXTGL_NEEDED, test "x$ac_cv_header_windows_h" = "xyes")
|
||||
|
||||
# The following are C++ items that need to be tested for with the c++
|
||||
# compiler
|
||||
@@ -309,33 +320,31 @@ int main() {
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
dnl Check for system installed metakit
|
||||
AC_CHECK_HEADER(mk4.h)
|
||||
if test "x$ac_cv_header_mk4_h" != "xyes"; then
|
||||
echo
|
||||
echo "Metakit not found, you will need to install this first."
|
||||
echo "Please read the README.metakit for more information."
|
||||
exit
|
||||
fi
|
||||
LIBS="$saved_LIBS"
|
||||
|
||||
AC_LANG_POP
|
||||
|
||||
dnl Specify if we want logging (testing build) or not (release build)
|
||||
|
||||
dnl Check for system installed zlib
|
||||
AC_CHECK_HEADER(zlib.h)
|
||||
if test "x$ac_cv_header_zlib_h" != "xyes"; then
|
||||
echo
|
||||
echo "zlib not found, you will need to install this first."
|
||||
echo "Please read the README.zlib for more information."
|
||||
exit
|
||||
echo
|
||||
echo "zlib library not found."
|
||||
echo
|
||||
echo "If your OS does not provide an installable package for zlib"
|
||||
echo "you will have to compile and install it first yourself. A copy"
|
||||
echo "of zlib-1.1.4.tar.gz is included with SimGear. You will"
|
||||
echo "have to untar this source code, and follow its included instructions"
|
||||
echo "to compile and install on your system."
|
||||
echo
|
||||
echo "configure aborted."
|
||||
echo
|
||||
fi
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS( \
|
||||
fcntl.h getopt.h malloc.h memory.h stdint.h stdlib.h sys/param.h \
|
||||
sys/stat.h sys/time.h sys/timeb.h unistd.h windows.h winbase.h values.h )
|
||||
sys/stat.h sys/time.h sys/timeb.h unistd.h values.h )
|
||||
|
||||
if test "x$ac_cv_header_stdint_h" = "xyes"; then
|
||||
AC_DEFINE([HAVE_STDINT_H], 1, [Define if stdint.h exists])
|
||||
@@ -348,10 +357,14 @@ AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
dnl Checks for library functions.
|
||||
old_LIBS=$LIBS
|
||||
LIBS="$base_LIBS $network_LIBS $opengl_LIBS"
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS( ftime gettimeofday timegm memcpy bcopy mktime strstr rand \
|
||||
random drand48 setitimer getitimer signal GetLocalTime rint getrusage )
|
||||
AC_CHECK_FUNCS( [ \
|
||||
ftime gettimeofday timegm memcpy bcopy mktime strstr rand \
|
||||
random drand48 setitimer getitimer signal GetLocalTime rint getrusage ] )
|
||||
LIBS=$old_LIBS
|
||||
|
||||
AM_CONFIG_HEADER(simgear/simgear_config.h)
|
||||
|
||||
@@ -361,19 +374,30 @@ AC_CONFIG_FILES([ \
|
||||
src-libs/Makefile \
|
||||
simgear/Makefile \
|
||||
simgear/version.h \
|
||||
simgear/compatibility/Makefile \
|
||||
simgear/compatibility/MIPSpro721/Makefile \
|
||||
simgear/compatibility/MIPSpro740/Makefile \
|
||||
simgear/bucket/Makefile \
|
||||
simgear/debug/Makefile \
|
||||
simgear/ephemeris/Makefile \
|
||||
simgear/io/Makefile \
|
||||
simgear/magvar/Makefile \
|
||||
simgear/math/Makefile \
|
||||
simgear/metar/Makefile \
|
||||
simgear/environment/Makefile \
|
||||
simgear/misc/Makefile \
|
||||
simgear/nasal/Makefile \
|
||||
simgear/props/Makefile \
|
||||
simgear/route/Makefile \
|
||||
simgear/scene/Makefile \
|
||||
simgear/scene/material/Makefile \
|
||||
simgear/scene/model/Makefile \
|
||||
simgear/scene/sky/Makefile \
|
||||
simgear/scene/sky/clouds3d/Makefile \
|
||||
simgear/scene/tgdb/Makefile \
|
||||
simgear/screen/Makefile \
|
||||
simgear/serial/Makefile \
|
||||
simgear/sky/Makefile \
|
||||
simgear/sky/clouds3d/Makefile \
|
||||
simgear/sound/Makefile \
|
||||
simgear/structure/Makefile \
|
||||
simgear/threads/Makefile \
|
||||
simgear/timing/Makefile \
|
||||
simgear/xgl/Makefile \
|
||||
@@ -394,7 +418,7 @@ else
|
||||
echo "Debug messages: yes"
|
||||
fi
|
||||
|
||||
echo -n "Automake version: ($AUTO_MAKE_VERSION) "
|
||||
echo -n "Automake version: "
|
||||
automake --version | head -1
|
||||
|
||||
if test "x$with_jpeg_factory" = "xyes"; then
|
||||
@@ -408,3 +432,4 @@ if test "x$ac_cv_lib_pthread_pthread_exit" = "xyes" -a "x$ac_cv_header_pthread_h
|
||||
else
|
||||
echo "Threads: no threads (pthread lib not found.)"
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,29 +5,34 @@ SGTHREAD_DIR =
|
||||
endif
|
||||
|
||||
# METAR_DIRS =
|
||||
METAR_DIRS = metar
|
||||
METAR_DIRS = environment
|
||||
|
||||
EXTRA_DIST = simgear_config.h.vc5 version.h.in
|
||||
|
||||
include_HEADERS = \
|
||||
compiler.h constants.h sg_inlines.h sg_traits.hxx sg_zlib.h version.h
|
||||
compiler.h constants.h sg_inlines.h sg_traits.hxx version.h
|
||||
|
||||
SUBDIRS = \
|
||||
$(compatibility_DIR) \
|
||||
xml \
|
||||
debug \
|
||||
misc \
|
||||
structure \
|
||||
bucket \
|
||||
ephemeris \
|
||||
io \
|
||||
magvar \
|
||||
math \
|
||||
$(METAR_DIRS) \
|
||||
nasal \
|
||||
props \
|
||||
route \
|
||||
scene \
|
||||
screen \
|
||||
serial \
|
||||
sky \
|
||||
sound \
|
||||
$(SGTHREAD_DIR) \
|
||||
timing \
|
||||
xgl
|
||||
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DIST_SUBDIRS = $(SUBDIRS) compatibility threads
|
||||
|
||||
@@ -54,10 +54,7 @@ SG_USING_STD(fabs);
|
||||
#include STL_STRING
|
||||
|
||||
SG_USING_STD(string);
|
||||
|
||||
#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
|
||||
SG_USING_STD(ostream);
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
||||
2
simgear/compatibility/.cvsignore
Normal file
2
simgear/compatibility/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
2
simgear/compatibility/MIPSpro721/.cvsignore
Normal file
2
simgear/compatibility/MIPSpro721/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
14
simgear/compatibility/MIPSpro721/Makefile.am
Normal file
14
simgear/compatibility/MIPSpro721/Makefile.am
Normal file
@@ -0,0 +1,14 @@
|
||||
includedir = @includedir@/compatibility/
|
||||
|
||||
include_HEADERS = \
|
||||
iostream \
|
||||
strstream \
|
||||
sstream \
|
||||
istream \
|
||||
fstream \
|
||||
iterator \
|
||||
iomanip \
|
||||
new \
|
||||
streambuf \
|
||||
\
|
||||
irix_string
|
||||
19
simgear/compatibility/MIPSpro721/fstream
Normal file
19
simgear/compatibility/MIPSpro721/fstream
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
#ifndef __SG_FSTREAM
|
||||
#define __SG_FSTREAM 1
|
||||
|
||||
# if defined(sgi) && !defined(__GNUC__)
|
||||
|
||||
# include <fstream.h>
|
||||
|
||||
namespace std {
|
||||
using ::fstream;
|
||||
using ::ofstream;
|
||||
using ::ifstream;
|
||||
};
|
||||
|
||||
|
||||
# endif
|
||||
|
||||
#endif // !__SG_FSTREAM
|
||||
|
||||
16
simgear/compatibility/MIPSpro721/iomanip
Normal file
16
simgear/compatibility/MIPSpro721/iomanip
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
#ifndef __SG_IOMANIP
|
||||
#define __SG_IOMANIP 1
|
||||
|
||||
# include <iomanip.h>
|
||||
|
||||
namespace std {
|
||||
|
||||
using ::setw;
|
||||
using ::setprecision;
|
||||
|
||||
inline int setfill(int f) { ::setfill(f); }
|
||||
};
|
||||
|
||||
#endif // !__SG_IOMANIP
|
||||
|
||||
52
simgear/compatibility/MIPSpro721/iostream
Normal file
52
simgear/compatibility/MIPSpro721/iostream
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
#ifndef __SG_IOSTREAM
|
||||
#define __SG_IOSTREAM 1
|
||||
|
||||
# if defined(sgi) && !defined(__GNUC__)
|
||||
|
||||
# include <fstream>
|
||||
# include <iostream.h>
|
||||
|
||||
class ios_base : public ios {
|
||||
public:
|
||||
|
||||
typedef int openmode;
|
||||
typedef int seekdir;
|
||||
|
||||
enum { binary = 0 };
|
||||
};
|
||||
|
||||
namespace std {
|
||||
using ::cin;
|
||||
using ::cout;
|
||||
using ::cerr;
|
||||
using ::clog;
|
||||
using ::endl;
|
||||
|
||||
using ::ios;
|
||||
using ::ios_base;
|
||||
using ::iostream;
|
||||
using ::istream;
|
||||
using ::ostream;
|
||||
|
||||
using ::dec;
|
||||
using ::oct;
|
||||
using ::hex;
|
||||
|
||||
enum { skipws=ios::skipws,
|
||||
left=ios::left, right=ios::right, internal=ios::internal,
|
||||
showbase=ios::showbase, showpoint=ios::showpoint,
|
||||
uppercase=ios::uppercase, showpos=ios::showpos,
|
||||
scientific=ios::scientific, fixed=ios::fixed,
|
||||
unitbuf=ios::unitbuf, stdio=ios::stdio
|
||||
#if _BOOL && __EDG_ABI_COMPATIBILITY_VERSION>227 /* bool support */
|
||||
,boolalpha=ios::boolalpha
|
||||
#endif /* bool support */
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# endif
|
||||
|
||||
#endif // !__SG_IOSTREAM
|
||||
|
||||
47
simgear/compatibility/MIPSpro721/irix_string
Normal file
47
simgear/compatibility/MIPSpro721/irix_string
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
#ifndef __SGI_HXX
|
||||
#define __SGI_HXX 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <string>
|
||||
|
||||
inline bool
|
||||
operator!=( const std::string& lhs, const char* rhs)
|
||||
{
|
||||
return lhs.compare( rhs ) != 0;
|
||||
}
|
||||
|
||||
inline bool
|
||||
operator!=( const char* lhs, const std::string& rhs)
|
||||
{
|
||||
return rhs.compare( lhs ) != 0;
|
||||
}
|
||||
|
||||
inline bool
|
||||
operator==( const std::string& lhs, const char* rhs)
|
||||
{
|
||||
return lhs.compare( rhs ) == 0;
|
||||
}
|
||||
|
||||
inline bool
|
||||
operator==( const char* lhs, const std::string& rhs)
|
||||
{
|
||||
return rhs.compare( lhs ) == 0;
|
||||
}
|
||||
|
||||
inline std::string
|
||||
operator+(const std::string& lhs, const char* rhs)
|
||||
{
|
||||
return lhs + std::string(rhs);
|
||||
}
|
||||
|
||||
inline std::string
|
||||
operator+(const char* lhs, const std::string& rhs)
|
||||
{
|
||||
return std::string(lhs) + rhs;
|
||||
}
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* !__SGI_HXX */
|
||||
17
simgear/compatibility/MIPSpro721/istream
Normal file
17
simgear/compatibility/MIPSpro721/istream
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
#ifndef __SG_ISTREAM
|
||||
#define __SG_ISTREAM 1
|
||||
|
||||
# include <iostream>
|
||||
|
||||
# if defined(sgi) && !defined(__GNUC__)
|
||||
|
||||
# include <stream.h>
|
||||
# include <string>
|
||||
|
||||
using std::getline;
|
||||
|
||||
# endif
|
||||
|
||||
#endif // !__SG_ISTREAM
|
||||
|
||||
8
simgear/compatibility/MIPSpro721/iterator
Normal file
8
simgear/compatibility/MIPSpro721/iterator
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
#ifndef __SG_ITERATOR
|
||||
#define __SG_ITERATOR 1
|
||||
|
||||
# include <iterator.h>
|
||||
|
||||
#endif // !__SG_ITERATOR
|
||||
|
||||
12
simgear/compatibility/MIPSpro721/new
Normal file
12
simgear/compatibility/MIPSpro721/new
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
#ifndef __SG_NEW
|
||||
#define __SG_NEW 1
|
||||
|
||||
#if defined(sgi) && !defined(__GNUC__)
|
||||
|
||||
# include <new.h>
|
||||
|
||||
#endif
|
||||
|
||||
#endif // !__SG_NEW
|
||||
|
||||
22
simgear/compatibility/MIPSpro721/sstream
Normal file
22
simgear/compatibility/MIPSpro721/sstream
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
#ifndef __SG_SSTREAM
|
||||
#define __SG_SSTREAM 1
|
||||
|
||||
# include <iostream>
|
||||
# include <strstream>
|
||||
# include <string>
|
||||
|
||||
namespace std {
|
||||
|
||||
class ostringstream : public ostrstream {
|
||||
public:
|
||||
std::string str() { return string(ostrstream::str()); }
|
||||
};
|
||||
|
||||
|
||||
typedef istrstream istringstream;
|
||||
|
||||
};
|
||||
|
||||
#endif // !__SG_SSTREAM
|
||||
|
||||
38
simgear/compatibility/MIPSpro721/streambuf
Normal file
38
simgear/compatibility/MIPSpro721/streambuf
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
#ifndef __SG_STREAMBUF
|
||||
#define __SG_STREAMBUF 1
|
||||
|
||||
# include <iostream>
|
||||
# include <char_traits.h>
|
||||
|
||||
//
|
||||
// Until we find a good way to rename the original streambuf class
|
||||
// and derive our own streambuf class from that, define this variable
|
||||
// for now so the code can inherit our streambuf class instead.
|
||||
//
|
||||
# define SG_NEED_STREAMBUF_HACK 1
|
||||
|
||||
class __streambuf : virtual public streambuf {
|
||||
public:
|
||||
|
||||
typedef std::char_traits<char> traits_type;
|
||||
typedef std::char_traits<char>::int_type int_type;
|
||||
|
||||
typedef streampos pos_type;
|
||||
typedef streamoff off_type;
|
||||
};
|
||||
|
||||
|
||||
# if defined(sgi) && !defined(__GNUC__)
|
||||
|
||||
# define pubsync sync
|
||||
|
||||
namespace std {
|
||||
using ::streambuf;
|
||||
using ::streampos;
|
||||
using ::streamoff;
|
||||
};
|
||||
# endif
|
||||
|
||||
#endif // !__SG_STREAMBUF
|
||||
|
||||
20
simgear/compatibility/MIPSpro721/strstream
Normal file
20
simgear/compatibility/MIPSpro721/strstream
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
#ifndef __SG_STRSTREAM
|
||||
#define __SG_STRSTREAM 1
|
||||
|
||||
# include <strstream.h>
|
||||
|
||||
# if defined(sgi) && !defined(__GNUC__)
|
||||
|
||||
namespace std {
|
||||
using ::ends;
|
||||
|
||||
using ::strstream;
|
||||
using ::istrstream;
|
||||
using ::ostrstream;
|
||||
};
|
||||
|
||||
# endif
|
||||
|
||||
#endif // !__SG_STRSTREAM
|
||||
|
||||
2
simgear/compatibility/MIPSpro740/.cvsignore
Normal file
2
simgear/compatibility/MIPSpro740/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
22
simgear/compatibility/MIPSpro740/Makefile.am
Normal file
22
simgear/compatibility/MIPSpro740/Makefile.am
Normal file
@@ -0,0 +1,22 @@
|
||||
includedir = @includedir@/compatibility
|
||||
|
||||
EXTRA_DIST = README
|
||||
|
||||
include_HEADERS = \
|
||||
cfloat \
|
||||
csetjmp \
|
||||
cstdio \
|
||||
cwchar \
|
||||
cassert \
|
||||
climits \
|
||||
csignal \
|
||||
cstdlib \
|
||||
cwctype \
|
||||
cctype \
|
||||
clocale \
|
||||
cstdarg \
|
||||
cstring \
|
||||
cerrno \
|
||||
cmath \
|
||||
cstddef \
|
||||
ctime
|
||||
9
simgear/compatibility/MIPSpro740/README
Normal file
9
simgear/compatibility/MIPSpro740/README
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
The following header files where taken from the boost clib package
|
||||
(http://www.boost.org):
|
||||
|
||||
cassert climits csignal cstdlib cwctype
|
||||
cctype clocale cstdarg cstring
|
||||
cerrno cmath cstddef ctime
|
||||
cfloat csetjmp cstdio cwchar
|
||||
|
||||
10
simgear/compatibility/MIPSpro740/cassert
Normal file
10
simgear/compatibility/MIPSpro740/cassert
Normal file
@@ -0,0 +1,10 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CASSERT_HEADER
|
||||
#define __CASSERT_HEADER
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#endif // CASSERT_HEADER
|
||||
26
simgear/compatibility/MIPSpro740/cctype
Normal file
26
simgear/compatibility/MIPSpro740/cctype
Normal file
@@ -0,0 +1,26 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CCTYPE_HEADER
|
||||
#define __CCTYPE_HEADER
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
namespace std {
|
||||
using ::isalnum;
|
||||
using ::isdigit;
|
||||
using ::isprint;
|
||||
using ::isupper;
|
||||
using ::tolower;
|
||||
using ::isalpha;
|
||||
using ::isgraph;
|
||||
using ::ispunct;
|
||||
using ::isxdigit;
|
||||
using ::toupper;
|
||||
using ::iscntrl;
|
||||
using ::islower;
|
||||
using ::isspace;
|
||||
}
|
||||
|
||||
#endif // CCTYPE_HEADER
|
||||
10
simgear/compatibility/MIPSpro740/cerrno
Normal file
10
simgear/compatibility/MIPSpro740/cerrno
Normal file
@@ -0,0 +1,10 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CERRNO_HEADER
|
||||
#define __CERRNO_HEADER
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#endif // CERRNO_HEADER
|
||||
10
simgear/compatibility/MIPSpro740/cfloat
Normal file
10
simgear/compatibility/MIPSpro740/cfloat
Normal file
@@ -0,0 +1,10 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CFLOAT_HEADER
|
||||
#define __CFLOAT_HEADER
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#endif // CFLOAT_HEADER
|
||||
10
simgear/compatibility/MIPSpro740/climits
Normal file
10
simgear/compatibility/MIPSpro740/climits
Normal file
@@ -0,0 +1,10 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CLIMITS_HEADER
|
||||
#define __CLIMITS_HEADER
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#endif // CLIMITS_HEADER
|
||||
16
simgear/compatibility/MIPSpro740/clocale
Normal file
16
simgear/compatibility/MIPSpro740/clocale
Normal file
@@ -0,0 +1,16 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CLOCALE_HEADER
|
||||
#define __CLOCALE_HEADER
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
namespace std {
|
||||
using ::lconv;
|
||||
using ::localeconv;
|
||||
using ::setlocale;
|
||||
}
|
||||
|
||||
#endif // CLOCALE_HEADER
|
||||
35
simgear/compatibility/MIPSpro740/cmath
Normal file
35
simgear/compatibility/MIPSpro740/cmath
Normal file
@@ -0,0 +1,35 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CMATH_HEADER
|
||||
#define __CMATH_HEADER
|
||||
|
||||
#include <math.h>
|
||||
|
||||
namespace std {
|
||||
using ::acos;
|
||||
using ::cos;
|
||||
using ::fmod;
|
||||
using ::modf;
|
||||
using ::tan;
|
||||
using ::asin;
|
||||
using ::cosh;
|
||||
using ::frexp;
|
||||
using ::pow;
|
||||
using ::tanh;
|
||||
using ::atan;
|
||||
using ::exp;
|
||||
using ::ldexp;
|
||||
using ::sin;
|
||||
using ::atan2;
|
||||
using ::fabs;
|
||||
using ::log;
|
||||
using ::sinh;
|
||||
using ::ceil;
|
||||
using ::floor;
|
||||
using ::log10;
|
||||
using ::sqrt;
|
||||
}
|
||||
|
||||
#endif // CMATH_HEADER
|
||||
15
simgear/compatibility/MIPSpro740/csetjmp
Normal file
15
simgear/compatibility/MIPSpro740/csetjmp
Normal file
@@ -0,0 +1,15 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CSETJMP_HEADER
|
||||
#define __CSETJMP_HEADER
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
namespace std {
|
||||
using ::jmp_buf;
|
||||
using ::longjmp;
|
||||
}
|
||||
|
||||
#endif // CSETJMP_HEADER
|
||||
16
simgear/compatibility/MIPSpro740/csignal
Normal file
16
simgear/compatibility/MIPSpro740/csignal
Normal file
@@ -0,0 +1,16 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CSIGNAL_HEADER
|
||||
#define __CSIGNAL_HEADER
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
namespace std {
|
||||
using ::sig_atomic_t;
|
||||
using ::raise;
|
||||
using ::signal;
|
||||
}
|
||||
|
||||
#endif // CSIGNAL_HEADER
|
||||
14
simgear/compatibility/MIPSpro740/cstdarg
Normal file
14
simgear/compatibility/MIPSpro740/cstdarg
Normal file
@@ -0,0 +1,14 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CSTDARG_HEADER
|
||||
#define __CSTDARG_HEADER
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
namespace std {
|
||||
using ::va_list;
|
||||
}
|
||||
|
||||
#endif // CSTDARG_HEADER
|
||||
15
simgear/compatibility/MIPSpro740/cstddef
Normal file
15
simgear/compatibility/MIPSpro740/cstddef
Normal file
@@ -0,0 +1,15 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CSTDDEF_HEADER
|
||||
#define __CSTDDEF_HEADER
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
namespace std {
|
||||
using ::ptrdiff_t;
|
||||
using ::size_t;
|
||||
}
|
||||
|
||||
#endif // CSTDDEF_HEADER
|
||||
57
simgear/compatibility/MIPSpro740/cstdio
Normal file
57
simgear/compatibility/MIPSpro740/cstdio
Normal file
@@ -0,0 +1,57 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CSTDIO_HEADER
|
||||
#define __CSTDIO_HEADER
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
namespace std {
|
||||
using ::FILE;
|
||||
using ::fpos_t;
|
||||
using ::size_t;
|
||||
using ::clearerr;
|
||||
using ::fgets;
|
||||
using ::fscanf;
|
||||
using ::gets;
|
||||
using ::rename;
|
||||
using ::tmpfile;
|
||||
using ::fclose;
|
||||
using ::fopen;
|
||||
using ::fseek;
|
||||
using ::perror;
|
||||
using ::rewind;
|
||||
using ::tmpnam;
|
||||
using ::feof;
|
||||
using ::fprintf;
|
||||
using ::fsetpos;
|
||||
using ::printf;
|
||||
using ::scanf;
|
||||
using ::ungetc;
|
||||
using ::ferror;
|
||||
using ::fputc;
|
||||
using ::ftell;
|
||||
using ::putc;
|
||||
using ::setbuf;
|
||||
using ::vfprintf;
|
||||
using ::fflush;
|
||||
using ::fputs;
|
||||
using ::fwrite;
|
||||
using ::putchar;
|
||||
using ::setvbuf;
|
||||
using ::vprintf;
|
||||
using ::fgetc;
|
||||
using ::fread;
|
||||
using ::getc;
|
||||
using ::puts;
|
||||
using ::sprintf;
|
||||
using ::vsprintf;
|
||||
using ::fgetpos;
|
||||
using ::freopen;
|
||||
using ::getchar;
|
||||
using ::remove;
|
||||
using ::sscanf;
|
||||
}
|
||||
|
||||
#endif // CSTDIO_HEADER
|
||||
43
simgear/compatibility/MIPSpro740/cstdlib
Normal file
43
simgear/compatibility/MIPSpro740/cstdlib
Normal file
@@ -0,0 +1,43 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CSTDLIB_HEADER
|
||||
#define __CSTDLIB_HEADER
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace std {
|
||||
using ::abort;
|
||||
using ::atexit;
|
||||
using ::exit;
|
||||
using ::getenv;
|
||||
using ::system;
|
||||
using ::calloc;
|
||||
using ::malloc;
|
||||
using ::free;
|
||||
using ::realloc;
|
||||
using ::atol;
|
||||
using ::mblen;
|
||||
using ::strtod;
|
||||
using ::wctomb;
|
||||
using ::atof;
|
||||
using ::mbstowcs;
|
||||
using ::strtol;
|
||||
using ::wcstombs;
|
||||
using ::atoi;
|
||||
using ::mbtowc;
|
||||
using ::strtoul;
|
||||
using ::bsearch;
|
||||
using ::qsort;
|
||||
using ::div_t;
|
||||
using ::ldiv_t;
|
||||
using ::abs;
|
||||
using ::labs;
|
||||
using ::srand;
|
||||
using ::div;
|
||||
using ::ldiv;
|
||||
using ::rand;
|
||||
}
|
||||
|
||||
#endif // CSTDLIB_HEADER
|
||||
36
simgear/compatibility/MIPSpro740/cstring
Normal file
36
simgear/compatibility/MIPSpro740/cstring
Normal file
@@ -0,0 +1,36 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CSTRING_HEADER
|
||||
#define __CSTRING_HEADER
|
||||
|
||||
#include <string.h>
|
||||
|
||||
namespace std {
|
||||
using ::size_t;
|
||||
using ::memchr;
|
||||
using ::strcat;
|
||||
using ::strcspn;
|
||||
using ::strncpy;
|
||||
using ::strtok;
|
||||
using ::memcmp;
|
||||
using ::strchr;
|
||||
using ::strerror;
|
||||
using ::strpbrk;
|
||||
using ::strxfrm;
|
||||
using ::memcpy;
|
||||
using ::strcmp;
|
||||
using ::strlen;
|
||||
using ::strrchr;
|
||||
using ::memmove;
|
||||
using ::strcoll;
|
||||
using ::strncat;
|
||||
using ::strspn;
|
||||
using ::memset;
|
||||
using ::strcpy;
|
||||
using ::strncmp;
|
||||
using ::strstr;
|
||||
}
|
||||
|
||||
#endif // CSTRING_HEADER
|
||||
26
simgear/compatibility/MIPSpro740/ctime
Normal file
26
simgear/compatibility/MIPSpro740/ctime
Normal file
@@ -0,0 +1,26 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CTIME_HEADER
|
||||
#define __CTIME_HEADER
|
||||
|
||||
#include <time.h>
|
||||
|
||||
namespace std {
|
||||
using ::size_t;
|
||||
using ::clock_t;
|
||||
using ::time_t;
|
||||
using ::tm;
|
||||
using ::asctime;
|
||||
using ::clock;
|
||||
using ::difftime;
|
||||
using ::localtime;
|
||||
using ::strftime;
|
||||
using ::ctime;
|
||||
using ::gmtime;
|
||||
using ::mktime;
|
||||
using ::time;
|
||||
}
|
||||
|
||||
#endif // CTIME_HEADER
|
||||
156
simgear/compatibility/MIPSpro740/cwchar
Normal file
156
simgear/compatibility/MIPSpro740/cwchar
Normal file
@@ -0,0 +1,156 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CWCHAR_HEADER
|
||||
#define __CWCHAR_HEADER
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
namespace std {
|
||||
using ::mbstate_t;
|
||||
using ::wint_t;
|
||||
using ::size_t;
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::btowc;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::getwchar;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::ungetwc;
|
||||
#endif
|
||||
using ::wcscpy;
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wcsrtombs;
|
||||
#endif
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wmemchr;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::fgetwc;
|
||||
#endif
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::mbrlen;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::vfwprintf;
|
||||
#endif
|
||||
#endif
|
||||
using ::wcscspn;
|
||||
using ::wcsspn;
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wmemcmp;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::fgetws;
|
||||
#endif
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::mbrtowc;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::vswprintf;
|
||||
#endif
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::wcsftime;
|
||||
#endif
|
||||
using ::wcsstr;
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wmemcpy;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::fputwc;
|
||||
#endif
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::mbsinit;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::vwprintf;
|
||||
#endif
|
||||
#endif
|
||||
using ::wcslen;
|
||||
using ::wcstod;
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wmemmove;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::fputws;
|
||||
#endif
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::mbsrtowcs;
|
||||
#endif
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wcrtomb;
|
||||
#endif
|
||||
using ::wcsncat;
|
||||
using ::wcstok;
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wmemset;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__DECCXX_VER) && __DECCXX_VER <= 60290024)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::fwide;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::putwc;
|
||||
#endif
|
||||
using ::wcscat;
|
||||
using ::wcsncmp;
|
||||
using ::wcstol;
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wprintf;
|
||||
#endif
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::fwprintf;
|
||||
#endif
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::putwchar;
|
||||
#endif
|
||||
using ::wcschr;
|
||||
using ::wcsncpy;
|
||||
using ::wcstoul;
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wscanf;
|
||||
#endif
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::fwscanf;
|
||||
#endif
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::swprintf;
|
||||
#endif
|
||||
#endif
|
||||
using ::wcscmp;
|
||||
using ::wcspbrk;
|
||||
using ::wcsxfrm;
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
using ::getwc;
|
||||
#endif
|
||||
#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005)
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::swscanf;
|
||||
#endif
|
||||
#endif
|
||||
using ::wcscoll;
|
||||
using ::wcsrchr;
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wctob;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // CWCHAR_HEADER
|
||||
39
simgear/compatibility/MIPSpro740/cwctype
Normal file
39
simgear/compatibility/MIPSpro740/cwctype
Normal file
@@ -0,0 +1,39 @@
|
||||
// This file is automatically generated. Do not edit.
|
||||
// ['../../../libs/compatibility/generate_cpp_c_headers.py']
|
||||
// Mon Apr 16 15:16:00 2001 ('PST', 'PDT')
|
||||
|
||||
#ifndef __CWCTYPE_HEADER
|
||||
#define __CWCTYPE_HEADER
|
||||
|
||||
#include <wctype.h>
|
||||
|
||||
namespace std {
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wctrans_t;
|
||||
#endif
|
||||
using ::wctype_t;
|
||||
using ::wint_t;
|
||||
using ::iswalnum;
|
||||
using ::iswctype;
|
||||
using ::iswlower;
|
||||
using ::iswspace;
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::towctrans;
|
||||
#endif
|
||||
#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730)
|
||||
using ::wctrans;
|
||||
#endif
|
||||
using ::iswalpha;
|
||||
using ::iswdigit;
|
||||
using ::iswprint;
|
||||
using ::iswupper;
|
||||
using ::towlower;
|
||||
using ::wctype;
|
||||
using ::iswcntrl;
|
||||
using ::iswgraph;
|
||||
using ::iswpunct;
|
||||
using ::iswxdigit;
|
||||
using ::towupper;
|
||||
}
|
||||
|
||||
#endif // CWCTYPE_HEADER
|
||||
3
simgear/compatibility/Makefile.am
Normal file
3
simgear/compatibility/Makefile.am
Normal file
@@ -0,0 +1,3 @@
|
||||
SUBDIRS = $(MIPSpro_DIRS)
|
||||
|
||||
DIST_SUBDIRS = MIPSpro721 MIPSpro740
|
||||
@@ -152,6 +152,7 @@
|
||||
#if defined( __MINGW32__ )
|
||||
# define bcopy(from, to, n) memcpy(to, from, n)
|
||||
# define FG_MEM_COPY(to,from,n) memcpy(to, from, n)
|
||||
# define isnan _isnan
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
@@ -219,7 +220,7 @@
|
||||
# define bcopy(from, to, n) memcpy(to, from, n)
|
||||
# define FG_MEM_COPY(to,from,n) memcpy(to, from, n)
|
||||
|
||||
# if _MSC_VER == 1200 // msvc++ 6.0
|
||||
# if _MSC_VER >= 1200 // msvc++ 6.0 or greater
|
||||
# define SG_NAMESPACES
|
||||
# define SG_HAVE_STD
|
||||
# define SG_HAVE_STD_INCLUDES
|
||||
@@ -235,6 +236,7 @@
|
||||
# define STL_STRING <string>
|
||||
# define STL_STRSTREAM <strstream>
|
||||
|
||||
# define isnan _isnan
|
||||
# define snprintf _snprintf
|
||||
|
||||
# pragma warning(disable: 4786) // identifier was truncated to '255' characters
|
||||
@@ -291,37 +293,40 @@
|
||||
# define SG_HAVE_NATIVE_SGI_COMPILERS
|
||||
|
||||
# define SG_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
# define SG_CLASS_PARTIAL_SPECIALIZATION
|
||||
# define SG_NEED_AUTO_PTR
|
||||
# define SG_MEMBER_TEMPLATES
|
||||
# define SG_NAMESPACES
|
||||
# define SG_HAVE_STD
|
||||
# define SG_CLASS_PARTIAL_SPECIALIZATION
|
||||
# define SG_HAVE_STREAMBUF
|
||||
# define SG_HAVE_TRAITS
|
||||
# define SG_HAVE_STD_INCLUDES
|
||||
|
||||
# define STL_ALGORITHM <algorithm>
|
||||
# define STL_FUNCTIONAL <functional>
|
||||
# define STL_IOMANIP <iomanip.h>
|
||||
# define STL_IOSTREAM <iostream.h>
|
||||
# define STL_ITERATOR <iterator.h>
|
||||
# define STL_FSTREAM <fstream.h>
|
||||
# define STL_IOMANIP <iomanip>
|
||||
# define STL_IOSTREAM <iostream>
|
||||
# define STL_ITERATOR <iterator>
|
||||
# define STL_FSTREAM <fstream>
|
||||
# define STL_STDEXCEPT <stdexcept>
|
||||
#if (_COMPILER_VERSION < 740)
|
||||
# define STL_STRING <irix_string>
|
||||
#else
|
||||
# define STL_STRING <string>
|
||||
# define STL_STRSTREAM <strstream.h>
|
||||
|
||||
// # define __STL_FUNCTION_TMPL_PARTIAL_ORDER
|
||||
// typedef void PFNGLPOINTPARAMETERFEXTPROC
|
||||
|
||||
#define glPointParameterfEXT glPointParameterfSGIS
|
||||
#define glPointParameterfvEXT glPointParameterfvSGIS
|
||||
#endif
|
||||
# define STL_STRSTREAM <strstream>
|
||||
|
||||
#pragma set woff 1001,1012,1014,1116,1155,1172,1174
|
||||
#pragma set woff 1401,1460,1551,1552,1681
|
||||
|
||||
#ifdef __cplusplus
|
||||
#pragma set woff 1682,3303
|
||||
#if (_COMPILER_VERSION >= 740)
|
||||
# pragma set woff 3624
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# define SG_COMPILER_STR "SGI Irix compiler version " SG_STRINGIZE(_COMPILER_VERSION)
|
||||
# define SG_COMPILER_STR "SGI MipsPro compiler version " SG_STRINGIZE(_COMPILER_VERSION)
|
||||
|
||||
#endif // Native SGI compilers
|
||||
|
||||
|
||||
@@ -106,21 +106,51 @@
|
||||
#define SG_METER_TO_FEET 3.28083989501312335958
|
||||
|
||||
/** Meters to Nautical Miles. 1 nm = 6076.11549 feet */
|
||||
#define SG_METER_TO_NM 0.00053995680
|
||||
#define SG_METER_TO_NM 0.0005399568034557235
|
||||
|
||||
/** Nautical Miles to Meters */
|
||||
#define SG_NM_TO_METER 1852.0000
|
||||
|
||||
/** Meters to Statute Miles. */
|
||||
#define SG_METER_TO_SM 0.0006213699494949496
|
||||
|
||||
/** Statute Miles to Meters. */
|
||||
#define SG_SM_TO_METER 1609.3412196
|
||||
|
||||
/** Radians to Nautical Miles. 1 nm = 1/60 of a degree */
|
||||
#define SG_NM_TO_RAD 0.00029088820866572159
|
||||
|
||||
/** Nautical Miles to Radians */
|
||||
#define SG_RAD_TO_NM 3437.7467707849392526
|
||||
|
||||
/** Miles per second to Knots */
|
||||
#define SG_MPS_TO_KT 1.9438444924406046432
|
||||
|
||||
/** Knots to Miles per second */
|
||||
#define SG_KT_TO_MPS 0.5144444444444444444
|
||||
|
||||
/** Miles per second to Miles per hour */
|
||||
#define SG_MPS_TO_MPH 2.2369362920544020312
|
||||
|
||||
/** Miles per hour to Miles per second */
|
||||
#define SG_MPH_TO_MPS 0.44704
|
||||
|
||||
/** Meters per second to Kilometers per hour */
|
||||
#define SG_MPS_TO_KMH 3.6
|
||||
|
||||
/** Kilometers per hour to Miles per second */
|
||||
#define SG_KMH_TO_MPS 0.2777777777777777778
|
||||
|
||||
/** Pascal to Inch Mercury */
|
||||
#define SG_PA_TO_INHG 0.0002952998330101010
|
||||
|
||||
/** Inch Mercury to Pascal */
|
||||
#define SG_INHG_TO_PA 3386.388640341
|
||||
|
||||
|
||||
/** For divide by zero avoidance, this will be close enough to zero */
|
||||
#define SG_EPSILON 0.0000001
|
||||
|
||||
|
||||
/** Highest binobj format version we know how to read/write. This starts at
|
||||
* 0 and can go up to 65535 */
|
||||
#define SG_BINOBJ_VERSION 6
|
||||
|
||||
@@ -23,7 +23,9 @@ typedef enum {
|
||||
SG_IO = 0x00001000,
|
||||
SG_CLIPPER = 0x00002000,
|
||||
SG_NETWORK = 0x00004000,
|
||||
SG_UNDEFD = 0x00008000, // For range checking
|
||||
SG_ATC = 0x00008000,
|
||||
SG_NASAL = 0x00010000,
|
||||
SG_UNDEFD = 0x00020000, // For range checking
|
||||
|
||||
SG_ALL = 0xFFFFFFFF
|
||||
} sgDebugClass;
|
||||
@@ -33,11 +35,12 @@ typedef enum {
|
||||
* Define the possible logging priorities (and their order).
|
||||
*/
|
||||
typedef enum {
|
||||
SG_BULK, // For frequent messages
|
||||
SG_DEBUG, // Less frequent debug type messages
|
||||
SG_INFO, // Informatory messages
|
||||
SG_WARN, // Possible impending problem
|
||||
SG_ALERT // Very possible impending problem
|
||||
SG_BULK = 1, // For frequent messages
|
||||
SG_DEBUG, // Less frequent debug type messages
|
||||
SG_INFO, // Informatory messages
|
||||
SG_WARN, // Possible impending problem
|
||||
SG_ALERT // Very possible impending problem
|
||||
// SG_EXIT, // Problem (no core)
|
||||
// SG_ABORT // Abandon ship (core)
|
||||
} sgDebugPriority;
|
||||
|
||||
|
||||
@@ -28,9 +28,8 @@
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
// At least Irix needs this
|
||||
#ifdef SG_HAVE_NATIVE_SGI_COMPILERS
|
||||
#include <char_traits.h>
|
||||
#ifdef _MSC_VER
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef SG_HAVE_STD_INCLUDES
|
||||
@@ -43,14 +42,11 @@
|
||||
|
||||
#include <simgear/debug/debug_types.h>
|
||||
|
||||
#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
|
||||
SG_USING_STD(streambuf);
|
||||
SG_USING_STD(ostream);
|
||||
SG_USING_STD(cout);
|
||||
SG_USING_STD(cerr);
|
||||
SG_USING_STD(endl);
|
||||
#else
|
||||
SG_USING_STD(char_traits);
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
SG_USING_STD(iostream);
|
||||
@@ -69,7 +65,11 @@ SG_USING_STD(iostream);
|
||||
* messages at runtime. Only messages with priority >= logbuf::logPriority
|
||||
* and debugClass == logbuf::logClass are output.
|
||||
*/
|
||||
#ifdef SG_NEED_STREAMBUF_HACK
|
||||
class logbuf : public __streambuf
|
||||
#else
|
||||
class logbuf : public streambuf
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -184,7 +184,23 @@ logbuf::set_log_state( sgDebugClass c, sgDebugPriority p )
|
||||
inline logbuf::int_type
|
||||
logbuf::overflow( int c )
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
static has_console = false;
|
||||
if ( logging_enabled ) {
|
||||
if ( !has_console ) {
|
||||
AllocConsole();
|
||||
freopen("conin$", "r", stdin);
|
||||
freopen("conout$", "w", stdout);
|
||||
freopen("conout$", "w", stderr);
|
||||
has_console = true;
|
||||
}
|
||||
sbuf->sputc(c);
|
||||
}
|
||||
else
|
||||
return EOF == 0 ? 1: 0;
|
||||
#else
|
||||
return logging_enabled ? sbuf->sputc(c) : (EOF == 0 ? 1: 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
4
simgear/environment/.cvsignore
Normal file
4
simgear/environment/.cvsignore
Normal file
@@ -0,0 +1,4 @@
|
||||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
||||
metar
|
||||
9
simgear/environment/Makefile.am
Normal file
9
simgear/environment/Makefile.am
Normal file
@@ -0,0 +1,9 @@
|
||||
includedir = @includedir@/environment
|
||||
|
||||
lib_LIBRARIES = libsgenvironment.a
|
||||
|
||||
include_HEADERS = metar.hxx
|
||||
|
||||
libsgenvironment_a_SOURCES = metar.cxx
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
1140
simgear/environment/metar.cxx
Normal file
1140
simgear/environment/metar.cxx
Normal file
File diff suppressed because it is too large
Load Diff
261
simgear/environment/metar.hxx
Normal file
261
simgear/environment/metar.hxx
Normal file
@@ -0,0 +1,261 @@
|
||||
// metar interface class
|
||||
//
|
||||
// Written by Melchior FRANZ, started December 2003.
|
||||
//
|
||||
// Copyright (C) 2003 Melchior FRANZ - mfranz@aon.at
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation; either version 2 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#ifndef _METAR_HXX
|
||||
#define _METAR_HXX
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include <simgear/constants.h>
|
||||
|
||||
SG_USING_STD(vector);
|
||||
SG_USING_STD(map);
|
||||
SG_USING_STD(string);
|
||||
|
||||
const double SGMetarNaN = -1E20;
|
||||
#define NaN SGMetarNaN
|
||||
|
||||
struct Token {
|
||||
char *id;
|
||||
char *text;
|
||||
};
|
||||
|
||||
|
||||
class SGMetar;
|
||||
|
||||
class SGMetarVisibility {
|
||||
friend class SGMetar;
|
||||
public:
|
||||
SGMetarVisibility() :
|
||||
_distance(NaN),
|
||||
_direction(-1),
|
||||
_modifier(EQUALS),
|
||||
_tendency(NONE) {}
|
||||
|
||||
enum Modifier {
|
||||
NOGO,
|
||||
EQUALS,
|
||||
LESS_THAN,
|
||||
GREATER_THAN
|
||||
};
|
||||
|
||||
enum Tendency {
|
||||
NONE,
|
||||
STABLE,
|
||||
INCREASING,
|
||||
DECREASING
|
||||
};
|
||||
|
||||
inline double getVisibility_m() const { return _distance; }
|
||||
inline double getVisibility_ft() const { return _distance == NaN ? NaN : _distance * SG_METER_TO_FEET; }
|
||||
inline double getVisibility_sm() const { return _distance == NaN ? NaN : _distance * SG_METER_TO_SM; }
|
||||
inline int getDirection() const { return _direction; }
|
||||
inline int getModifier() const { return _modifier; }
|
||||
inline int getTendency() const { return _tendency; }
|
||||
|
||||
protected:
|
||||
double _distance;
|
||||
int _direction;
|
||||
int _modifier;
|
||||
int _tendency;
|
||||
};
|
||||
|
||||
|
||||
// runway condition (surface and visibility)
|
||||
class SGMetarRunway {
|
||||
friend class SGMetar;
|
||||
public:
|
||||
SGMetarRunway() :
|
||||
_deposit(0),
|
||||
_extent(-1),
|
||||
_extent_string(0),
|
||||
_depth(NaN),
|
||||
_friction(NaN),
|
||||
_friction_string(0),
|
||||
_comment(0),
|
||||
_wind_shear(false) {}
|
||||
|
||||
inline const char *getDeposit() const { return _deposit; }
|
||||
inline double getExtent() const { return _extent; }
|
||||
inline const char *getExtentString() const { return _extent_string; }
|
||||
inline double getDepth() const { return _depth; }
|
||||
inline double getFriction() const { return _friction; }
|
||||
inline const char *getFrictionString() const { return _friction_string; }
|
||||
inline const char *getComment() const { return _comment; }
|
||||
inline const bool getWindShear() const { return _wind_shear; }
|
||||
inline SGMetarVisibility getMinVisibility() const { return _min_visibility; }
|
||||
inline SGMetarVisibility getMaxVisibility() const { return _max_visibility; }
|
||||
|
||||
protected:
|
||||
SGMetarVisibility _min_visibility;
|
||||
SGMetarVisibility _max_visibility;
|
||||
const char *_deposit;
|
||||
int _extent;
|
||||
const char *_extent_string;
|
||||
double _depth;
|
||||
double _friction;
|
||||
const char *_friction_string;
|
||||
const char *_comment;
|
||||
bool _wind_shear;
|
||||
};
|
||||
|
||||
|
||||
// cloud layer
|
||||
class SGMetarCloud {
|
||||
friend class SGMetar;
|
||||
public:
|
||||
SGMetarCloud() :
|
||||
_coverage(-1),
|
||||
_altitude(NaN),
|
||||
_type(0),
|
||||
_type_long(0) {}
|
||||
|
||||
inline int getCoverage() const { return _coverage; }
|
||||
inline double getAltitude_m() const { return _altitude; }
|
||||
inline double getAltitude_ft() const { return _altitude == NaN ? NaN : _altitude * SG_METER_TO_FEET; }
|
||||
inline char *getTypeString() const { return _type; }
|
||||
inline char *getTypeLongString() const { return _type_long; }
|
||||
|
||||
protected:
|
||||
int _coverage; // quarters: 0 -> clear ... 4 -> overcast
|
||||
double _altitude; // 1000 m
|
||||
char *_type; // CU
|
||||
char *_type_long; // cumulus
|
||||
};
|
||||
|
||||
|
||||
class SGMetar {
|
||||
public:
|
||||
SGMetar(const string& m, const string& proxy = "", const string& port = "", const string &auth = "");
|
||||
~SGMetar();
|
||||
|
||||
enum ReportType {
|
||||
NONE,
|
||||
AUTO,
|
||||
COR,
|
||||
RTD
|
||||
};
|
||||
|
||||
inline const char *getData() const { return _data; }
|
||||
inline const char *getUnusedData() const { return _m; }
|
||||
inline const char *getId() const { return _icao; }
|
||||
inline int getYear() const { return _year; }
|
||||
inline int getMonth() const { return _month; }
|
||||
inline int getDay() const { return _day; }
|
||||
inline int getHour() const { return _hour; }
|
||||
inline int getMinute() const { return _minute; }
|
||||
inline int getReportType() const { return _report_type; }
|
||||
|
||||
inline int getWindDir() const { return _wind_dir; }
|
||||
inline double getWindSpeed_mps() const { return _wind_speed; }
|
||||
inline double getWindSpeed_kmh() const { return _wind_speed == NaN ? NaN : _wind_speed * SG_MPS_TO_KMH; }
|
||||
inline double getWindSpeed_kt() const { return _wind_speed == NaN ? NaN : _wind_speed * SG_MPS_TO_KT; }
|
||||
inline double getWindSpeed_mph() const { return _wind_speed == NaN ? NaN : _wind_speed * SG_MPS_TO_MPH; }
|
||||
|
||||
inline double getGustSpeed_mps() const { return _gust_speed; }
|
||||
inline double getGustSpeed_kmh() const { return _gust_speed == NaN ? NaN : _gust_speed * SG_MPS_TO_KMH; }
|
||||
inline double getGustSpeed_kt() const { return _gust_speed == NaN ? NaN : _gust_speed * SG_MPS_TO_KT; }
|
||||
inline double getGustSpeed_mph() const { return _gust_speed == NaN ? NaN : _gust_speed * SG_MPS_TO_MPH; }
|
||||
|
||||
inline int getWindRangeFrom() const { return _wind_range_from; }
|
||||
inline int getWindRangeTo() const { return _wind_range_to; }
|
||||
|
||||
inline SGMetarVisibility& getMinVisibility() { return _min_visibility; }
|
||||
inline SGMetarVisibility& getMaxVisibility() { return _max_visibility; }
|
||||
inline SGMetarVisibility& getVertVisibility() { return _vert_visibility; }
|
||||
inline SGMetarVisibility *getDirVisibility() { return _dir_visibility; }
|
||||
|
||||
inline double getTemperature_C() const { return _temp; }
|
||||
inline double getTemperature_F() const { return _temp == NaN ? NaN : 1.8 * _temp + 32; }
|
||||
inline double getDewpoint_C() const { return _dewp; }
|
||||
inline double getDewpoint_F() const { return _dewp == NaN ? NaN : 1.8 * _dewp + 32; }
|
||||
inline double getPressure_hPa() const { return _pressure == NaN ? NaN : _pressure / 100; }
|
||||
inline double getPressure_inHg() const { return _pressure == NaN ? NaN : _pressure * SG_PA_TO_INHG; }
|
||||
|
||||
double getRelHumidity() const;
|
||||
|
||||
inline vector<SGMetarCloud>& getClouds() { return _clouds; }
|
||||
inline map<string, SGMetarRunway>& getRunways() { return _runways; }
|
||||
inline vector<string>& getWeather() { return _weather; }
|
||||
|
||||
protected:
|
||||
string _url;
|
||||
int _grpcount;
|
||||
char *_data;
|
||||
char *_m;
|
||||
char _icao[5];
|
||||
int _year;
|
||||
int _month;
|
||||
int _day;
|
||||
int _hour;
|
||||
int _minute;
|
||||
int _report_type;
|
||||
int _wind_dir;
|
||||
double _wind_speed;
|
||||
double _gust_speed;
|
||||
int _wind_range_from;
|
||||
int _wind_range_to;
|
||||
double _temp;
|
||||
double _dewp;
|
||||
double _pressure;
|
||||
|
||||
SGMetarVisibility _min_visibility;
|
||||
SGMetarVisibility _max_visibility;
|
||||
SGMetarVisibility _vert_visibility;
|
||||
SGMetarVisibility _dir_visibility[8];
|
||||
vector<SGMetarCloud> _clouds;
|
||||
map<string, SGMetarRunway> _runways;
|
||||
vector<string> _weather;
|
||||
|
||||
bool scanPreambleDate();
|
||||
bool scanPreambleTime();
|
||||
|
||||
bool scanType();
|
||||
bool scanId();
|
||||
bool scanDate();
|
||||
bool scanModifier();
|
||||
bool scanWind();
|
||||
bool scanVariability();
|
||||
bool scanVisibility();
|
||||
bool scanRwyVisRange();
|
||||
bool scanSkyCondition();
|
||||
bool scanWeather();
|
||||
bool scanTemperature();
|
||||
bool scanPressure();
|
||||
bool scanRunwayReport();
|
||||
bool scanWindShear();
|
||||
bool scanTrendForecast();
|
||||
bool scanColorState();
|
||||
bool scanRemark();
|
||||
bool scanRemainder();
|
||||
|
||||
int scanNumber(char **str, int *num, int min, int max = 0);
|
||||
bool scanBoundary(char **str);
|
||||
const struct Token *scanToken(char **str, const struct Token *list);
|
||||
char *loadData(const char *id, const string& proxy, const string& port, const string &auth);
|
||||
void normalizeData();
|
||||
};
|
||||
|
||||
#undef NaN
|
||||
#endif // _METAR_HXX
|
||||
@@ -4,7 +4,7 @@ lib_LIBRARIES = libsgephem.a
|
||||
|
||||
include_HEADERS = \
|
||||
celestialBody.hxx \
|
||||
ephemeris.hxx \
|
||||
ephemeris.hxx \
|
||||
jupiter.hxx \
|
||||
mars.hxx \
|
||||
mercury.hxx \
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
// $Id$
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "ephemeris.hxx"
|
||||
|
||||
|
||||
@@ -37,6 +39,10 @@ SGEphemeris::SGEphemeris( const string &path ) {
|
||||
saturn = new Saturn;
|
||||
uranus = new Uranus;
|
||||
neptune = new Neptune;
|
||||
nplanets = 7;
|
||||
for ( int i = 0; i < nplanets; ++i ) {
|
||||
sgdSetVec3( planets[i], 0.0, 0.0, 0.0 );
|
||||
}
|
||||
stars = new SGStarData( SGPath(path) );
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "stardata.hxx"
|
||||
|
||||
#if defined (_MSC_VER) || defined (SG_HAVE_NATIVE_SGI_COMPILERS)
|
||||
#if defined (_MSC_VER)
|
||||
SG_USING_STD(getline);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -22,12 +22,6 @@ libsgio_a_SOURCES = \
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
if IS_MINGW
|
||||
NETWORK_LIB = -lwsock32
|
||||
else
|
||||
NETWORK_LIB =
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = decode_binobj socktest lowtest tcp_server tcp_client
|
||||
|
||||
tcp_server_SOURCES = tcp_server.cxx
|
||||
@@ -37,8 +31,9 @@ tcp_server_LDADD = \
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
-lplibnet -lplibul -lz $(NETWORK_LIB)
|
||||
-lplibnet -lplibul -lz \
|
||||
$(network_LIBS) \
|
||||
$(base_LIBS)
|
||||
|
||||
tcp_client_SOURCES = tcp_client.cxx
|
||||
|
||||
@@ -47,30 +42,35 @@ tcp_client_LDADD = \
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
-lplibnet -lplibul -lz $(NETWORK_LIB)
|
||||
-lplibnet -lplibul -lz \
|
||||
$(network_LIBS) \
|
||||
$(base_LIBS)
|
||||
|
||||
socktest_SOURCES = socktest.cxx
|
||||
|
||||
socktest_LDADD = \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/io/libsgio.a \
|
||||
$(top_builddir)/simgear/io/libsgio.a \
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
-lplibnet -lplibul -lz $(NETWORK_LIB)
|
||||
-lplibnet -lplibul -lz \
|
||||
$(network_LIBS) \
|
||||
$(base_LIBS)
|
||||
|
||||
lowtest_SOURCES = lowtest.cxx
|
||||
|
||||
lowtest_LDADD = \
|
||||
$(top_builddir)/simgear/io/libsgio.a
|
||||
$(top_builddir)/simgear/io/libsgio.a \
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(base_LIBS) -lz
|
||||
|
||||
decode_binobj_SOURCES = decode_binobj.cxx
|
||||
|
||||
decode_binobj_LDADD = \
|
||||
$(top_builddir)/simgear/io/libsgio.a \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
-lz
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(base_LIBS) -lz
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
#include <unistd.h>
|
||||
#include STL_IOSTREAM
|
||||
|
||||
#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
|
||||
#include "sg_binobj.hxx"
|
||||
|
||||
SG_USING_STD(cout);
|
||||
SG_USING_STD(endl);
|
||||
#endif
|
||||
|
||||
#include "sg_binobj.hxx"
|
||||
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
#include STL_IOSTREAM
|
||||
#include "lowlevel.hxx"
|
||||
|
||||
#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
|
||||
SG_USING_STD(cout);
|
||||
SG_USING_STD(endl);
|
||||
#endif
|
||||
|
||||
|
||||
static const int sgEndianTest = 1;
|
||||
#define sgIsLittleEndian (*((char *) &sgEndianTest ) != 0)
|
||||
#define sgIsBigEndian (*((char *) &sgEndianTest ) == 0)
|
||||
|
||||
SG_USING_STD(cout);
|
||||
SG_USING_STD(endl);
|
||||
|
||||
|
||||
int main() {
|
||||
cout << "This machine is ";
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#endif
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
@@ -43,11 +44,6 @@
|
||||
SG_USING_STD( string );
|
||||
SG_USING_STD( vector );
|
||||
|
||||
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
|
||||
SG_USING_STD( cout );
|
||||
SG_USING_STD( endl );
|
||||
#endif
|
||||
|
||||
|
||||
enum {
|
||||
SG_BOUNDING_SPHERE = 0,
|
||||
@@ -93,7 +89,7 @@ public:
|
||||
while ( size < s ) {
|
||||
size *= 2;
|
||||
}
|
||||
cout << "Creating a new buffer of size = " << size << endl;
|
||||
SG_LOG(SG_EVENT, SG_DEBUG, "Creating a new buffer of size = " << size);
|
||||
ptr = new char[size];
|
||||
}
|
||||
|
||||
@@ -111,7 +107,7 @@ public:
|
||||
while ( size < s ) {
|
||||
size *= 2;
|
||||
}
|
||||
cout << "resizing buffer to size = " << size << endl;
|
||||
SG_LOG(SG_EVENT, SG_DEBUG, "resizing buffer to size = " << size);
|
||||
ptr = new char[size];
|
||||
}
|
||||
}
|
||||
@@ -325,8 +321,8 @@ bool SGBinObject::read_bin( const string& file ) {
|
||||
if ( (fp = gzopen( file.c_str(), "rb" )) == NULL ) {
|
||||
string filegz = file + ".gz";
|
||||
if ( (fp = gzopen( filegz.c_str(), "rb" )) == NULL ) {
|
||||
cout << "ERROR: opening " << file << " or " << filegz
|
||||
<< "for reading!" << endl;
|
||||
SG_LOG( SG_EVENT, SG_ALERT,
|
||||
"ERROR: opening " << file << " or " << filegz << "for reading!");
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -364,7 +360,7 @@ bool SGBinObject::read_bin( const string& file ) {
|
||||
local_tm = localtime( &calendar_time );
|
||||
char time_str[256];
|
||||
strftime( time_str, 256, "%a %b %d %H:%M:%S %Z %Y", local_tm);
|
||||
cout << "File created on " << time_str << endl;
|
||||
SG_LOG( SG_EVENT, SG_DEBUG, "File created on " << time_str);
|
||||
#endif
|
||||
|
||||
// read number of top level objects
|
||||
|
||||
@@ -133,7 +133,7 @@ int SGSerial::write( const char *buf, const int length ) {
|
||||
int result = port.write_port( buf, length );
|
||||
|
||||
if ( result != length ) {
|
||||
SG_LOG( SG_IO, SG_ALERT, "Error writing data: " << device );
|
||||
SG_LOG( SG_IO, SG_WARN, "Error writing data: " << device );
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -55,7 +55,7 @@ class SGSerial : public SGIOChannel {
|
||||
|
||||
string device;
|
||||
string baud;
|
||||
FGSerialPort port;
|
||||
SGSerialPort port;
|
||||
|
||||
char save_buf[ 2 * SG_IO_MAX_MSG_SIZE ];
|
||||
int save_len;
|
||||
|
||||
@@ -42,7 +42,8 @@ SGSocket::SGSocket( const string& host, const string& port_,
|
||||
client(0),
|
||||
is_tcp(false),
|
||||
is_server(false),
|
||||
first_read(false)
|
||||
first_read(false),
|
||||
timeout(0)
|
||||
{
|
||||
if (!init)
|
||||
{
|
||||
@@ -54,7 +55,7 @@ SGSocket::SGSocket( const string& host, const string& port_,
|
||||
{
|
||||
is_tcp = true;
|
||||
}
|
||||
else if ( style != (string)"udp" )
|
||||
else if ( style != "udp" )
|
||||
{
|
||||
SG_LOG( SG_IO, SG_ALERT,
|
||||
"Error: SGSocket() unknown style = " << style );
|
||||
@@ -218,7 +219,14 @@ SGSocket::read( char *buf, int length )
|
||||
|
||||
if (result > 0)
|
||||
{
|
||||
result = sock.recv( buf, length );
|
||||
if (is_tcp && is_server)
|
||||
{
|
||||
result = client->recv( buf, length );
|
||||
}
|
||||
else
|
||||
{
|
||||
result = sock.recv( buf, length );
|
||||
}
|
||||
|
||||
if ( result != length )
|
||||
{
|
||||
@@ -250,7 +258,7 @@ SGSocket::readline( char *buf, int length )
|
||||
// read a chunk, keep in the save buffer until we have the
|
||||
// requested amount read
|
||||
|
||||
if (is_tcp)
|
||||
if (is_tcp && is_server)
|
||||
{
|
||||
char *buf_ptr = save_buf + save_len;
|
||||
result = client->recv( buf_ptr, SG_IO_MAX_MSG_SIZE - save_len );
|
||||
@@ -323,7 +331,7 @@ SGSocket::write( const char *buf, const int length )
|
||||
|
||||
if ( s->send( buf, length ) < 0 )
|
||||
{
|
||||
SG_LOG( SG_IO, SG_ALERT, "Error writing to socket: " << port );
|
||||
SG_LOG( SG_IO, SG_WARN, "Error writing to socket: " << port );
|
||||
error_condition = true;
|
||||
}
|
||||
|
||||
@@ -379,7 +387,7 @@ SGSocket::poll()
|
||||
netSocket* writers[1];
|
||||
writers[0] = 0;
|
||||
|
||||
int result = netSocket::select( readers, writers, 0 );
|
||||
int result = netSocket::select( readers, writers, timeout );
|
||||
|
||||
if (result > 0 && is_server && client == 0)
|
||||
{
|
||||
|
||||
@@ -64,6 +64,7 @@ private:
|
||||
bool is_tcp;
|
||||
bool is_server;
|
||||
bool first_read;
|
||||
int timeout;
|
||||
|
||||
static bool init;
|
||||
|
||||
@@ -156,6 +157,9 @@ public:
|
||||
*/
|
||||
bool nonblock();
|
||||
|
||||
// set timeout (default: 0)
|
||||
inline void set_timeout(int i) { timeout = i; }
|
||||
|
||||
/** @return the remote host name */
|
||||
inline string get_hostname() const { return hostname; }
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ int SGSocketUDP::write( const char *buf, const int length ) {
|
||||
bool error_condition = false;
|
||||
|
||||
if ( sock.send( buf, length, 0 ) < 0 ) {
|
||||
SG_LOG( SG_IO, SG_ALERT, "Error writing to socket: " << port );
|
||||
SG_LOG( SG_IO, SG_WARN, "Error writing to socket: " << port );
|
||||
error_condition = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
#include "sg_socket.hxx"
|
||||
#include "lowlevel.hxx"
|
||||
|
||||
#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
|
||||
SG_USING_STD(cout);
|
||||
SG_USING_STD(endl);
|
||||
#endif
|
||||
|
||||
static const int sgEndianTest = 1;
|
||||
#define sgIsLittleEndian (*((char *) &sgEndianTest ) != 0)
|
||||
#define sgIsBigEndian (*((char *) &sgEndianTest ) == 0)
|
||||
|
||||
SG_USING_STD(cout);
|
||||
SG_USING_STD(endl);
|
||||
|
||||
|
||||
int main() {
|
||||
|
||||
if ( sgIsLittleEndian ) {
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
|
||||
#include "sg_socket.hxx"
|
||||
|
||||
#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
|
||||
using std::cout;
|
||||
#endif
|
||||
|
||||
class TcpClient
|
||||
{
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
|
||||
#include "sg_socket.hxx"
|
||||
|
||||
using std::string;
|
||||
#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
|
||||
using std::cout;
|
||||
#endif
|
||||
SG_USING_STD(string);
|
||||
SG_USING_STD(cout);
|
||||
|
||||
class TcpServer
|
||||
{
|
||||
|
||||
@@ -12,6 +12,8 @@ noinst_PROGRAMS = testmagvar
|
||||
|
||||
testmagvar_SOURCES = testmagvar.cxx
|
||||
|
||||
testmagvar_LDADD = $(top_builddir)/simgear/magvar/libsgmagvar.a
|
||||
testmagvar_LDADD = \
|
||||
$(top_builddir)/simgear/magvar/libsgmagvar.a \
|
||||
$(base_LIBS)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
@@ -12,7 +12,8 @@ include_HEADERS = \
|
||||
sg_memory.h \
|
||||
sg_random.h \
|
||||
sg_types.hxx \
|
||||
vector.hxx
|
||||
vector.hxx \
|
||||
fastmath.hxx
|
||||
|
||||
EXTRA_DIST = linintp2.h linintp2.inl sphrintp.h sphrintp.inl
|
||||
|
||||
@@ -22,6 +23,7 @@ libsgmath_a_SOURCES = \
|
||||
polar3d.cxx \
|
||||
sg_geodesy.cxx \
|
||||
sg_random.c \
|
||||
vector.cxx
|
||||
vector.cxx \
|
||||
fastmath.cxx
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
65
simgear/math/fastmath.cxx
Normal file
65
simgear/math/fastmath.cxx
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* \file fastmath.cxx
|
||||
* fast mathematics routines.
|
||||
*
|
||||
* Refferences:
|
||||
*
|
||||
* A Fast, Compact Approximation of the Exponential Function
|
||||
* Nicol N. Schraudolph
|
||||
* IDSIA, Lugano, Switzerland
|
||||
* http://www.inf.ethz.ch/~schraudo/pubs/exp.pdf
|
||||
*
|
||||
* Fast log() Function, by Laurent de Soras:
|
||||
* http://www.flipcode.com/cgi-bin/msg.cgi?showThread=Tip-Fastlogfunction&forum=totd&id=-1
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "fastmath.hxx"
|
||||
|
||||
/**
|
||||
* This function is on avarage 9 times faster than the system exp() function
|
||||
* and has an error of about 1.5%
|
||||
*/
|
||||
static union {
|
||||
double d;
|
||||
struct {
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
int i, j;
|
||||
#else
|
||||
int j, i;
|
||||
#endif
|
||||
} n;
|
||||
} _eco;
|
||||
|
||||
double fast_exp(double val) {
|
||||
const double a = 1048576/M_LN2;
|
||||
const double b_c = 1072632447; /* 1072693248 - 60801 */
|
||||
|
||||
_eco.n.i = a*val + b_c;
|
||||
|
||||
return _eco.d;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* While we're on the subject, someone might have use for these as well?
|
||||
* Float Shift Left and Float Shift Right. Do what you want with this.
|
||||
*/
|
||||
void fast_BSL(float &x, register unsigned long shiftAmount) {
|
||||
|
||||
*(unsigned long*)&x+=shiftAmount<<23;
|
||||
|
||||
}
|
||||
|
||||
void fast_BSR(float &x, register unsigned long shiftAmount) {
|
||||
|
||||
*(unsigned long*)&x-=shiftAmount<<23;
|
||||
|
||||
}
|
||||
|
||||
69
simgear/math/fastmath.hxx
Normal file
69
simgear/math/fastmath.hxx
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* \file fastmath.hxx
|
||||
* fast mathematics routines.
|
||||
*
|
||||
* Refferences:
|
||||
*
|
||||
* A Fast, Compact Approximation of the Exponential Function
|
||||
* Nicol N. Schraudolph
|
||||
* IDSIA, Lugano, Switzerland
|
||||
* http://www.inf.ethz.ch/~schraudo/pubs/exp.pdf
|
||||
*
|
||||
* Fast log() Function, by Laurent de Soras:
|
||||
* http://www.flipcode.com/cgi-bin/msg.cgi?showThread=Tip-Fastlogfunction&forum=totd&id=-1
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _SG_FMATH_HXX
|
||||
#define _SG_FMATH_HXX 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error This library requires C++
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
#include <math.h>
|
||||
|
||||
|
||||
double fast_exp(double val);
|
||||
|
||||
void fast_BSL(float &x, register unsigned long shiftAmount);
|
||||
void fast_BSR(float &x, register unsigned long shiftAmount);
|
||||
|
||||
inline float fast_log2 (float val)
|
||||
{
|
||||
int * const exp_ptr = reinterpret_cast <int *> (&val);
|
||||
int x = *exp_ptr;
|
||||
const int log_2 = ((x >> 23) & 255) - 128;
|
||||
x &= ~(255 << 23);
|
||||
x += 127 << 23;
|
||||
*exp_ptr = x;
|
||||
|
||||
val = ((-1.0f/3) * val + 2) * val - 2.0f/3; // (1)
|
||||
|
||||
return (val + log_2);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is about 3 times faster than the system log() function
|
||||
* and has an error of about 0.01%
|
||||
*/
|
||||
inline float fast_log (const float &val)
|
||||
{
|
||||
return (fast_log2 (val) * 0.69314718f);
|
||||
}
|
||||
|
||||
inline float fast_log10 (const float &val)
|
||||
{
|
||||
return (fast_log2(val) / 3.321928095f);
|
||||
}
|
||||
|
||||
|
||||
#endif // !_SG_FMATH_HXX
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include STL_STRING
|
||||
|
||||
// depricated - #include <simgear/sg_zlib.h>
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/misc/sgstream.hxx>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ mgcLinInterp2D<T>::mgcLinInterp2D (int _numPoints, double* x, double* y,
|
||||
return;
|
||||
}
|
||||
|
||||
cout << "[ 20%] allocating memory \r";
|
||||
// cout << "[ 20%] allocating memory \r";
|
||||
|
||||
point = new double*[numPoints];
|
||||
tmppoint = new double*[numPoints+3];
|
||||
@@ -66,7 +66,7 @@ mgcLinInterp2D<T>::mgcLinInterp2D (int _numPoints, double* x, double* y,
|
||||
f[i] = _f[i];
|
||||
}
|
||||
|
||||
cout << "[ 30%] creating delaunay diagram \r";
|
||||
// cout << "[ 30%] creating delaunay diagram \r";
|
||||
|
||||
Delaunay2D();
|
||||
}
|
||||
@@ -279,7 +279,7 @@ int mgcLinInterp2D<T>::Delaunay2D ()
|
||||
nts = 1; // number of triangles
|
||||
i4 = 1;
|
||||
|
||||
cout << "[ 40%] create triangulation \r";
|
||||
// cout << "[ 40%] create triangulation \r";
|
||||
|
||||
// compute triangulation
|
||||
for (i0 = 0; i0 < numPoints; i0++)
|
||||
@@ -372,7 +372,7 @@ Corner3:;
|
||||
}
|
||||
|
||||
// count the number of triangles
|
||||
cout << "[ 50%] count the number of triangles \r";
|
||||
// cout << "[ 50%] count the number of triangles \r";
|
||||
|
||||
numTriangles = 0;
|
||||
i0 = -1;
|
||||
@@ -394,7 +394,7 @@ Corner3:;
|
||||
}
|
||||
|
||||
// create the triangles
|
||||
cout << "[ 60%] create the triangles \r";
|
||||
// cout << "[ 60%] create the triangles \r";
|
||||
|
||||
triangle = new Triangle[numTriangles];
|
||||
|
||||
@@ -428,7 +428,7 @@ Corner3:;
|
||||
}
|
||||
|
||||
// build edge table
|
||||
cout << "[ 70%] build the edge table \r";
|
||||
// cout << "[ 70%] build the edge table \r";
|
||||
|
||||
numEdges = 0;
|
||||
edge = new Edge[3*numTriangles];
|
||||
@@ -436,8 +436,8 @@ Corner3:;
|
||||
int j, j0, j1;
|
||||
for (i = 0; i < numTriangles; i++)
|
||||
{
|
||||
if ( (i%500) == 0)
|
||||
cout << "[ 7" << 10*i/numTriangles << "%] build the edge table \r";
|
||||
// if ( (i%500) == 0)
|
||||
// cout << "[ 7" << 10*i/numTriangles << "%] build the edge table \r";
|
||||
|
||||
Triangle& t = triangle[i];
|
||||
|
||||
@@ -470,7 +470,7 @@ Corner3:;
|
||||
}
|
||||
|
||||
// establish links between adjacent triangles
|
||||
cout << "[ 80%] establishing links between adjacent triangles \r";
|
||||
// cout << "[ 80%] establishing links between adjacent triangles \r";
|
||||
|
||||
for (i = 0; i < numEdges; i++)
|
||||
{
|
||||
@@ -494,7 +494,7 @@ ExitDelaunay:;
|
||||
delete[] ccr[0];
|
||||
delete[] ccr;
|
||||
|
||||
cout << "[ 90%] finsishes delauney triangulation \r";
|
||||
// cout << "[ 90%] finsishes delauney triangulation \r";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -61,10 +61,8 @@
|
||||
SG_USING_NAMESPACE(std);
|
||||
#endif
|
||||
|
||||
#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
|
||||
SG_USING_STD(ostream);
|
||||
SG_USING_STD(istream);
|
||||
#endif
|
||||
|
||||
|
||||
const double fgPoint3_Epsilon = 0.0000001;
|
||||
|
||||
@@ -1,169 +1,212 @@
|
||||
// sg_geodesy.cxx -- routines to convert between geodetic and geocentric
|
||||
// coordinate systems.
|
||||
//
|
||||
// Copied and adapted directly from LaRCsim/ls_geodesy.c
|
||||
//
|
||||
// See below for the complete original LaRCsim comments.
|
||||
//
|
||||
// $Id$
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#ifdef SG_HAVE_STD_INCLUDES
|
||||
# include <cmath>
|
||||
# include <cerrno>
|
||||
# include <cstdio>
|
||||
#else
|
||||
# include <math.h>
|
||||
# include <errno.h>
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
|
||||
#include "point3d.hxx"
|
||||
#include "sg_geodesy.hxx"
|
||||
#include "localconsts.hxx"
|
||||
|
||||
|
||||
#ifndef SG_HAVE_NATIVE_SGI_COMPILERS
|
||||
SG_USING_STD(cout);
|
||||
#endif
|
||||
|
||||
|
||||
#define DOMAIN_ERR_DEBUG 1
|
||||
|
||||
|
||||
// sgGeocToGeod(lat_geoc, radius, *lat_geod, *alt, *sea_level_r)
|
||||
// INPUTS:
|
||||
// lat_geoc Geocentric latitude, radians, + = North
|
||||
// radius C.G. radius to earth center (meters)
|
||||
// Notes:
|
||||
//
|
||||
// OUTPUTS:
|
||||
// lat_geod Geodetic latitude, radians, + = North
|
||||
// alt C.G. altitude above mean sea level (meters)
|
||||
// sea_level_r radius from earth center to sea level at
|
||||
// local vertical (surface normal) of C.G. (meters)
|
||||
// The XYZ/cartesian coordinate system in use puts the X axis through
|
||||
// zero lat/lon (off west Africa), the Z axis through the north pole,
|
||||
// and the Y axis through 90 degrees longitude (in the Indian Ocean).
|
||||
//
|
||||
// All latitude and longitude values are in radians. Altitude is in
|
||||
// meters, with zero on the WGS84 ellipsoid.
|
||||
//
|
||||
// The code below makes use of the notion of "squashed" space. This
|
||||
// is a 2D cylindrical coordinate system where the radius from the Z
|
||||
// axis is multiplied by SQUASH; the earth in this space is a perfect
|
||||
// circle with a radius of POLRAD.
|
||||
//
|
||||
// Performance: with full optimization, a transformation from
|
||||
// lat/lon/alt to XYZ and back takes 5263 CPU cycles on my 2.2GHz
|
||||
// Pentium 4. About 83% of this is spent in the iterative sgCartToGeod()
|
||||
// algorithm.
|
||||
|
||||
// These are hard numbers from the WGS84 standard. DON'T MODIFY
|
||||
// unless you want to change the datum.
|
||||
static const double EQURAD = 6378137;
|
||||
static const double iFLATTENING = 298.257223563;
|
||||
|
||||
void sgGeocToGeod( double lat_geoc, double radius, double
|
||||
*lat_geod, double *alt, double *sea_level_r )
|
||||
// These are derived quantities more useful to the code:
|
||||
#if 0
|
||||
static const double SQUASH = 1 - 1/iFLATTENING;
|
||||
static const double STRETCH = 1/SQUASH;
|
||||
static const double POLRAD = EQURAD * SQUASH;
|
||||
#else
|
||||
// High-precision versions of the above produced with an arbitrary
|
||||
// precision calculator (the compiler might lose a few bits in the FPU
|
||||
// operations). These are specified to 81 bits of mantissa, which is
|
||||
// higher than any FPU known to me:
|
||||
static const double SQUASH = 0.9966471893352525192801545;
|
||||
static const double STRETCH = 1.0033640898209764189003079;
|
||||
static const double POLRAD = 6356752.3142451794975639668;
|
||||
#endif
|
||||
|
||||
// Returns a "local" geodetic latitude: an approximation that will be
|
||||
// correct only at zero altitude.
|
||||
static double localLat(double r, double z)
|
||||
{
|
||||
#ifdef DOMAIN_ERR_DEBUG
|
||||
errno = 0; // start with error zero'd
|
||||
#endif
|
||||
|
||||
double t_lat, x_alpha, mu_alpha, delt_mu, r_alpha, l_point, rho_alpha;
|
||||
double sin_mu_a, denom,delt_lambda, lambda_sl, sin_lambda_sl;
|
||||
|
||||
if( ( (SGD_PI_2 - lat_geoc) < SG_ONE_SECOND ) // near North pole
|
||||
|| ( (SGD_PI_2 + lat_geoc) < SG_ONE_SECOND ) ) // near South pole
|
||||
{
|
||||
*lat_geod = lat_geoc;
|
||||
*sea_level_r = SG_EQUATORIAL_RADIUS_M*E;
|
||||
*alt = radius - *sea_level_r;
|
||||
} else {
|
||||
// cout << " lat_geoc = " << lat_geoc << endl;
|
||||
t_lat = tan(lat_geoc);
|
||||
// cout << " tan(t_lat) = " << t_lat << endl;
|
||||
x_alpha = E*SG_EQUATORIAL_RADIUS_M/sqrt(t_lat*t_lat + E*E);
|
||||
#ifdef DOMAIN_ERR_DEBUG
|
||||
if ( errno ) {
|
||||
perror("fgGeocToGeod()");
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "sqrt(" << t_lat*t_lat + E*E << ")" );
|
||||
}
|
||||
#endif
|
||||
// cout << " x_alpha = " << x_alpha << endl;
|
||||
double tmp = sqrt(SG_EQ_RAD_SQUARE_M - x_alpha * x_alpha);
|
||||
if ( tmp < 0.0 ) { tmp = 0.0; }
|
||||
#ifdef DOMAIN_ERR_DEBUG
|
||||
if ( errno ) {
|
||||
perror("fgGeocToGeod()");
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "sqrt(" << SG_EQ_RAD_SQUARE_M - x_alpha * x_alpha
|
||||
<< ")" );
|
||||
}
|
||||
#endif
|
||||
mu_alpha = atan2(tmp,E*x_alpha);
|
||||
if (lat_geoc < 0) mu_alpha = - mu_alpha;
|
||||
sin_mu_a = sin(mu_alpha);
|
||||
delt_lambda = mu_alpha - lat_geoc;
|
||||
r_alpha = x_alpha/cos(lat_geoc);
|
||||
l_point = radius - r_alpha;
|
||||
*alt = l_point*cos(delt_lambda);
|
||||
|
||||
denom = sqrt(1-EPS*EPS*sin_mu_a*sin_mu_a);
|
||||
#ifdef DOMAIN_ERR_DEBUG
|
||||
if ( errno ) {
|
||||
perror("fgGeocToGeod()");
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "sqrt(" <<
|
||||
1-EPS*EPS*sin_mu_a*sin_mu_a << ")" );
|
||||
}
|
||||
#endif
|
||||
rho_alpha = SG_EQUATORIAL_RADIUS_M*(1-EPS)/
|
||||
(denom*denom*denom);
|
||||
delt_mu = atan2(l_point*sin(delt_lambda),rho_alpha + *alt);
|
||||
*lat_geod = mu_alpha - delt_mu;
|
||||
lambda_sl = atan( E*E * tan(*lat_geod) ); // SL geoc. latitude
|
||||
sin_lambda_sl = sin( lambda_sl );
|
||||
*sea_level_r =
|
||||
sqrt(SG_EQ_RAD_SQUARE_M / (1 + ((1/(E*E))-1)*sin_lambda_sl*sin_lambda_sl));
|
||||
#ifdef DOMAIN_ERR_DEBUG
|
||||
if ( errno ) {
|
||||
perror("fgGeocToGeod()");
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "sqrt(" <<
|
||||
SG_EQ_RAD_SQUARE_M / (1 + ((1/(E*E))-1)*sin_lambda_sl*sin_lambda_sl)
|
||||
<< ")" );
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Squash to a spherical earth, compute a tangent vector to the
|
||||
// surface circle (in squashed space, the surface is a perfect
|
||||
// sphere) by swapping the components and negating one, stretch to
|
||||
// real coordinates, and take an inverse-tangent/perpedicular
|
||||
// vector to get a local geodetic "up" vector. (Those steps all
|
||||
// cook down to just a few multiplies). Then just turn it into an
|
||||
// angle.
|
||||
double upr = r * SQUASH;
|
||||
double upz = z * STRETCH;
|
||||
return atan2(upz, upr);
|
||||
}
|
||||
|
||||
|
||||
// sgGeodToGeoc( lat_geod, alt, *sl_radius, *lat_geoc )
|
||||
// INPUTS:
|
||||
// lat_geod Geodetic latitude, radians, + = North
|
||||
// alt C.G. altitude above mean sea level (meters)
|
||||
//
|
||||
// OUTPUTS:
|
||||
// sl_radius SEA LEVEL radius to earth center (meters)
|
||||
// (add Altitude to get true distance from earth center.
|
||||
// lat_geoc Geocentric latitude, radians, + = North
|
||||
//
|
||||
|
||||
|
||||
void sgGeodToGeoc( double lat_geod, double alt, double *sl_radius,
|
||||
double *lat_geoc )
|
||||
// This is the inverse of the algorithm in localLat(). It returns the
|
||||
// (cylindrical) coordinates of a surface latitude expressed as an
|
||||
// "up" unit vector.
|
||||
static void surfRZ(double upr, double upz, double* r, double* z)
|
||||
{
|
||||
double lambda_sl, sin_lambda_sl, cos_lambda_sl, sin_mu, cos_mu, px, py;
|
||||
|
||||
#ifdef DOMAIN_ERR_DEBUG
|
||||
errno = 0;
|
||||
#endif
|
||||
// We are
|
||||
// converting a (2D, cylindrical) "up" vector defined by the
|
||||
// geodetic latitude into unitless R and Z coordinates in
|
||||
// cartesian space.
|
||||
double R = upr * STRETCH;
|
||||
double Z = upz * SQUASH;
|
||||
|
||||
lambda_sl = atan( E*E * tan(lat_geod) ); // sea level geocentric latitude
|
||||
sin_lambda_sl = sin( lambda_sl );
|
||||
cos_lambda_sl = cos( lambda_sl );
|
||||
sin_mu = sin(lat_geod); // Geodetic (map makers') latitude
|
||||
cos_mu = cos(lat_geod);
|
||||
*sl_radius =
|
||||
sqrt(SG_EQ_RAD_SQUARE_M / (1 + ((1/(E*E))-1)*sin_lambda_sl*sin_lambda_sl));
|
||||
#ifdef DOMAIN_ERR_DEBUG
|
||||
if ( errno ) {
|
||||
perror("fgGeodToGeoc()");
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "sqrt(" <<
|
||||
SG_EQ_RAD_SQUARE_M / (1 + ((1/(E*E))-1)*sin_lambda_sl*sin_lambda_sl)
|
||||
<< ")" );
|
||||
}
|
||||
#endif
|
||||
py = *sl_radius*sin_lambda_sl + alt*sin_mu;
|
||||
px = *sl_radius*cos_lambda_sl + alt*cos_mu;
|
||||
*lat_geoc = atan2( py, px );
|
||||
// Now we need to turn R and Z into a surface point. That is,
|
||||
// pick a coefficient C for them such that the point is on the
|
||||
// surface when converted to "squashed" space:
|
||||
// (C*R*SQUASH)^2 + (C*Z)^2 = POLRAD^2
|
||||
// C^2 = POLRAD^2 / ((R*SQUASH)^2 + Z^2)
|
||||
double sr = R * SQUASH;
|
||||
double c = POLRAD / sqrt(sr*sr + Z*Z);
|
||||
R *= c;
|
||||
Z *= c;
|
||||
|
||||
*r = R; *z = Z;
|
||||
}
|
||||
|
||||
// Returns the insersection of the line joining the center of the
|
||||
// earth and the specified cylindrical point with the surface of the
|
||||
// WGS84 ellipsoid. Works by finding a normalization constant (in
|
||||
// squashed space) that places the squashed point on the surface of
|
||||
// the sphere.
|
||||
static double seaLevelRadius(double r, double z)
|
||||
{
|
||||
double sr = r * SQUASH;
|
||||
double norm = POLRAD/sqrt(sr*sr + z*z);
|
||||
r *= norm;
|
||||
z *= norm;
|
||||
return sqrt(r*r + z*z);
|
||||
}
|
||||
|
||||
// Convert a cartexian XYZ coordinate to a geodetic lat/lon/alt. This
|
||||
// is a "recursion relation". In essence, it iterates over the 2D
|
||||
// part of sgGeodToCart refining its approximation at each step. The
|
||||
// MAX_LAT_ERROR threshold is picked carefully to allow us to reach
|
||||
// the full precision of an IEEE double. While this algorithm might
|
||||
// look slow, it's not. It actually converges very fast indeed --
|
||||
// I've never seen it take more than six iterations under normal
|
||||
// conditions. Three or four is more typical. (It gets slower as the
|
||||
// altitude/error gets larger; at 50000m altitude, it starts to need
|
||||
// seven loops.) One caveat is that at *very* large altitudes, it
|
||||
// starts making very poor guesses as to latitude. As altitude
|
||||
// approaches infinity, it should be guessing with geocentric
|
||||
// coordinates, not "local geodetic up" ones.
|
||||
void sgCartToGeod(double* xyz, double* lat, double* lon, double* alt)
|
||||
{
|
||||
// The error is expressed as a radian angle, and we want accuracy
|
||||
// to 1 part in 2^50 (an IEEE double has between 51 and 52
|
||||
// significant bits of magnitude due to the "hidden" digit; leave
|
||||
// at least one bit free for potential slop). In real units, this
|
||||
// works out to about 6 nanometers.
|
||||
static const double MAX_LAT_ERROR = 8.881784197001252e-16;
|
||||
double x = xyz[0], y = xyz[1], z = xyz[2];
|
||||
|
||||
// Longitude is trivial. Convert to cylindrical "(r, z)"
|
||||
// coordinates while we're at it.
|
||||
*lon = atan2(y, x);
|
||||
double r = sqrt(x*x + y*y);
|
||||
|
||||
double lat1, lat2 = localLat(r, z);
|
||||
double r2, z2, dot;
|
||||
do {
|
||||
lat1 = lat2;
|
||||
|
||||
// Compute an "up" vector
|
||||
double upr = cos(lat1);
|
||||
double upz = sin(lat1);
|
||||
|
||||
// Find the surface point with that latitude
|
||||
surfRZ(upr, upz, &r2, &z2);
|
||||
|
||||
// Convert r2z2 to the vector pointing from the surface to rz
|
||||
r2 = r - r2;
|
||||
z2 = z - z2;
|
||||
|
||||
// Dot it with "up" to get an approximate altitude
|
||||
dot = r2*upr + z2*upz;
|
||||
|
||||
// And compute an approximate geodetic surface coordinate
|
||||
// using that altitude, so now: R2Z2 = RZ - ((RZ - SURF) dot
|
||||
// UP)
|
||||
r2 = r - dot * upr;
|
||||
z2 = z - dot * upz;
|
||||
|
||||
// Find the latitude of *that* point, and iterate
|
||||
lat2 = localLat(r2, z2);
|
||||
} while(fabs(lat2 - lat1) > MAX_LAT_ERROR);
|
||||
|
||||
// All done! We have an accurate geodetic lattitude, now
|
||||
// calculate the altitude as a cartesian distance between the
|
||||
// final geodetic surface point and the initial r/z coordinate.
|
||||
*lat = lat1;
|
||||
double dr = r - r2;
|
||||
double dz = z - z2;
|
||||
double altsign = (dot > 0) ? 1 : -1;
|
||||
*alt = altsign * sqrt(dr*dr + dz*dz);
|
||||
}
|
||||
|
||||
void sgGeodToCart(double lat, double lon, double alt, double* xyz)
|
||||
{
|
||||
// This is the inverse of the algorithm in localLat(). We are
|
||||
// converting a (2D, cylindrical) "up" vector defined by the
|
||||
// geodetic latitude into unitless R and Z coordinates in
|
||||
// cartesian space.
|
||||
double upr = cos(lat);
|
||||
double upz = sin(lat);
|
||||
double r, z;
|
||||
surfRZ(upr, upz, &r, &z);
|
||||
|
||||
// Add the altitude using the "up" unit vector we calculated
|
||||
// initially.
|
||||
r += upr * alt;
|
||||
z += upz * alt;
|
||||
|
||||
// Finally, convert from cylindrical to cartesian
|
||||
xyz[0] = r * cos(lon);
|
||||
xyz[1] = r * sin(lon);
|
||||
xyz[2] = z;
|
||||
}
|
||||
|
||||
void sgGeocToGeod(double lat_geoc, double radius,
|
||||
double *lat_geod, double *alt, double *sea_level_r)
|
||||
{
|
||||
// Build a fake cartesian point, and run it through CartToGeod
|
||||
double lon_dummy, xyz[3];
|
||||
xyz[0] = cos(lat_geoc) * radius;
|
||||
xyz[1] = 0;
|
||||
xyz[2] = sin(lat_geoc) * radius;
|
||||
sgCartToGeod(xyz, lat_geod, &lon_dummy, alt);
|
||||
*sea_level_r = seaLevelRadius(xyz[0], xyz[2]);
|
||||
}
|
||||
|
||||
void sgGeodToGeoc(double lat_geod, double alt,
|
||||
double *sl_radius, double *lat_geoc)
|
||||
{
|
||||
double xyz[3];
|
||||
sgGeodToCart(lat_geod, 0, alt, xyz);
|
||||
*lat_geoc = atan2(xyz[2], xyz[0]);
|
||||
*sl_radius = seaLevelRadius(xyz[0], xyz[2]);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Direct and inverse distance functions
|
||||
//
|
||||
// Proceedings of the 7th International Symposium on Geodetic
|
||||
@@ -177,14 +220,12 @@ void sgGeodToGeoc( double lat_geod, double alt, double *sl_radius,
|
||||
//
|
||||
// modified for FlightGear to use WGS84 only -- Norman Vine
|
||||
|
||||
#define GEOD_INV_PI SGD_PI
|
||||
static const double GEOD_INV_PI = SGD_PI;
|
||||
|
||||
// s == distance
|
||||
// az = azimuth
|
||||
|
||||
// for WGS_84 a = 6378137.000, rf = 298.257223563;
|
||||
|
||||
static double M0( double e2 ) {
|
||||
static inline double M0( double e2 ) {
|
||||
//double e4 = e2*e2;
|
||||
return GEOD_INV_PI*(1.0 - e2*( 1.0/4.0 + e2*( 3.0/64.0 +
|
||||
e2*(5.0/256.0) )))/2.0;
|
||||
@@ -193,10 +234,12 @@ static double M0( double e2 ) {
|
||||
|
||||
// given, alt, lat1, lon1, az1 and distance (s), calculate lat2, lon2
|
||||
// and az2. Lat, lon, and azimuth are in degrees. distance in meters
|
||||
int geo_direct_wgs_84 ( double alt, double lat1, double lon1, double az1,
|
||||
double s, double *lat2, double *lon2, double *az2 )
|
||||
int geo_direct_wgs_84 ( double alt, double lat1,
|
||||
double lon1, double az1,
|
||||
double s, double *lat2, double *lon2,
|
||||
double *az2 )
|
||||
{
|
||||
double a = 6378137.000, rf = 298.257223563;
|
||||
double a = EQURAD, rf = iFLATTENING;
|
||||
double RADDEG = (GEOD_INV_PI)/180.0, testv = 1.0E-10;
|
||||
double f = ( rf > 0.0 ? 1.0/rf : 0.0 );
|
||||
double b = a*(1.0-f);
|
||||
@@ -275,7 +318,8 @@ int geo_direct_wgs_84 ( double alt, double lat1, double lon1, double az1,
|
||||
} else { // phi1 == 90 degrees, polar origin
|
||||
double dM = a*M0(e2) - s;
|
||||
double paz = ( phi1 < 0.0 ? 180.0 : 0.0 );
|
||||
return geo_direct_wgs_84( alt, 0.0, lon1, paz, dM,lat2,lon2,az2 );
|
||||
double zero = 0.0f;
|
||||
return geo_direct_wgs_84( alt, zero, lon1, paz, dM, lat2, lon2, az2 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,10 +327,12 @@ int geo_direct_wgs_84 ( double alt, double lat1, double lon1, double az1,
|
||||
// given alt, lat1, lon1, lat2, lon2, calculate starting and ending
|
||||
// az1, az2 and distance (s). Lat, lon, and azimuth are in degrees.
|
||||
// distance in meters
|
||||
int geo_inverse_wgs_84( double alt, double lat1, double lon1, double lat2,
|
||||
double lon2, double *az1, double *az2, double *s )
|
||||
int geo_inverse_wgs_84( double alt, double lat1,
|
||||
double lon1, double lat2,
|
||||
double lon2, double *az1, double *az2,
|
||||
double *s )
|
||||
{
|
||||
double a = 6378137.000, rf = 298.257223563;
|
||||
double a = EQURAD, rf = iFLATTENING;
|
||||
int iter=0;
|
||||
double RADDEG = (GEOD_INV_PI)/180.0, testv = 1.0E-10;
|
||||
double f = ( rf > 0.0 ? 1.0/rf : 0.0 );
|
||||
@@ -311,8 +357,9 @@ int geo_inverse_wgs_84( double alt, double lat1, double lon1, double lat2,
|
||||
return 0;
|
||||
} else if( fabs(cosphi2) < testv ) {
|
||||
// terminal point is polar
|
||||
int k = geo_inverse_wgs_84( alt, lat1,lon1,lat1,lon1+180.0,
|
||||
az1,az2,s );
|
||||
double _lon1 = lon1 + 180.0f;
|
||||
int k = geo_inverse_wgs_84( alt, lat1, lon1, lat1, _lon1,
|
||||
az1, az2, s );
|
||||
k = k; // avoid compiler error since return result is unused
|
||||
*s /= 2.0;
|
||||
*az2 = *az1 + 180.0;
|
||||
@@ -395,92 +442,3 @@ int geo_inverse_wgs_84( double alt, double lat1, double lon1, double lat2,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
TITLE: ls_geodesy
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
FUNCTION: Converts geocentric coordinates to geodetic positions
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
MODULE STATUS: developmental
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
GENEALOGY: Written as part of LaRCSim project by E. B. Jackson
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
DESIGNED BY: E. B. Jackson
|
||||
|
||||
CODED BY: E. B. Jackson
|
||||
|
||||
MAINTAINED BY: E. B. Jackson
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
MODIFICATION HISTORY:
|
||||
|
||||
DATE PURPOSE BY
|
||||
|
||||
930208 Modified to avoid singularity near polar region. EBJ
|
||||
930602 Moved backwards calcs here from ls_step. EBJ
|
||||
931214 Changed erroneous Latitude and Altitude variables to
|
||||
*lat_geod and *alt in routine ls_geoc_to_geod. EBJ
|
||||
940111 Changed header files from old ls_eom.h style to ls_types,
|
||||
and ls_constants. Also replaced old DATA type with new
|
||||
SCALAR type. EBJ
|
||||
|
||||
CURRENT RCS HEADER:
|
||||
|
||||
$Header$
|
||||
* Revision 1.5 1994/01/11 18:47:05 bjax
|
||||
* Changed include files to use types and constants, not ls_eom.h
|
||||
* Also changed DATA type to SCALAR type.
|
||||
*
|
||||
* Revision 1.4 1993/12/14 21:06:47 bjax
|
||||
* Removed global variable references Altitude and Latitude. EBJ
|
||||
*
|
||||
* Revision 1.3 1993/06/02 15:03:40 bjax
|
||||
* Made new subroutine for calculating geodetic to geocentric; changed name
|
||||
* of forward conversion routine from ls_geodesy to ls_geoc_to_geod.
|
||||
*
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
[ 1] Stevens, Brian L.; and Lewis, Frank L.: "Aircraft
|
||||
Control and Simulation", Wiley and Sons, 1992.
|
||||
ISBN 0-471-61397-5
|
||||
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
CALLED BY: ls_aux
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
CALLS TO:
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
INPUTS:
|
||||
lat_geoc Geocentric latitude, radians, + = North
|
||||
radius C.G. radius to earth center, ft
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
OUTPUTS:
|
||||
lat_geod Geodetic latitude, radians, + = North
|
||||
alt C.G. altitude above mean sea level, ft
|
||||
sea_level_r radius from earth center to sea level at
|
||||
local vertical (surface normal) of C.G.
|
||||
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +1,7 @@
|
||||
/**
|
||||
* \file sg_geodesy.hxx
|
||||
* Routines to convert between geodetic and geocentric coordinate systems.
|
||||
* Copied and adapted directly from LaRCsim/ls_geodesy.c
|
||||
*/
|
||||
|
||||
// See below for the complete original LaRCsim comments.
|
||||
//
|
||||
// $Id$
|
||||
|
||||
|
||||
#ifndef _SG_GEODESY_HXX
|
||||
#define _SG_GEODESY_HXX
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error This library requires C++
|
||||
#endif
|
||||
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
|
||||
|
||||
/**
|
||||
* Convert from geocentric coordinates to geodetic coordinates
|
||||
@@ -31,45 +12,78 @@
|
||||
* @param sea_level_r (out) radius from earth center to sea level at
|
||||
* local vertical (surface normal) of C.G. (meters)
|
||||
*/
|
||||
void sgGeocToGeod( double lat_geoc, double radius, double
|
||||
*lat_geod, double *alt, double *sea_level_r );
|
||||
void sgGeocToGeod(double lat_geoc, double radius,
|
||||
double *lat_geod, double *alt, double *sea_level_r);
|
||||
|
||||
|
||||
/**
|
||||
* Convert from geodetic coordinates to geocentric coordinates
|
||||
* Convert from geodetic coordinates to geocentric coordinates.
|
||||
* WARNING: this function is non-reversible. Due to the fact that
|
||||
* "up" is a different direction for geocentric and geodetic frames,
|
||||
* you can not simply add your "alt" parameter to the "sl_radius"
|
||||
* result and get back (via sgGeodToGeoc()) to the coordinates you
|
||||
* started with. The error under normal conditions will be of
|
||||
* centimeter order; whether that is important or not is application
|
||||
* dependent. Consider using sgGeodToCart() instead.
|
||||
*
|
||||
* @param lat_geod (in) Geodetic latitude, radians, + = North
|
||||
* @param alt (in) C.G. altitude above mean sea level (meters)
|
||||
* @param sl_radius (out) SEA LEVEL radius to earth center (meters)
|
||||
* (add Altitude to get true distance from earth center.
|
||||
* @param lat_geoc (out) Geocentric latitude, radians, + = North
|
||||
*/
|
||||
void sgGeodToGeoc( double lat_geod, double alt, double *sl_radius,
|
||||
double *lat_geoc );
|
||||
void sgGeodToGeoc(double lat_geod, double alt,
|
||||
double *sl_radius, double *lat_geoc );
|
||||
|
||||
/**
|
||||
* Convert a cartesian point to a geodetic lat/lon/altitude.
|
||||
*
|
||||
* @param xyz (in) Pointer to cartesian point.
|
||||
* @param lat (out) Latitude, in radians
|
||||
* @param lon (out) Longitude, in radians
|
||||
* @param alt (out) Altitude, in meters above the WGS84 ellipsoid
|
||||
*/
|
||||
void sgCartToGeod(double* xyz, double* lat, double* lon, double* alt);
|
||||
|
||||
/**
|
||||
* Convert a cartesian point to a geodetic lat/lon/altitude.
|
||||
* Alternate form using Point3D objects.
|
||||
*
|
||||
* @param cartesian point
|
||||
* @return geodetic point
|
||||
*/
|
||||
inline Point3D sgCartToGeod(const Point3D& p)
|
||||
{
|
||||
double lat, lon, alt, xyz[3];
|
||||
xyz[0] = p.x(); xyz[1] = p.y(); xyz[2] = p.z();
|
||||
sgCartToGeod(xyz, &lat, &lon, &alt);
|
||||
return Point3D(lon, lat, alt);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert a geodetic point lon(radians), lat(radians), elev(meter) to
|
||||
* a cartesian point.
|
||||
* Convert a geodetic lat/lon/altitude to a cartesian point.
|
||||
*
|
||||
* @param lat (in) Latitude, in radians
|
||||
* @param lon (in) Longitude, in radians
|
||||
* @param alt (in) Altitude, in meters above the WGS84 ellipsoid
|
||||
* @param xyz (out) Pointer to cartesian point.
|
||||
*/
|
||||
void sgGeodToCart(double lat, double lon, double alt, double* xyz);
|
||||
|
||||
/**
|
||||
* Convert a geodetic lat/lon/altitude to a cartesian point.
|
||||
* Alternate form using Point3D objects.
|
||||
*
|
||||
* @param geodetic point
|
||||
* @return cartesian point
|
||||
*/
|
||||
inline Point3D sgGeodToCart(const Point3D& geod) {
|
||||
double gc_lon, gc_lat, sl_radius;
|
||||
|
||||
// printf("A geodetic point is (%.2f, %.2f, %.2f)\n",
|
||||
// geod[0], geod[1], geod[2]);
|
||||
|
||||
gc_lon = geod.lon();
|
||||
sgGeodToGeoc(geod.lat(), geod.radius(), &sl_radius, &gc_lat);
|
||||
|
||||
// printf("A geocentric point is (%.2f, %.2f, %.2f)\n", gc_lon,
|
||||
// gc_lat, sl_radius+geod[2]);
|
||||
|
||||
Point3D pp = Point3D( gc_lon, gc_lat, sl_radius + geod.radius());
|
||||
return sgPolarToCart3d(pp);
|
||||
inline Point3D sgGeodToCart(const Point3D& geod)
|
||||
{
|
||||
double xyz[3];
|
||||
sgGeodToCart(geod.lat(), geod.lon(), geod.elev(), xyz);
|
||||
return Point3D(xyz[0], xyz[1], xyz[2]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Given a starting position and an offset radial and distance,
|
||||
* calculate an ending positon on a wgs84 ellipsoid.
|
||||
@@ -82,103 +96,27 @@ inline Point3D sgGeodToCart(const Point3D& geod) {
|
||||
* @param lon2 (out) degrees
|
||||
* @param az2 (out) return course in degrees
|
||||
*/
|
||||
int geo_direct_wgs_84 ( double alt, double lat1, double lon1, double az1,
|
||||
double s, double *lat2, double *lon2, double *az2 );
|
||||
int geo_direct_wgs_84 ( double alt, double lat1,
|
||||
double lon1, double az1,
|
||||
double s, double *lat2, double *lon2,
|
||||
double *az2 );
|
||||
|
||||
|
||||
// given alt, lat1, lon1, lat2, lon2, calculate starting and ending
|
||||
// az1, az2 and distance (s). Lat, lon, and azimuth are in degrees.
|
||||
// distance in meters
|
||||
int geo_inverse_wgs_84( double alt, double lat1, double lon1, double lat2,
|
||||
double lon2, double *az1, double *az2, double *s );
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
TITLE: ls_geodesy
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
FUNCTION: Converts geocentric coordinates to geodetic positions
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
MODULE STATUS: developmental
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
GENEALOGY: Written as part of LaRCSim project by E. B. Jackson
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
DESIGNED BY: E. B. Jackson
|
||||
|
||||
CODED BY: E. B. Jackson
|
||||
|
||||
MAINTAINED BY: E. B. Jackson
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
MODIFICATION HISTORY:
|
||||
|
||||
DATE PURPOSE BY
|
||||
|
||||
930208 Modified to avoid singularity near polar region. EBJ
|
||||
930602 Moved backwards calcs here from ls_step. EBJ
|
||||
931214 Changed erroneous Latitude and Altitude variables to
|
||||
*lat_geod and *alt in routine ls_geoc_to_geod. EBJ
|
||||
940111 Changed header files from old ls_eom.h style to ls_types,
|
||||
and ls_constants. Also replaced old DATA type with new
|
||||
SCALAR type. EBJ
|
||||
|
||||
CURRENT RCS HEADER:
|
||||
|
||||
$Header$
|
||||
|
||||
* Revision 1.5 1994/01/11 18:47:05 bjax
|
||||
* Changed include files to use types and constants, not ls_eom.h
|
||||
* Also changed DATA type to SCALAR type.
|
||||
*
|
||||
* Revision 1.4 1993/12/14 21:06:47 bjax
|
||||
* Removed global variable references Altitude and Latitude. EBJ
|
||||
*
|
||||
* Revision 1.3 1993/06/02 15:03:40 bjax
|
||||
* Made new subroutine for calculating geodetic to geocentric; changed name
|
||||
* of forward conversion routine from ls_geodesy to ls_geoc_to_geod.
|
||||
*
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
[ 1] Stevens, Brian L.; and Lewis, Frank L.: "Aircraft
|
||||
Control and Simulation", Wiley and Sons, 1992.
|
||||
ISBN 0-471-61397-5
|
||||
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
CALLED BY: ls_aux
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
CALLS TO:
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
INPUTS:
|
||||
lat_geoc Geocentric latitude, radians, + = North
|
||||
radius C.G. radius to earth center, ft
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
OUTPUTS:
|
||||
lat_geod Geodetic latitude, radians, + = North
|
||||
alt C.G. altitude above mean sea level, ft
|
||||
sea_level_r radius from earth center to sea level at
|
||||
local vertical (surface normal) of C.G.
|
||||
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Given an altitude and two sets of (lat, lon) calculate great circle
|
||||
* distance between them as well as the starting and ending azimuths.
|
||||
* @param alt (in) meters
|
||||
* @param lat1 (in) degrees
|
||||
* @param lon1 (in) degrees
|
||||
* @param lat2 (in) degrees
|
||||
* @param lon2 (in) degrees
|
||||
* @param az1 (out) start heading degrees
|
||||
* @param az2 (out) end heading degrees
|
||||
* @param s (out) distance meters
|
||||
*/
|
||||
int geo_inverse_wgs_84( double alt, double lat1,
|
||||
double lon1, double lat2,
|
||||
double lon2, double *az1, double *az2,
|
||||
double *s );
|
||||
|
||||
#endif // _SG_GEODESY_HXX
|
||||
|
||||
@@ -45,8 +45,8 @@ SphereInterpolate<T>::SphereInterpolate (int n, const double* x,
|
||||
// For complete spherical coverage, include the two antipodal points
|
||||
// (0,0,1,f(0,0,1)) and (0,0,-1,f(0,0,-1)) in the data set.
|
||||
|
||||
cout << "Initialising spherical interpolator.\n";
|
||||
cout << "[ 0%] Allocating memory \r";
|
||||
// cout << "Initialising spherical interpolator.\n";
|
||||
// cout << "[ 0%] Allocating memory \r";
|
||||
|
||||
theta = new double[3*n];
|
||||
phi = new double[3*n];
|
||||
@@ -63,7 +63,7 @@ SphereInterpolate<T>::SphereInterpolate (int n, const double* x,
|
||||
}
|
||||
|
||||
// use periodicity to get wrap-around in the Delaunay triangulation
|
||||
cout << "[ 10%] copying vertices for wrap-around\r";
|
||||
// cout << "[ 10%] copying vertices for wrap-around\r";
|
||||
int j, k;
|
||||
for (i = 0, j = n, k = 2*n; i < n; i++, j++, k++)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ SphereInterpolate<T>::SphereInterpolate (int n, const double* x,
|
||||
|
||||
pInterp = new mgcLinInterp2D<T>(3*n,theta,phi,func);
|
||||
|
||||
cout << "[100%] Finished initialising spherical interpolator. \n";
|
||||
// cout << "[100%] Finished initialising spherical interpolator. \n";
|
||||
}
|
||||
|
||||
template<class T>
|
||||
@@ -86,15 +86,15 @@ SphereInterpolate<T>::SphereInterpolate (int n, const sgVec2* p, const T* f)
|
||||
// Assumes (x[i],y[i],z[i]) is unit length for all 0 <= i < n.
|
||||
// For complete spherical coverage, include the two antipodal points
|
||||
// (0,0,1,f(0,0,1)) and (0,0,-1,f(0,0,-1)) in the data set.
|
||||
cout << "Initialising spherical interpolator.\n";
|
||||
cout << "[ 0%] Allocating memory \r";
|
||||
// cout << "Initialising spherical interpolator.\n";
|
||||
// cout << "[ 0%] Allocating memory \r";
|
||||
|
||||
theta = new double[3*n];
|
||||
phi = new double[3*n];
|
||||
func = new T[3*n];
|
||||
|
||||
// convert data to spherical coordinates
|
||||
cout << "[ 10%] copying vertices for wrap-around \r";
|
||||
// cout << "[ 10%] copying vertices for wrap-around \r";
|
||||
|
||||
int i, j, k;
|
||||
for (i = 0, j = n, k = 2*n; i < n; i++, j++, k++)
|
||||
@@ -114,7 +114,7 @@ SphereInterpolate<T>::SphereInterpolate (int n, const sgVec2* p, const T* f)
|
||||
|
||||
pInterp = new mgcLinInterp2D<T>(3*n,theta,phi,func);
|
||||
|
||||
cout << "[100%] Finished initialising spherical interpolator. \n";
|
||||
// cout << "[100%] Finished initialising spherical interpolator. \n";
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
template<class T>
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Title: antoi */
|
||||
/* Date: Jan 28, 1991 */
|
||||
/* Organization: W/OSO242 - Graphics and Display Section */
|
||||
/* Programmer: Allan Darling */
|
||||
/* Language: C/370 */
|
||||
/* */
|
||||
/* Abstract: This function will convert a character array */
|
||||
/* (string) of length (len) into an integer. */
|
||||
/* The integer is created via a call to the */
|
||||
/* function atoi. This function extends the */
|
||||
/* functionality of atoi by removing the */
|
||||
/* requirement for a sentinal delimited string */
|
||||
/* as input. */
|
||||
/* */
|
||||
/* Input: - Pointer to an array of characters. */
|
||||
/* - Integer indicating the number of character to include */
|
||||
/* in the conversion. */
|
||||
/* */
|
||||
/* Output:- An integer corresponding to the value in the character */
|
||||
/* array or INT32_MIN (-2147483647-1) if the function is */
|
||||
/* unable to acquire system storage. */
|
||||
/* */
|
||||
/* Modification History: */
|
||||
/* None */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifndef INT32_MIN
|
||||
# define INT32_MIN (-2147483647-1)
|
||||
#endif
|
||||
|
||||
int antoi(char * string, int len)
|
||||
{
|
||||
|
||||
/*******************/
|
||||
/* local variables */
|
||||
/*******************/
|
||||
|
||||
char * tmpstr;
|
||||
int i,
|
||||
retval;
|
||||
|
||||
|
||||
/*****************/
|
||||
/* function body */
|
||||
/*****************/
|
||||
|
||||
tmpstr = (char *)malloc((len+1) * sizeof(char));
|
||||
|
||||
if (tmpstr == NULL) return INT32_MIN;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
tmpstr[i] = string[i];
|
||||
|
||||
tmpstr[len] = '\0';
|
||||
|
||||
retval = atoi(tmpstr);
|
||||
|
||||
free(tmpstr);
|
||||
|
||||
return(retval);
|
||||
|
||||
} /* end antoi */
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
#include "Local.h" /* standard header file */
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Title: charcmp */
|
||||
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
|
||||
/* Date: 12 Dec 1995 */
|
||||
/* Programmer: CINDY L. CHONG */
|
||||
/* Language: C/370 */
|
||||
/* */
|
||||
/* Abstract: This function will compare each character in the */
|
||||
/* string match with each character in the pattern */
|
||||
/* which is made up of characters. The str can */
|
||||
/* be longer than the pattern. */
|
||||
/* */
|
||||
/* External Functions Called: */
|
||||
/* None. */
|
||||
/* */
|
||||
/* Input: str is a pointer to char */
|
||||
/* pattern is a pointer to char */
|
||||
/* */
|
||||
/* Output: Return true if str matches pattern, */
|
||||
/* otherwise, return false */
|
||||
/* */
|
||||
/* Modification History: */
|
||||
/* None. */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
|
||||
bool charcmp(char *str, char *pattern)
|
||||
{
|
||||
|
||||
|
||||
/**********************************************************/
|
||||
/* Loop while str and pattern is not equal to null, then */
|
||||
/* inscreases str and pattern by one */
|
||||
/**********************************************************/
|
||||
|
||||
for (; *pattern != '\0'; pattern++)
|
||||
{
|
||||
if (*str == '\0')
|
||||
return FALSE;
|
||||
|
||||
/************************************************************/
|
||||
/* If pattern match str, then increase str and jump out the */
|
||||
/* case and read next char of the str and pattern */
|
||||
/************************************************************/
|
||||
|
||||
if ( isspace(*pattern) )
|
||||
pattern = nxtalpha(pattern);
|
||||
|
||||
switch( *pattern )
|
||||
{
|
||||
case 'c':
|
||||
if ( !isalnum(*str++) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
if ( !isalpha(*str) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
str++;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
if ( !iscntrl(*str++) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
if ( !isdigit(*str) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
str++;
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
if ( !isgraph(*str++) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
if ( !islower(*str++) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
if ( !isprint(*str++) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 't':
|
||||
if ( !ispunct(*str++) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
if ( !isspace(*str++) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
if ( !isupper(*str++) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 's':
|
||||
if (*str++ != ' ')
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
if ( !isspace(*str) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
while ( isspace(*str) )
|
||||
str++;
|
||||
}
|
||||
break;
|
||||
|
||||
case '\'':
|
||||
pattern++;
|
||||
if (*pattern != *str)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
pattern++;
|
||||
str++;
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
|
||||
} /* end switch */
|
||||
|
||||
} /* end for */
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,539 +0,0 @@
|
||||
#include "Metar.h"
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Title: dRVMETAR */
|
||||
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
|
||||
/* Date: 28 Oct 1994 */
|
||||
/* Programmer: CARL MCCALLA */
|
||||
/* Language: C/370 */
|
||||
/* */
|
||||
/* Abstract: DRVMETAR is a main routine that acts a driver */
|
||||
/* for testing the METAR Decoder function. */
|
||||
/* */
|
||||
/* External Functions Called: */
|
||||
/* None. */
|
||||
/* DcdMETAR */
|
||||
/* prtDcdMetar */
|
||||
/* Sec0MTSm */
|
||||
/* Sec1MTSm */
|
||||
/* */
|
||||
/* Input: None */
|
||||
/* */
|
||||
/* Output: None */
|
||||
/* */
|
||||
/* Modification History: */
|
||||
/* None. */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
int main()
|
||||
{
|
||||
static char *string[] =
|
||||
{
|
||||
"KAST 221156Z COR 09005KT 7SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005",
|
||||
|
||||
"KAST COR 221156Z 09005KT 7SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005",
|
||||
|
||||
"KAST COR 221156Z 09005KT 1/SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005",
|
||||
|
||||
"KP88 COR 221156 09005KT 1/SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005",
|
||||
|
||||
"KP88 COR 221156 09005KT 1/SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 6//// 70109 T00890084 10100 20089 55005",
|
||||
|
||||
NULL,
|
||||
|
||||
|
||||
"EPIT 1755 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1/2V3/4",
|
||||
|
||||
"KFAR 181154Z 10003KT 1/4SM HZ CLR 16/13 A2988 RMK AO2 "
|
||||
"SLP117 56012 10345 20226 T01610133 $",
|
||||
|
||||
"KFAR 181154Z 10003KT 1/SM HZ CLR 16/13 A2988 RMK AO2 "
|
||||
"SLP117 56012 10345 20226 T01610133 $",
|
||||
|
||||
|
||||
|
||||
|
||||
"RKSS 21009KT 1400 RP2000 // ////// 21/20 1006/2972 NOSIG",
|
||||
|
||||
"RKSS 1200 21009KT 1400 RP2000 // ////// 21/20 1006/2972 NOSIG",
|
||||
|
||||
"RKSS 1130Z 23011KT 1100 R14R/P1500N R14L/P1500N BR SCT010 BKN030 "
|
||||
"BKN080 21/21 Q1006 NOSIG",
|
||||
|
||||
"RKSS 1130Z 23011KT 1100 R14R/P1500 R14L/P1500 BR SCT010 BKN030 "
|
||||
"BKN080 21/21 Q1006 NOSIG",
|
||||
|
||||
NULL,
|
||||
"KFAR 181154Z 10003KT 4SM HZ CLR 16/13 A2988 RMK AO2 "
|
||||
"SLP117 56012 1//// 2//// T01610133 $",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE DUE LO CLD SLP186",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE DUE10 LO CLD SLP186",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE DUE9 LO CLD SLP186",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE FZDZE10 LO CLD SLP186",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE FZDZE9 LO CLD SLP186",
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 30/XX Q1015",
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 M30/XX Q1015",
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 MM/XX Q1015",
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 MM/30 Q1015",
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 MM/M30 Q1015",
|
||||
|
||||
|
||||
|
||||
|
||||
"EGPD 36016G26KT 320V030 9999 FEW015TCU SCT026 BKN045 OVC090 "
|
||||
"SCT120 FEW250 RMK OCNL LTGICCG OHD",
|
||||
|
||||
"EGPD 36016G26KT 320V030 9999 FEW015TCU SCT026 07/01 Q1011 "
|
||||
"RMK TEMPO 8000 -SHRA BKN015 FRQ LTG VC",
|
||||
|
||||
"EGPD 36016G26KT 320V030 9999 FEW015TCU SCT026 07/01 Q1011 "
|
||||
"RMK TEMPO 8000 -SHRA BKN015 LTG DSNT W",
|
||||
|
||||
|
||||
"METAR KLAX 281156Z AUTO VRB100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT FC "
|
||||
"+TS BLPY FEW/// SCT000 BKN050 SCT150 OVC250 3/M1 A2991 RMK "
|
||||
"TORNADO B13E45 6 NE MOV E A02 PK WND 18515/45 "
|
||||
"WSHFT 1350 FROPA TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"VIS 2 1/2 RY11 "
|
||||
"DVR/1000V1600FT "
|
||||
"OCNL LTG VCY STN "
|
||||
"RAB1030E1145 FZDZE56 BLPYE57 CIG 1000V1500 CIG 020 RY11 "
|
||||
"PRESFR PRESRR SLP013 FG FEW/// HZ SCT000 VIS NW 2 1/2 GR 3/4 "
|
||||
"VIRGA SE -XRAFG3 CIGE005 BKN014 V OVC "
|
||||
"FU BKN020 NOSPECI LAST 8/365 SNINCR 2/10 4/178 "
|
||||
"933125 98096 P 0125 60225 70565 "
|
||||
"T00261015 10369 21026 "
|
||||
"404800360 52101 VISNO RY05 CHINO RY27 PNO RVRNO "
|
||||
"PWINO FZRANO TSNO $",
|
||||
|
||||
|
||||
"KBOS 251356Z 26011KT 10SM CLR 12/02 A2995 RMK AO2 SC VCNTY "
|
||||
"STN SSE-NNW SCT CI ABV SLP141 T01220023",
|
||||
|
||||
"EFHK 36009KT 340V060 CAVOK 12/M02 Q1013 NOSIG",
|
||||
"EGKK 24011KT 210V300 9999 SCT020 BKN045 12/06 Q1007 NOSIG",
|
||||
"EGPD 31018KT 8000 RA FEW013 BKN021 OVC045 06/04 Q0994 NOSIG",
|
||||
"EKCH 16012KT CAVOK 20/07 Q1006 NOSIG",
|
||||
"ESKN 10014KT 9000 BR SCT100 14/04 Q1010",
|
||||
"LOWW 231450Z 14017KT CAVOK 23/07 Q1010 NOSIG",
|
||||
|
||||
|
||||
"METAR CYCH 171500Z CCA 30017KT 2SM -SN BKN006",
|
||||
|
||||
"METAR CYOW 171500Z CCA 30017KT 2SM -SN BKN006 OVC020 00/M02 "
|
||||
"A2957 RMK S35F4NS1 /S01/ SNW WET SNW MELTG ON GRND CIG 5-7 "
|
||||
"SLP018",
|
||||
|
||||
"KAST 221156Z AUTO 09005KT 7SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005"
|
||||
" TSB0159E30 TS SE MOV NE",
|
||||
|
||||
"KAST 221156Z AUTO 09005KT 7SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005"
|
||||
" TSE0159 TS SE",
|
||||
|
||||
"KHVR 1756Z 31007KT 5SM -SN SCT011 BKN024 OVC030 M05/M08 A3056 "
|
||||
"RMK AOA 933004 "
|
||||
"BKN V SCT TNO PCPN 000 $ SLP389 4/015 60002 "
|
||||
"T10501077 11050 21078 51010",
|
||||
|
||||
"SPECI KGFI 041420Z AUTO 18030KT 3 1/2SM RVRNO TS -RA BKN008 OVC060 "
|
||||
"26/22 A2991 RMK A02 RA15TSB20 PRESFR SLP 101 P 0000 T02640218",
|
||||
|
||||
"METAR KCLE 281156Z 170100G135KT 110V180 M1/4SM "
|
||||
"R01L/P6000FT +TSSHRA VCFG "
|
||||
"BKN025 SCT100 OVC200 M26/ A2991 RMK PK WND 18515/45 A02 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"CIG 1000V1500 PRESFR FRQ LTG CG NW "
|
||||
"RAB1030E1145 FZDZE56 PRESRR SLP135 GS "
|
||||
"T1263 "
|
||||
"VIRGA NW 8/365 4/178 P 0125 60225 7//// 70565 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"CYQR 161700Z 15015KT 15SM SCT045 SCT090 BKN250 10/03 A2955 "
|
||||
"RMK SC1AC2C11 OB TAKEN H+ 5 DUE AWOS FAILURE SLP027",
|
||||
|
||||
|
||||
|
||||
|
||||
"KPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2",
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"SPECI KGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 199/182",
|
||||
|
||||
"SPECI KGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP701 P0254 199/182",
|
||||
|
||||
"KHLN 281156Z AUTO 27005KT 10SM OVC023 07/05 A3011 RMK AOA OVC V "
|
||||
"BKN $ SLP202 60000 70001 T00670050 10122 20061 53003",
|
||||
|
||||
"KPHX 281156Z 12004KT 10SM CLR 15/05 A2996 RMK AOA SLP135 T01500050 "
|
||||
"10250 20150 53006",
|
||||
"KFCA 281156Z 30003KT 10SM CLR 06/02 A3009 RMK AO TNO $ SLP191 "
|
||||
"T00610023 10167 20056 53003",
|
||||
"KAST 281156Z 00000KT 10SM BKN095 09/08 A2997 RMK AOA SLP150 "
|
||||
"T00940084 10161 20094 52005 ",
|
||||
"KHVR 281156Z 03003KT 10SM OVC020 09/07 A3010 RMK AO TNO ZRNO "
|
||||
"$ SLP194 T00940073 10156 20089 51005",
|
||||
"KGGW 281156Z 35006KT 5SM BR OVC010 10/09 A3003 RMK AOA $ SLP177 "
|
||||
"70003 T01000095 10156 20110 53008",
|
||||
"KELY 1153Z AUTO 14004KT 10SM SCT075 01/M01 A3011 RMK AOA TNO ZRNO "
|
||||
"SLP171 70001 T00061011 10139 21006 51005",
|
||||
"KFLG 281156Z 29006KT 10SM CLR 04/M01 A3012 RMK AO TNO SLP147 "
|
||||
"T00391011 21006 51004",
|
||||
"KGTF 281156Z 27005KT 7SM BKN080 04/04 A3010 RMK AOA SLP205 "
|
||||
"T00440045 10117 20039 51006",
|
||||
|
||||
"K13A 1918Z 20011KT 26/M06 RMK AO PKWND 020/RNO 644V264 T02611061",
|
||||
|
||||
"KP88 1919Z 09001KT 14/03 RMK AO / PKWND 002/RNO 158 Z T01440034",
|
||||
|
||||
"K40B 1924Z 29004KT 15/M07 RMK AO PKWND 011/RM MV263 T01501072",
|
||||
|
||||
"KGGW 1756Z 33018KT 10SM OVC015 M03/M06 A3041 RMK AOA SLP338 "
|
||||
"4/007 60002 T10281055 11028 21072 51009",
|
||||
"KPHX 1756Z 130004KT 10SM CLR 18/M03 A3001 RMK AOA SLP154 "
|
||||
"T01781033 10178 20067 58007",
|
||||
"KFCA 1756Z 29005KT 10SM CLR 05/M11 A3049 RMK AOA TNO SLP352 "
|
||||
"T00501111 10050 21044 50004",
|
||||
"KAST 1756Z 01006KT 10SM CLR 11/04 A3047 RMK AOA SLP316 "
|
||||
"T01110045 10111 20000 50002",
|
||||
"KELY 1753Z 34010KT 10SM CLR 01/M07 A3022 RMK AOA TNO ZRNO "
|
||||
"SLP240 T00111066 10011 21078 58007",
|
||||
"KFLG 1756Z 07006KT 10SM CLR 06/M12 A3009 RMK AO TNO ZRNO "
|
||||
"SLP178 T00561122 10061 21100 58005",
|
||||
"KGTF 1756Z 35010KT 1/2SM -SN FG VV09 M06/M08 A3051 RMK AOA "
|
||||
"933004 SFC VSBY 3/4 "
|
||||
"PCPN M SLP393 60010 T10611077 11044 21067 53013",
|
||||
"KHLN 1756Z 35012KT 10SM SCT032 OVC060 M02/M09 A3048 RMK AOA "
|
||||
"SLP369 60000 T10171094 11017 21061 53006",
|
||||
"KAST 1756Z 01006KT 10SM CLR 11/04 A3047 RMK AOA SLP316 61104 "
|
||||
"71235 T01110045 10111 20000 401720056 58002",
|
||||
"METAR KLAX 04281156Z AUTO VRB100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT FC "
|
||||
"+TS BLPY FEW000 BKN050 SCT150 OVC250 3/M1 A2991 RMK "
|
||||
"TORNADO B13 DSNT NE A02 PK WND 18515/45 "
|
||||
"WSHFT 1350 FROPA TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"VIS 2 1/2 RY11 OCNL LTG VCY STN "
|
||||
"RAB1030E1145 FZDZE56 BLPYE57 CIG 1000V1500 CIG 020 RY11 "
|
||||
"PRESFR PRESRR SLP013 FG FEW000 VIS NW2 1/2 GR 3/4 "
|
||||
"VIRGA SE -XRAFG3 CIGE005 BKN014 V OVC "
|
||||
"FU BKN020 NOSPECI LAST 8/365 SNINCR 2/10 4/178 "
|
||||
"933125 98096 P 0125 60225 70565 "
|
||||
"T00261015 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
|
||||
|
||||
"METAR KGFI 041356Z AUTO 17012KT 130V210 3 1/2SM R15L/0500FT -RA "
|
||||
"SCT050 OVC110 26/18 A2991 RMK FUNNEL CLOUDS A02 RAB30 "
|
||||
"SLP 101 GR M1/4 VIRGA SCT V BKN P 0010 T02640178",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 05008KT 10SM R15L/P6000FT CLR A2991 "
|
||||
"RMK WATERSPOUTS VCY STN NW A02 SLP 101 10288 20243 52021 $ ",
|
||||
|
||||
"SPECI KGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"A2900 RMK A02A PK WND 18056/28 OCNL LTG AP "
|
||||
"RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 T01990182",
|
||||
|
||||
"KABE 281900Z NIL",
|
||||
|
||||
"METAR KPIT NIL",
|
||||
|
||||
"METAR KCLE 04281156Z 170100G135KT 110V180 M1/4SM "
|
||||
"R01L/P6000FT +TSSHRA VCFG "
|
||||
"BKN025 SCT100 OVC200 M26/ A2991 RMK PK WND 18515/45 A02 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"CIG 1000V1500 PRESFR FRQ LTG CG NW "
|
||||
"RAB1030E1145 FZDZE56 PRESRR SLP135 GS "
|
||||
"T1263 "
|
||||
"VIRGA NW 8/365 4/178 P 0125 60225 7//// 70565 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"METAR KPHL 040256Z AUTO 170100G135KT 130V210 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 LTG DSNT "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP037 GR 2 3/4 "
|
||||
"VIRGA E 8/365 4/178 P 0125 70565 21026 T0263 10369 60225 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"SPECI KGFI 041420Z AUTO 18030KT 2 1/2SM RVRNO TS -RA BKN008 "
|
||||
"OVC060 25/22 A2991 RMK A02 LTG DSNT W "
|
||||
"RAB15TSB20 PRESFR SLP101 P 0000 "
|
||||
"254/218",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR M1/4 "
|
||||
"VIRGA SE 8/365 4/178 P 0125 6//// 60225 70565 T0263 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
|
||||
|
||||
|
||||
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
|
||||
"VIRGA 35 8/365 4/178 P 0125 6//// 60225 70565 T0263 10369 21026 "
|
||||
"VIRGA 35 8/365 4/178 P 0125 21026 70565 10369 60225 T0263 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
|
||||
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 3/M1 A2991 RMK A02 PK WND 18515/45 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
|
||||
"VIRGA 35 8/365 4/178 P 0125 60225 70565 T00261015 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 3/M1 A2991 RMK A02 PK WND 185150/1345 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
|
||||
"VIRGA 35 8/365 4/178 P 0125 60225 70565 T00261015 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO",
|
||||
|
||||
|
||||
|
||||
"METAR KGFI 041356Z AUTO 05008KT 10SM R15L/P6000FT CLR A2991 RMK "
|
||||
"A02 SLP 101 10288 20243 52021",
|
||||
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 M199/M182",
|
||||
|
||||
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 M199/182",
|
||||
|
||||
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 199/M182",
|
||||
|
||||
"METAR APIT 171755Z AUTO 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 4/369 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 8/563 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 1/2V2 SLP875 SGB1213E1225",
|
||||
|
||||
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
|
||||
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK SLP056 "
|
||||
"RAE0123",
|
||||
|
||||
"SPECI APIT 171755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 8/321 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 SLP875 FGB1713",
|
||||
|
||||
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2 SLP875",
|
||||
|
||||
|
||||
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 1/2V2 1/2 SLP875",
|
||||
|
||||
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2 1/2 SLP875",
|
||||
|
||||
|
||||
"EGPF 1720Z 00000KT 9999 -SHRA STC014 SCT020CB BNK024 12/09 "
|
||||
"Q1003 NOSIG",
|
||||
|
||||
"NZAA 1700Z 03010KT 30KM 03 5CU022 7SC035 11/07 Q1006.5 NOSIG",
|
||||
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
|
||||
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK KAUKAU 30050KT",
|
||||
"DGAA 1800Z 22012KT 9999 SCT009 BKN120 25/21 Q1015",
|
||||
"DAAT 1830Z 30010KT CAVOK 29/06 Q1019",
|
||||
|
||||
"GQPP 1800Z 34023KT 3000 DRSA SKC 24/20 Q1011 NSG",
|
||||
"DAAG 1830Z 06006KT 9999 SCT020 25/22 Q1015",
|
||||
"DABB 1830Z 04010KT 9999 SCT030TCU SCT033CB 27/18 Q1017",
|
||||
"DABC 1830Z 00000KT 9999 SCT026TCU SCT036CB 22/18 Q1020 RETS",
|
||||
|
||||
"NZAA 1700Z 03010KT 30KM 03 5CU022 7SC035 11/07 Q1006.5 NOSIG",
|
||||
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
|
||||
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK K",
|
||||
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
|
||||
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK KAUKAU 30050KT",
|
||||
"DGAA 1800Z 22012KT 9999 SCT009 BKN120 25/21 Q1015",
|
||||
|
||||
"GFLL 1900Z NIL",
|
||||
|
||||
"GOOY 1800Z 03006G17KT 340V080 6000 TSRA BKN016 BKN030CB "
|
||||
"BKN133 26/23 Q1013 NOSIG",
|
||||
|
||||
"GCXO 1930Z 32018KT 8000 SCT003 SCT007 18/16 Q1019",
|
||||
|
||||
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 1/2V2",
|
||||
|
||||
"BPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2",
|
||||
|
||||
"CPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2 1/2",
|
||||
|
||||
"DPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 1/2V2 1/2",
|
||||
|
||||
|
||||
"FPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 3/4V2 1/2",
|
||||
|
||||
"GPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 3/4V3",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/M16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/M16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/M16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/MM A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/MM A2992",
|
||||
|
||||
NULL};
|
||||
|
||||
/***************************/
|
||||
/* DECLARE LOCAL VARIABLES */
|
||||
/***************************/
|
||||
|
||||
Decoded_METAR Metar;
|
||||
Decoded_METAR *Mptr = &Metar;
|
||||
int j,
|
||||
ErReturn;
|
||||
|
||||
|
||||
/***************************************************/
|
||||
/* START BODY OF MAIN ROUTINE FOR CALLING DcdMETAR */
|
||||
/***************************************************/
|
||||
|
||||
j = 0;
|
||||
|
||||
while( string[j] != NULL)
|
||||
{
|
||||
/*-- PRINT INPUT METAR REPORT ----------------------------*/
|
||||
printf("INPUT METAR REPORT: %s\n",string[j] );
|
||||
|
||||
/*-- DECODE INPUT REPORT ---------------------------------*/
|
||||
if ( (ErReturn = DcdMETAR( string[ j ], Mptr )) != 0 )
|
||||
printf("DcdMETAR: Error Return Number: %d\n",ErReturn);
|
||||
|
||||
/*-- PRINT DECODED METAR REPORT ELEMENTS -----------------*/
|
||||
prtDMETR( Mptr );
|
||||
|
||||
j++;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
#include "Local.h" /* standard header file */
|
||||
#include "Metar.h"
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Title: fracPart */
|
||||
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
|
||||
/* Date: 13 Jun 1995 */
|
||||
/* Programmer: CARL MCCALLA */
|
||||
/* Language: C/370 */
|
||||
/* */
|
||||
/* Abstract: Convert a character string fraction into a */
|
||||
/* decimal (floating point) number. */
|
||||
/* */
|
||||
/* External Functions Called: */
|
||||
/* None. */
|
||||
/* */
|
||||
/* Input: string - a pointer to a character string frac- */
|
||||
/* tion. */
|
||||
/* Output: A decimal (floating point) number. */
|
||||
/* */
|
||||
/* Modification History: */
|
||||
/* None. */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
|
||||
float fracPart( char *string )
|
||||
{
|
||||
|
||||
/***************************/
|
||||
/* DECLARE LOCAL VARIABLES */
|
||||
/***************************/
|
||||
|
||||
char buf[ 6 ],
|
||||
*slash;
|
||||
|
||||
float numerator,
|
||||
denominator;
|
||||
|
||||
/*************************/
|
||||
/* START BODY OF ROUTINE */
|
||||
/*************************/
|
||||
|
||||
slash = strchr(string, '/');
|
||||
|
||||
memset(buf , '\0', 6);
|
||||
strncpy( buf, string, slash-string);
|
||||
|
||||
numerator = (float) atoi(buf);
|
||||
|
||||
memset(buf , '\0', 6);
|
||||
strcpy( buf, slash+1);
|
||||
|
||||
denominator = (float) atoi(buf);
|
||||
|
||||
return (numerator/denominator);
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
||||
includedir = @includedir@/metar
|
||||
|
||||
lib_LIBRARIES = libsgmetar.a
|
||||
|
||||
include_HEADERS = MetarReport.h MetarStation.h
|
||||
|
||||
libsgmetar_a_SOURCES = \
|
||||
Antoi.cpp Charcmp.cpp Dcdmetar.cpp Dcdmtrmk.cpp Drvmetar.c \
|
||||
Fracpart.cpp Local.h Metar.h \
|
||||
MetarReport.cpp \
|
||||
MetarStation.cpp \
|
||||
Prtdmetr.cpp Stspack2.cpp Stspack3.cpp
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
@@ -1,149 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="Metar" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=Metar - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Metar.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Metar.mak" CFG="Metar - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Metar - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "Metar - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Metar - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /W3 /GX /Zi /O2 /I "..\..\..\lib" /I "..\lib" /I "..\..\lib" /I "..\..\..\..\lib" /I ".." /I "..\.." /I "..\..\.." /I "..\..\..\.." /I "..\include" /I "..\..\include" /I "..\..\..\include" /I "..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "Metar - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /G6 /W3 /Gm /GX /Zi /Od /I "..\..\..\lib" /I "..\lib" /I "..\..\lib" /I "..\..\..\..\lib" /I ".." /I "..\.." /I "..\..\.." /I "..\..\..\.." /I "..\include" /I "..\..\include" /I "..\..\..\include" /I "..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Metar - Win32 Release"
|
||||
# Name "Metar - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Antoi.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Charcmp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Dcdmetar.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Dcdmtrmk.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Fracpart.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MetarReport.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MetarStation.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Prtdmetr.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Stspack2.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Stspack3.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LOCAL.H
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\METAR.H
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MetarReport.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MetarStation.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,265 +0,0 @@
|
||||
#ifndef METARX
|
||||
#define METARX
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Title: METAR H */
|
||||
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
|
||||
/* Date: 19 Jan 1996 */
|
||||
/* Programmer: CARL MCCALLA */
|
||||
/* Language: C/370 */
|
||||
/* */
|
||||
/* Abstract: METAR Decoder Header File. */
|
||||
/* */
|
||||
/* Modification History: */
|
||||
/* None. */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
|
||||
|
||||
#include "Local.h" /* standard header file */
|
||||
|
||||
|
||||
/*********************************************/
|
||||
/* */
|
||||
/* RUNWAY VISUAL RANGE STRUCTURE DECLARATION */
|
||||
/* AND VARIABLE TYPE DEFINITION */
|
||||
/* */
|
||||
/*********************************************/
|
||||
|
||||
typedef struct runway_VisRange {
|
||||
char runway_designator[6];
|
||||
bool vrbl_visRange;
|
||||
bool below_min_RVR;
|
||||
bool above_max_RVR;
|
||||
int visRange;
|
||||
int Max_visRange;
|
||||
int Min_visRange;
|
||||
} Runway_VisRange;
|
||||
|
||||
/***********************************************/
|
||||
/* */
|
||||
/* DISPATCH VISUAL RANGE STRUCTURE DECLARATION */
|
||||
/* AND VARIABLE TYPE DEFINITION */
|
||||
/* */
|
||||
/***********************************************/
|
||||
|
||||
typedef struct dispatch_VisRange {
|
||||
bool vrbl_visRange;
|
||||
bool below_min_DVR;
|
||||
bool above_max_DVR;
|
||||
int visRange;
|
||||
int Max_visRange;
|
||||
int Min_visRange;
|
||||
} Dispatch_VisRange;
|
||||
|
||||
/*****************************************/
|
||||
/* */
|
||||
/* CLOUD CONDITION STRUCTURE DECLARATION */
|
||||
/* AND VARIABLE TYPE DEFINITION */
|
||||
/* */
|
||||
/*****************************************/
|
||||
|
||||
typedef struct cloud_Conditions {
|
||||
char cloud_type[5];
|
||||
char cloud_hgt_char[4];
|
||||
char other_cld_phenom[4];
|
||||
int cloud_hgt_meters;
|
||||
} Cloud_Conditions;
|
||||
|
||||
/*****************************************/
|
||||
/* */
|
||||
/* WIND GROUP DATA STRUCTURE DECLARATION */
|
||||
/* AND VARIABLE TYPE DEFINITION */
|
||||
/* */
|
||||
/*****************************************/
|
||||
|
||||
typedef struct windstruct {
|
||||
char windUnits[ 4 ];
|
||||
bool windVRB;
|
||||
int windDir;
|
||||
int windSpeed;
|
||||
int windGust;
|
||||
} WindStruct;
|
||||
|
||||
/*****************************************/
|
||||
/* */
|
||||
/* RECENT WX GROUP STRUCTURE DECLARATION */
|
||||
/* AND VARIABLE TYPE DEFINITION */
|
||||
/* */
|
||||
/*****************************************/
|
||||
|
||||
typedef struct recent_wx {
|
||||
char Recent_weather[ 5 ];
|
||||
int Bhh;
|
||||
int Bmm;
|
||||
int Ehh;
|
||||
int Emm;
|
||||
} Recent_Wx;
|
||||
|
||||
/***************************************/
|
||||
/* */
|
||||
/* DECODED METAR STRUCTURE DECLARATION */
|
||||
/* AND VARIABLE TYPE DEFINITION */
|
||||
/* */
|
||||
/***************************************/
|
||||
|
||||
typedef struct decoded_METAR {
|
||||
char synoptic_cloud_type[ 6 ];
|
||||
char snow_depth_group[ 6 ];
|
||||
char codeName[ 6 ];
|
||||
char stnid[5];
|
||||
char horiz_vsby[5];
|
||||
char dir_min_horiz_vsby[3];
|
||||
char vsby_Dir[ 3 ];
|
||||
char WxObstruct[10][8];
|
||||
char autoIndicator[5];
|
||||
char VSBY_2ndSite_LOC[10];
|
||||
char SKY_2ndSite_LOC[10];
|
||||
char SKY_2ndSite[10];
|
||||
char SectorVsby_Dir[ 3 ];
|
||||
char ObscurAloft[ 12 ];
|
||||
char ObscurAloftSkyCond[ 12 ];
|
||||
char VrbSkyBelow[ 4 ];
|
||||
char VrbSkyAbove[ 4 ];
|
||||
char LTG_DIR[ 3 ];
|
||||
char CloudLow;
|
||||
char CloudMedium;
|
||||
char CloudHigh;
|
||||
char CIG_2ndSite_LOC[10];
|
||||
char VIRGA_DIR[3];
|
||||
char TornadicType[15];
|
||||
char TornadicLOC[10];
|
||||
char TornadicDIR[4];
|
||||
char TornadicMovDir[3];
|
||||
char CHINO_LOC[6];
|
||||
char VISNO_LOC[6];
|
||||
char PartialObscurationAmt[2][7];
|
||||
char PartialObscurationPhenom[2][12];
|
||||
char SfcObscuration[6][10];
|
||||
char charPrevailVsby[12];
|
||||
char charVertVsby[10];
|
||||
char TS_LOC[3];
|
||||
char TS_MOVMNT[3];
|
||||
|
||||
bool Indeterminant3_6HrPrecip;
|
||||
bool CIGNO;
|
||||
bool SLPNO;
|
||||
bool ACFTMSHP;
|
||||
bool NOSPECI;
|
||||
bool FIRST;
|
||||
bool LAST;
|
||||
bool SunSensorOut;
|
||||
bool AUTO;
|
||||
bool COR;
|
||||
bool NIL_rpt;
|
||||
bool CAVOK;
|
||||
bool RVRNO;
|
||||
bool A_altstng;
|
||||
bool Q_altstng;
|
||||
bool VIRGA;
|
||||
bool VOLCASH;
|
||||
bool GR;
|
||||
bool CHINO;
|
||||
bool VISNO;
|
||||
bool PNO;
|
||||
bool PWINO;
|
||||
bool FZRANO;
|
||||
bool TSNO;
|
||||
bool DollarSign;
|
||||
bool PRESRR;
|
||||
bool PRESFR;
|
||||
bool Wshft_FROPA;
|
||||
bool OCNL_LTG;
|
||||
bool FRQ_LTG;
|
||||
bool CNS_LTG;
|
||||
bool CG_LTG;
|
||||
bool IC_LTG;
|
||||
bool CC_LTG;
|
||||
bool CA_LTG;
|
||||
bool DSNT_LTG;
|
||||
bool AP_LTG;
|
||||
bool VcyStn_LTG;
|
||||
bool OVHD_LTG;
|
||||
bool LightningVCTS;
|
||||
bool LightningTS;
|
||||
|
||||
int TornadicDistance;
|
||||
int ob_hour;
|
||||
int ob_minute;
|
||||
int ob_date;
|
||||
int minWnDir;
|
||||
int maxWnDir;
|
||||
int VertVsby;
|
||||
int temp;
|
||||
int dew_pt_temp;
|
||||
int QFE;
|
||||
int hectoPasc_altstng;
|
||||
int char_prestndcy;
|
||||
int minCeiling;
|
||||
int maxCeiling;
|
||||
int WshfTime_hour;
|
||||
int WshfTime_minute;
|
||||
int min_vrbl_wind_dir;
|
||||
int max_vrbl_wind_dir;
|
||||
int PKWND_dir;
|
||||
int PKWND_speed;
|
||||
int PKWND_hour;
|
||||
int PKWND_minute;
|
||||
int SKY_2ndSite_Meters;
|
||||
int Ceiling;
|
||||
int Estimated_Ceiling;
|
||||
int SNINCR;
|
||||
int SNINCR_TotalDepth;
|
||||
int SunshineDur;
|
||||
int ObscurAloftHgt;
|
||||
int VrbSkyLayerHgt;
|
||||
int Num8thsSkyObscured;
|
||||
int CIG_2ndSite_Meters;
|
||||
int snow_depth;
|
||||
int BTornadicHour;
|
||||
int BTornadicMinute;
|
||||
int ETornadicHour;
|
||||
int ETornadicMinute;
|
||||
|
||||
|
||||
float SectorVsby;
|
||||
float WaterEquivSnow;
|
||||
float VSBY_2ndSite;
|
||||
float prevail_vsbySM;
|
||||
float prevail_vsbyM;
|
||||
float prevail_vsbyKM;
|
||||
float prestndcy;
|
||||
float precip_amt;
|
||||
float precip_24_amt;
|
||||
float maxtemp;
|
||||
float mintemp;
|
||||
float max24temp;
|
||||
float min24temp;
|
||||
float minVsby;
|
||||
float maxVsby;
|
||||
float hourlyPrecip;
|
||||
float TWR_VSBY;
|
||||
float SFC_VSBY;
|
||||
float Temp_2_tenths;
|
||||
float DP_Temp_2_tenths;
|
||||
float SLP;
|
||||
float GR_Size;
|
||||
|
||||
double inches_altstng;
|
||||
|
||||
Runway_VisRange RRVR[12];
|
||||
Dispatch_VisRange DVR;
|
||||
Recent_Wx ReWx[3];
|
||||
WindStruct winData;
|
||||
Cloud_Conditions cldTypHgt[6];
|
||||
|
||||
} Decoded_METAR;
|
||||
|
||||
#define MAXWXSYMBOLS 10 /*-- NOT TO EXCEED 10 PRES. WX GRPS --*/
|
||||
#define MAXTOKENS 500 /*-- RPT NOT TO EXCEED 500 GRPS --*/
|
||||
|
||||
void prtDMETR( Decoded_METAR *Mptr );
|
||||
int DcdMETAR( char *string, Decoded_METAR *Mptr );
|
||||
|
||||
#endif
|
||||
@@ -1,311 +0,0 @@
|
||||
// Metar report implementation class code
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include STL_IOSTREAM
|
||||
|
||||
#include "MetarReport.h"
|
||||
#include "Metar.h"
|
||||
|
||||
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
|
||||
SG_USING_STD(endl);
|
||||
SG_USING_STD(ostream);
|
||||
#endif
|
||||
|
||||
CMetarReport::CMetarReport(
|
||||
char *s ) :
|
||||
m_DecodedReport( 0 )
|
||||
{
|
||||
m_DecodedReport = new Decoded_METAR;
|
||||
DcdMETAR( s, (Decoded_METAR *)m_DecodedReport );
|
||||
}
|
||||
|
||||
|
||||
CMetarReport::~CMetarReport()
|
||||
{
|
||||
}
|
||||
|
||||
static int DecodeDirChars( char* c )
|
||||
{
|
||||
int r = 0;
|
||||
|
||||
if ( c[0] )
|
||||
{
|
||||
if ( c[0] == 'E' ) r = 90;
|
||||
else if ( c[0] == 'S' ) r = 180;
|
||||
else if ( c[0] == 'W' ) r = 270;
|
||||
|
||||
if ( r == 0 )
|
||||
{
|
||||
if ( c[1] == 'E' ) r = 45;
|
||||
else if ( c[1] == 'W' ) r = 315;
|
||||
}
|
||||
else if ( r == 180 )
|
||||
{
|
||||
if ( c[1] == 'E' ) r = 135;
|
||||
else if ( c[1] == 'W' ) r = 225;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
char *CMetarReport::StationID()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->stnid;
|
||||
}
|
||||
|
||||
int CMetarReport::Day()
|
||||
{
|
||||
return ((Decoded_METAR*)m_DecodedReport)->ob_date;
|
||||
}
|
||||
|
||||
int CMetarReport::Hour()
|
||||
{
|
||||
return ((Decoded_METAR*)m_DecodedReport)->ob_hour;
|
||||
}
|
||||
|
||||
int CMetarReport::Minutes()
|
||||
{
|
||||
return ((Decoded_METAR*)m_DecodedReport)->ob_minute;
|
||||
}
|
||||
|
||||
int CMetarReport::WindDirection()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->winData.windDir;
|
||||
}
|
||||
|
||||
int CMetarReport::WindSpeed()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->winData.windSpeed;
|
||||
}
|
||||
|
||||
int CMetarReport::WindGustSpeed()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->winData.windGust;
|
||||
}
|
||||
|
||||
int CMetarReport::LightningDirection()
|
||||
{
|
||||
return DecodeDirChars( ((Decoded_METAR *)m_DecodedReport)->LTG_DIR );
|
||||
}
|
||||
|
||||
char CMetarReport::CloudLow()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->CloudLow;
|
||||
}
|
||||
|
||||
char CMetarReport::CloudMedium()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->CloudMedium;
|
||||
}
|
||||
|
||||
char CMetarReport::CloudHigh()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->CloudHigh;
|
||||
}
|
||||
|
||||
int CMetarReport::VirgaDirection()
|
||||
{
|
||||
return DecodeDirChars( ((Decoded_METAR *)m_DecodedReport)->VIRGA_DIR );
|
||||
}
|
||||
|
||||
int CMetarReport::TornadicDirection()
|
||||
{
|
||||
return DecodeDirChars( ((Decoded_METAR *)m_DecodedReport)->TornadicDIR );
|
||||
}
|
||||
|
||||
int CMetarReport::TornadicMovementDirection()
|
||||
{
|
||||
return DecodeDirChars( ((Decoded_METAR *)m_DecodedReport)->TornadicMovDir );
|
||||
}
|
||||
|
||||
int CMetarReport::ThunderStormDirection()
|
||||
{
|
||||
return DecodeDirChars( ((Decoded_METAR *)m_DecodedReport)->TS_LOC );
|
||||
}
|
||||
|
||||
int CMetarReport::ThunderStormMovementDirection()
|
||||
{
|
||||
return DecodeDirChars( ((Decoded_METAR *)m_DecodedReport)->TS_MOVMNT );
|
||||
}
|
||||
|
||||
bool CMetarReport::Virga()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->VIRGA;
|
||||
}
|
||||
|
||||
bool CMetarReport::VolcanicAsh()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->VOLCASH;
|
||||
}
|
||||
|
||||
bool CMetarReport::Hail()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->GR;
|
||||
}
|
||||
|
||||
bool CMetarReport::OccationalLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->OCNL_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::FrequentLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->FRQ_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::ContinuousLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->CNS_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::CloudToGroundLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->CG_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::InterCloudLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->IC_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::CloudToCloudLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->CC_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::CloudToAirLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->CA_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::DistantLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->DSNT_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::AirportLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->AP_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::VicinityLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->VcyStn_LTG;
|
||||
}
|
||||
|
||||
bool CMetarReport::OverheadLightning()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->OVHD_LTG;
|
||||
}
|
||||
|
||||
int CMetarReport::Temperature()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->temp;
|
||||
}
|
||||
|
||||
int CMetarReport::DewpointTemperature()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->dew_pt_temp;
|
||||
}
|
||||
|
||||
int CMetarReport::VerticalVisibility() // Meters
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->VertVsby;
|
||||
}
|
||||
|
||||
int CMetarReport::Ceiling()
|
||||
{
|
||||
return
|
||||
(int)(SG_FEET_TO_METER*((Decoded_METAR *)m_DecodedReport)->Ceiling);
|
||||
}
|
||||
|
||||
int CMetarReport::EstimatedCeiling()
|
||||
{
|
||||
return
|
||||
(int)(SG_FEET_TO_METER
|
||||
* ((Decoded_METAR *)m_DecodedReport)->Estimated_Ceiling);
|
||||
}
|
||||
|
||||
int CMetarReport::VariableSkyLayerHeight()
|
||||
{
|
||||
return
|
||||
(int)(SG_FEET_TO_METER
|
||||
* ((Decoded_METAR *)m_DecodedReport)->VrbSkyLayerHgt);
|
||||
}
|
||||
|
||||
int CMetarReport::SnowDepthInches()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->snow_depth;
|
||||
}
|
||||
|
||||
|
||||
ostream&
|
||||
operator << ( ostream& out, CMetarReport& p )
|
||||
{
|
||||
return out
|
||||
<< "StationID " << p.StationID()
|
||||
<< " WindDirection " << p.WindDirection()
|
||||
<< " WindSpeed " << p.WindSpeed()
|
||||
<< " WindGustSpeed " << p.WindGustSpeed() << endl
|
||||
<< "CloudLow " << p.CloudLow()
|
||||
<< " CloudMedium " << p.CloudMedium()
|
||||
<< " CloudHigh " << p.CloudHigh() << endl
|
||||
<< "TornadicDirection " << p.TornadicDirection()
|
||||
<< " TornadicMovementDirection " << p.TornadicMovementDirection() << endl
|
||||
<< "ThunderStormDirection " << p.ThunderStormDirection()
|
||||
<< " ThunderStormMovementDirection " << p.ThunderStormMovementDirection() << endl
|
||||
<< "Virga " << p.Virga()
|
||||
<< " VirgaDirection " << p.VirgaDirection() << endl
|
||||
<< "VolcanicAsh " << p.VolcanicAsh() << endl
|
||||
<< "Hail " << p.Hail() << endl
|
||||
<< "LightningDirection " << p.LightningDirection()
|
||||
<< " OccationalLightning " << p.OccationalLightning()
|
||||
<< " FrequentLightning " << p.FrequentLightning()
|
||||
<< " ContinuousLightning " << p.ContinuousLightning() << endl
|
||||
<< "CloudToGroundLightning " << p.CloudToGroundLightning()
|
||||
<< " InterCloudLightning " << p.InterCloudLightning()
|
||||
<< " CloudToCloudLightning " << p.CloudToCloudLightning()
|
||||
<< " CloudToAirLightning " << p.CloudToAirLightning() << endl
|
||||
<< "DistantLightning " << p.DistantLightning()
|
||||
<< " AirportLightning " << p.AirportLightning()
|
||||
<< " VicinityLightning " << p.VicinityLightning()
|
||||
<< " OverheadLightning " << p.OverheadLightning() << endl
|
||||
<< "VerticalVisibility " << p.VerticalVisibility() << endl // Meters
|
||||
<< "Temperature " << p.Temperature()
|
||||
<< " DewpointTemperature " << p.DewpointTemperature() << endl
|
||||
<< "Ceiling " << p.Ceiling()
|
||||
<< " EstimatedCeiling " << p.EstimatedCeiling()
|
||||
<< " VariableSkyLayerHeight " << p.VariableSkyLayerHeight() << endl
|
||||
<< "SnowDepthInches " << p.SnowDepthInches() << endl
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
double CMetarReport::AirPressure()
|
||||
{
|
||||
return ((Decoded_METAR *)m_DecodedReport)->inches_altstng;
|
||||
}
|
||||
|
||||
void CMetarReport::dump()
|
||||
{
|
||||
prtDMETR( (Decoded_METAR *)m_DecodedReport );
|
||||
}
|
||||
|
||||
double CMetarReport::PrevailVisibility()
|
||||
{
|
||||
//Values from each visibility field converted to meters.
|
||||
double smiles;
|
||||
double km;
|
||||
double meters;
|
||||
smiles = ((Decoded_METAR*) m_DecodedReport)->prevail_vsbySM * 1609.34;
|
||||
km = ((Decoded_METAR*) m_DecodedReport)->prevail_vsbyKM * 1000;
|
||||
meters = ((Decoded_METAR*) m_DecodedReport)->prevail_vsbyM;
|
||||
|
||||
/* Return the smallest one. If the field is specified it should have been
|
||||
set to MAX_INT */
|
||||
if(smiles < km && smiles < meters)
|
||||
return smiles;
|
||||
else
|
||||
return km < meters ? km : meters;
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
// Class encapulating the metar report information
|
||||
//
|
||||
// Individual METAR reports are found in this directory:
|
||||
// ftp://weather.noaa.gov/data/observations/metar/stations
|
||||
//
|
||||
|
||||
#ifndef _MetarReport_
|
||||
#define _MetarReport_
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include STL_IOSTREAM
|
||||
#include STL_STRING
|
||||
#include <vector>
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
|
||||
SG_USING_STD(string);
|
||||
|
||||
class CMetarReport
|
||||
{
|
||||
// Typedefs, enumerations
|
||||
|
||||
// Attributes
|
||||
private:
|
||||
void *m_DecodedReport;
|
||||
// A void pointer which is cast to the correct type in the cpp file.
|
||||
// I don't want the ugly metar structure and header files dragged into
|
||||
// every report user program file.
|
||||
// Probably should be a smart pointer if copy constructor and assignment
|
||||
// is allowed.
|
||||
|
||||
// Operations
|
||||
|
||||
public:
|
||||
CMetarReport(
|
||||
char *s );
|
||||
// Constructor
|
||||
|
||||
~CMetarReport();
|
||||
// Destructor
|
||||
|
||||
char *StationID();
|
||||
|
||||
int Day(); // The day of month on which the report was issued.
|
||||
int Hour(); // The hour of the day the report was issued.
|
||||
int Minutes(); //Minutes past the hour of the report issue time.
|
||||
|
||||
// Directions in degrees
|
||||
// Speed in knots
|
||||
// Altitude in meters
|
||||
// Temperature in centigrade
|
||||
|
||||
int WindDirection();
|
||||
int WindSpeed();
|
||||
int WindGustSpeed();
|
||||
|
||||
// Add cloud more cloud info...
|
||||
// Cloud code characters...
|
||||
char CloudLow();
|
||||
char CloudMedium();
|
||||
char CloudHigh();
|
||||
|
||||
bool Virga();
|
||||
int VirgaDirection();
|
||||
|
||||
int TornadicDirection();
|
||||
int TornadicMovementDirection();
|
||||
|
||||
int ThunderStormDirection();
|
||||
int ThunderStormMovementDirection();
|
||||
|
||||
bool VolcanicAsh();
|
||||
bool Hail();
|
||||
|
||||
int LightningDirection();
|
||||
bool OccationalLightning();
|
||||
bool FrequentLightning();
|
||||
bool ContinuousLightning();
|
||||
bool Lightning()
|
||||
{
|
||||
return OccationalLightning() || FrequentLightning() || ContinuousLightning();
|
||||
}
|
||||
|
||||
bool CloudToGroundLightning();
|
||||
bool InterCloudLightning();
|
||||
bool CloudToCloudLightning();
|
||||
bool CloudToAirLightning();
|
||||
|
||||
bool DistantLightning();
|
||||
bool AirportLightning();
|
||||
bool OverheadLightning();
|
||||
bool VicinityLightning();
|
||||
|
||||
int Temperature();
|
||||
int DewpointTemperature();
|
||||
|
||||
int VerticalVisibility();
|
||||
int Ceiling();
|
||||
int EstimatedCeiling();
|
||||
int VariableSkyLayerHeight();
|
||||
|
||||
int SnowDepthInches();
|
||||
|
||||
double AirPressure(); //Return the air pressure in InchesHg.
|
||||
double PrevailVisibility(); // Prevailing Visibility in meters.
|
||||
void dump();
|
||||
|
||||
private:
|
||||
CMetarReport(
|
||||
const CMetarReport &rNewObj );
|
||||
// Copy constructor. Not implemented.
|
||||
|
||||
CMetarReport &operator =(
|
||||
const CMetarReport &rObj );
|
||||
// Assignment operator. Not implemented.
|
||||
};
|
||||
|
||||
ostream& operator << ( ostream&, CMetarReport& );
|
||||
|
||||
#endif
|
||||
@@ -1,218 +0,0 @@
|
||||
// Metar station implementation code
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include STL_IOSTREAM
|
||||
#include <stdio.h>
|
||||
|
||||
#include "MetarStation.h"
|
||||
#include <algorithm>
|
||||
|
||||
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
|
||||
SG_USING_STD(ostream);
|
||||
SG_USING_STD(cout);
|
||||
SG_USING_STD(endl);
|
||||
#endif
|
||||
|
||||
|
||||
double CMetarStation::decodeDMS( char *b )
|
||||
{
|
||||
double r = 0;
|
||||
double m = 0;
|
||||
double s = 0;
|
||||
if ( *b )
|
||||
{
|
||||
// Degrees
|
||||
r = (*b - '0') * 10.0; b++;
|
||||
r += (*b - '0'); b++;
|
||||
if ( *b != '-' )
|
||||
{
|
||||
r *= 10;
|
||||
r += (*b - '0'); b++;
|
||||
}
|
||||
b++;
|
||||
// Minutes
|
||||
m = (*b - '0') * 10.0; b++;
|
||||
m += (*b - '0'); b++;
|
||||
r += m/60.0;
|
||||
if ( *b == '-' )
|
||||
{
|
||||
// Seconds
|
||||
b++;
|
||||
s = (*b - '0') * 10.0; b++;
|
||||
s += (*b - '0'); b++;
|
||||
}
|
||||
r += s/3600.0;
|
||||
// Direction (E W N S)
|
||||
if ( *b == 'W' || *b == 'S' ) r = -r;
|
||||
}
|
||||
return r * SGD_DEGREES_TO_RADIANS;
|
||||
}
|
||||
|
||||
// Constructor
|
||||
// Decodes METAR station string of this format:
|
||||
// KPUB;72;464;Pueblo, Pueblo Memorial Airport;CO;United States;4;38-17-24N;104-29-54W;38-17-03N;104-29-43W;1440;1420;P
|
||||
|
||||
CMetarStation::CMetarStation(
|
||||
char *s )
|
||||
{
|
||||
char *t;
|
||||
t = strchr( s, ';' ); *t = 0; t++;
|
||||
m_ID = s;
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
m_number = atoi( s ) * 1000;
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
m_number += atoi( s );
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
m_name = s;
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
m_state = s;
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
m_country = s;
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
m_region = atoi( s );
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
double latitude = decodeDMS( s );
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
double longitude = decodeDMS( s );
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
double ulatitude = decodeDMS( s );
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
double ulongitude = decodeDMS( s );
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
double altitude = atoi( s ) * SG_FEET_TO_METER;
|
||||
m_altitude = (int)altitude;
|
||||
s = t; t = strchr( s, ';' ); *t = 0; t++;
|
||||
double ualtitude = atoi( s ) * SG_FEET_TO_METER;
|
||||
Point3D p( longitude, latitude, altitude+SG_EQUATORIAL_RADIUS_M );
|
||||
m_locationPolar = p;
|
||||
m_locationCart = sgPolarToCart3d( p );
|
||||
Point3D up( ulongitude, ulatitude, ualtitude+SG_EQUATORIAL_RADIUS_M );
|
||||
m_upperLocationPolar = up;
|
||||
m_upperLocationCart = sgPolarToCart3d( up );
|
||||
s = t;
|
||||
m_pFlag = s[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CMetarStation::dump()
|
||||
{
|
||||
cout << "ID:" << ID();
|
||||
cout << endl;
|
||||
cout << "number:" << number();
|
||||
cout << endl;
|
||||
cout << "name:" << name();
|
||||
cout << endl;
|
||||
cout << "state:" << state();
|
||||
cout << endl;
|
||||
cout << "country:" << country();
|
||||
cout << endl;
|
||||
cout << "region:" << region();
|
||||
cout << endl;
|
||||
cout << "Location (cart):" << locationCart();
|
||||
cout << endl;
|
||||
cout << "Location (polar):" << locationPolar();
|
||||
cout << endl;
|
||||
cout << "Upper Location (cart):" << upperLocationCart();
|
||||
cout << endl;
|
||||
cout << "Upper Location (polar):" << upperLocationPolar();
|
||||
cout << endl;
|
||||
cout << "P flag:" << pFlag();
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
CMetarStationDB::CMetarStationDB(const char * dbPath)
|
||||
{
|
||||
// Read the list of metar stations, decoding and adding to global list.
|
||||
|
||||
CMetarStation *m;
|
||||
char buf[256];
|
||||
|
||||
|
||||
// Open the metar station list
|
||||
FILE *f = fopen( dbPath, "r" );
|
||||
|
||||
|
||||
if ( f != NULL ) {
|
||||
// Read each line, create an instance of a station, and add it to the vector
|
||||
while ( fgets( buf, 256, f) != NULL && feof( f ) == 0 ) {
|
||||
// cout << buf << endl;
|
||||
m = new CMetarStation( buf );
|
||||
//m->dump();
|
||||
METAR_Stations[m->ID()]=( m );
|
||||
}
|
||||
|
||||
// Close the list
|
||||
fclose( f );
|
||||
// cout << METAR_Stations.size() << " Metar stations" << endl;
|
||||
|
||||
} else {
|
||||
// cout << "Could not open MetarStations file " << endl;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
CMetarStation * CMetarStationDB::find( std::string stationID )
|
||||
{
|
||||
std::map<std::string,CMetarStation*>::iterator target;
|
||||
target = METAR_Stations.find(stationID);
|
||||
if(target!= METAR_Stations.end() )
|
||||
return target->second;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
CMetarStation * CMetarStationDB::find( Point3D locationCart )
|
||||
{
|
||||
std::map<std::string,CMetarStation*>::iterator itr;
|
||||
double bestDist = 99999999;
|
||||
CMetarStation *bestStation = NULL;
|
||||
Point3D curLocation = locationCart;
|
||||
itr = METAR_Stations.begin();
|
||||
while(itr != METAR_Stations.end())
|
||||
{
|
||||
double dist = itr->second->locationCart().distance3Dsquared( curLocation );
|
||||
if (dist < bestDist )
|
||||
{
|
||||
bestDist = dist;
|
||||
bestStation = itr->second;
|
||||
}
|
||||
itr++;
|
||||
}
|
||||
|
||||
return bestStation;
|
||||
}
|
||||
|
||||
|
||||
CMetarStationDB::~CMetarStationDB() {
|
||||
std::map<std::string,CMetarStation*>::iterator itr;
|
||||
for(itr = METAR_Stations.begin(); itr != METAR_Stations.end(); itr++)
|
||||
{
|
||||
delete itr->second;
|
||||
}
|
||||
}
|
||||
|
||||
ostream&
|
||||
operator << ( ostream& out, const CMetarStation& p )
|
||||
{
|
||||
return out
|
||||
<< "ID:" << p.m_ID << endl
|
||||
<< "number:" << p.m_number << endl
|
||||
<< "name:" << p.m_name << endl
|
||||
<< "state:" << p.m_state << endl
|
||||
<< "country:" << p.m_country << endl
|
||||
<< "region:" << p.m_region << endl
|
||||
<< "Location (cart):" << p.m_locationCart << endl
|
||||
<< "Location (polar):" << p.m_locationCart << endl
|
||||
<< "Upper Location (cart):" << p.m_upperLocationCart << endl
|
||||
<< "Upper Location (polar):" << p.m_upperLocationPolar << endl
|
||||
<< "P flag:" << p.m_pFlag << endl;
|
||||
}
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
// Class encapulating the metar station information
|
||||
//
|
||||
// METAR station information is kept in this file:
|
||||
// http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.gz
|
||||
// http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.txt
|
||||
|
||||
|
||||
#ifndef _MetarStation_
|
||||
#define _MetarStation_
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include STL_IOSTREAM
|
||||
#include STL_STRING
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
|
||||
SG_USING_STD(string);
|
||||
SG_USING_STD(vector);
|
||||
SG_USING_STD(map);
|
||||
|
||||
class CMetarStationDB;
|
||||
|
||||
class CMetarStation
|
||||
{
|
||||
// Attributes
|
||||
private:
|
||||
std::string m_ID;
|
||||
unsigned long m_number;
|
||||
std::string m_name;
|
||||
std::string m_state;
|
||||
std::string m_country;
|
||||
int m_region;
|
||||
Point3D m_locationPolar;
|
||||
Point3D m_upperLocationPolar;
|
||||
Point3D m_locationCart;
|
||||
Point3D m_upperLocationCart;
|
||||
int m_altitude;
|
||||
int m_upperAltitude;
|
||||
char m_pFlag;
|
||||
|
||||
// Operations
|
||||
private:
|
||||
double decodeDMS( char *b );
|
||||
|
||||
|
||||
|
||||
CMetarStation(
|
||||
char *s );
|
||||
// Constructor
|
||||
|
||||
~CMetarStation()
|
||||
{
|
||||
}
|
||||
// Destructor
|
||||
|
||||
public:
|
||||
std::string &ID() { return m_ID; }
|
||||
unsigned long number() { return m_number; }
|
||||
std::string &name() { return m_name; }
|
||||
std::string &state() { return m_state; }
|
||||
std::string &country() { return m_country; }
|
||||
int region() { return m_region; }
|
||||
unsigned int Altitude() { //Returns the stations height above MSL in M.
|
||||
return m_altitude;}
|
||||
Point3D &locationPolar() { return m_locationPolar; }
|
||||
Point3D &upperLocationPolar() { return m_upperLocationPolar; }
|
||||
Point3D &locationCart() { return m_locationCart; }
|
||||
Point3D &upperLocationCart() { return m_upperLocationCart; }
|
||||
char pFlag() { return m_pFlag; }
|
||||
// Get attributes
|
||||
|
||||
friend ostream& operator << ( ostream&, const CMetarStation& );
|
||||
void dump();
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
CMetarStation(
|
||||
const CMetarStation &rNewObj );
|
||||
// Copy constructor. Not implemented.
|
||||
|
||||
CMetarStation &operator =(
|
||||
const CMetarStation &rObj );
|
||||
// Assignment operator. Not implemented.
|
||||
|
||||
friend class CMetarStationDB;
|
||||
};
|
||||
|
||||
|
||||
class CMetarStationDB
|
||||
{
|
||||
|
||||
private:
|
||||
std::string databasePath; //The path of the database file.
|
||||
std::map<std::string , CMetarStation *> METAR_Stations;
|
||||
CMetarStation * bestStation;
|
||||
|
||||
public:
|
||||
CMetarStation *find( std::string stationID );
|
||||
CMetarStation * find( Point3D locationCart );
|
||||
CMetarStationDB(const char * dbFile);
|
||||
~CMetarStationDB();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,549 +0,0 @@
|
||||
// Metar Library test
|
||||
|
||||
#include <iostream>
|
||||
#include "../MetarReport.h"
|
||||
#include "../MetarStation.h"
|
||||
#include <GL/glut.h>
|
||||
|
||||
static char *report[] =
|
||||
{
|
||||
"KAST 221156Z COR 09005KT 7SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005",
|
||||
|
||||
"KAST COR 221156Z 09005KT 7SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005",
|
||||
|
||||
"KAST COR 221156Z 09005KT 1/SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005",
|
||||
|
||||
"KP88 COR 221156 09005KT 1/SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005",
|
||||
|
||||
"KP88 COR 221156 09005KT 1/SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 6//// 70109 T00890084 10100 20089 55005",
|
||||
|
||||
|
||||
"EPIT 1755 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1/2V3/4",
|
||||
|
||||
"KFAR 181154Z 10003KT 1/4SM HZ CLR 16/13 A2988 RMK AO2 "
|
||||
"SLP117 56012 10345 20226 T01610133 $",
|
||||
|
||||
"KFAR 181154Z 10003KT 1/SM HZ CLR 16/13 A2988 RMK AO2 "
|
||||
"SLP117 56012 10345 20226 T01610133 $",
|
||||
|
||||
"RKSS 21009KT 1400 RP2000 // ////// 21/20 1006/2972 NOSIG",
|
||||
|
||||
"RKSS 1200 21009KT 1400 RP2000 // ////// 21/20 1006/2972 NOSIG",
|
||||
|
||||
"RKSS 1130Z 23011KT 1100 R14R/P1500N R14L/P1500N BR SCT010 BKN030 "
|
||||
"BKN080 21/21 Q1006 NOSIG",
|
||||
|
||||
"RKSS 1130Z 23011KT 1100 R14R/P1500 R14L/P1500 BR SCT010 BKN030 "
|
||||
"BKN080 21/21 Q1006 NOSIG",
|
||||
|
||||
"KFAR 181154Z 10003KT 4SM HZ CLR 16/13 A2988 RMK AO2 "
|
||||
"SLP117 56012 1//// 2//// T01610133 $",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE DUE LO CLD SLP186",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE DUE10 LO CLD SLP186",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE DUE9 LO CLD SLP186",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE FZDZE10 LO CLD SLP186",
|
||||
|
||||
"CYYE 061300Z 3500KT 15SM BKN005 OVC040 08/08 A3004 RMK "
|
||||
"SF6SC1 VSBY RDCE FZDZE9 LO CLD SLP186",
|
||||
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 30/XX Q1015",
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 M30/XX Q1015",
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 MM/XX Q1015",
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 MM/30 Q1015",
|
||||
"MKJP 1400Z 13011KT 9999 FEW022 MM/M30 Q1015",
|
||||
|
||||
"EGPD 36016G26KT 320V030 9999 FEW015TCU SCT026 BKN045 OVC090 "
|
||||
"SCT120 FEW250 RMK OCNL LTGICCG OHD",
|
||||
|
||||
"EGPD 36016G26KT 320V030 9999 FEW015TCU SCT026 07/01 Q1011 "
|
||||
"RMK TEMPO 8000 -SHRA BKN015 FRQ LTG VC",
|
||||
|
||||
"EGPD 36016G26KT 320V030 9999 FEW015TCU SCT026 07/01 Q1011 "
|
||||
"RMK TEMPO 8000 -SHRA BKN015 LTG DSNT W",
|
||||
|
||||
"METAR KLAX 281156Z AUTO VRB100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT FC "
|
||||
"+TS BLPY FEW/// SCT000 BKN050 SCT150 OVC250 3/M1 A2991 RMK "
|
||||
"TORNADO B13E45 6 NE MOV E A02 PK WND 18515/45 "
|
||||
"WSHFT 1350 FROPA TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"VIS 2 1/2 RY11 "
|
||||
"DVR/1000V1600FT "
|
||||
"OCNL LTG VCY STN "
|
||||
"RAB1030E1145 FZDZE56 BLPYE57 CIG 1000V1500 CIG 020 RY11 "
|
||||
"PRESFR PRESRR SLP013 FG FEW/// HZ SCT000 VIS NW 2 1/2 GR 3/4 "
|
||||
"VIRGA SE -XRAFG3 CIGE005 BKN014 V OVC "
|
||||
"FU BKN020 NOSPECI LAST 8/365 SNINCR 2/10 4/178 "
|
||||
"933125 98096 P 0125 60225 70565 "
|
||||
"T00261015 10369 21026 "
|
||||
"404800360 52101 VISNO RY05 CHINO RY27 PNO RVRNO "
|
||||
"PWINO FZRANO TSNO $",
|
||||
|
||||
"KBOS 251356Z 26011KT 10SM CLR 12/02 A2995 RMK AO2 SC VCNTY "
|
||||
"STN SSE-NNW SCT CI ABV SLP141 T01220023",
|
||||
|
||||
"EFHK 36009KT 340V060 CAVOK 12/M02 Q1013 NOSIG",
|
||||
"EGKK 24011KT 210V300 9999 SCT020 BKN045 12/06 Q1007 NOSIG",
|
||||
"EGPD 31018KT 8000 RA FEW013 BKN021 OVC045 06/04 Q0994 NOSIG",
|
||||
"EKCH 16012KT CAVOK 20/07 Q1006 NOSIG",
|
||||
"ESKN 10014KT 9000 BR SCT100 14/04 Q1010",
|
||||
"LOWW 231450Z 14017KT CAVOK 23/07 Q1010 NOSIG",
|
||||
|
||||
"METAR CYCH 171500Z CCA 30017KT 2SM -SN BKN006",
|
||||
|
||||
"METAR CYOW 171500Z CCA 30017KT 2SM -SN BKN006 OVC020 00/M02 "
|
||||
"A2957 RMK S35F4NS1 /S01/ SNW WET SNW MELTG ON GRND CIG 5-7 "
|
||||
"SLP018",
|
||||
|
||||
"KAST 221156Z AUTO 09005KT 7SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005"
|
||||
" TSB0159E30 TS SE MOV NE",
|
||||
|
||||
"KAST 221156Z AUTO 09005KT 7SM -RA OVC026 09/08 A2996 RMK "
|
||||
"AO2 TNO SLP143 P0007 60047 70109 T00890084 10100 20089 55005"
|
||||
" TSE0159 TS SE",
|
||||
|
||||
"KHVR 1756Z 31007KT 5SM -SN SCT011 BKN024 OVC030 M05/M08 A3056 "
|
||||
"RMK AOA 933004 "
|
||||
"BKN V SCT TNO PCPN 000 $ SLP389 4/015 60002 "
|
||||
"T10501077 11050 21078 51010",
|
||||
|
||||
"SPECI KGFI 041420Z AUTO 18030KT 3 1/2SM RVRNO TS -RA BKN008 OVC060 "
|
||||
"26/22 A2991 RMK A02 RA15TSB20 PRESFR SLP 101 P 0000 T02640218",
|
||||
|
||||
"METAR KCLE 281156Z 170100G135KT 110V180 M1/4SM "
|
||||
"R01L/P6000FT +TSSHRA VCFG "
|
||||
"BKN025 SCT100 OVC200 M26/ A2991 RMK PK WND 18515/45 A02 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"CIG 1000V1500 PRESFR FRQ LTG CG NW "
|
||||
"RAB1030E1145 FZDZE56 PRESRR SLP135 GS "
|
||||
"T1263 "
|
||||
"VIRGA NW 8/365 4/178 P 0125 60225 7//// 70565 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"CYQR 161700Z 15015KT 15SM SCT045 SCT090 BKN250 10/03 A2955 "
|
||||
"RMK SC1AC2C11 OB TAKEN H+ 5 DUE AWOS FAILURE SLP027",
|
||||
|
||||
"KPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2",
|
||||
|
||||
"SPECI KGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 199/182",
|
||||
|
||||
"SPECI KGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP701 P0254 199/182",
|
||||
|
||||
"KHLN 281156Z AUTO 27005KT 10SM OVC023 07/05 A3011 RMK AOA OVC V "
|
||||
"BKN $ SLP202 60000 70001 T00670050 10122 20061 53003",
|
||||
|
||||
"KPHX 281156Z 12004KT 10SM CLR 15/05 A2996 RMK AOA SLP135 T01500050 "
|
||||
"10250 20150 53006",
|
||||
"KFCA 281156Z 30003KT 10SM CLR 06/02 A3009 RMK AO TNO $ SLP191 "
|
||||
"T00610023 10167 20056 53003",
|
||||
"KAST 281156Z 00000KT 10SM BKN095 09/08 A2997 RMK AOA SLP150 "
|
||||
"T00940084 10161 20094 52005 ",
|
||||
"KHVR 281156Z 03003KT 10SM OVC020 09/07 A3010 RMK AO TNO ZRNO "
|
||||
"$ SLP194 T00940073 10156 20089 51005",
|
||||
"KGGW 281156Z 35006KT 5SM BR OVC010 10/09 A3003 RMK AOA $ SLP177 "
|
||||
"70003 T01000095 10156 20110 53008",
|
||||
"KELY 1153Z AUTO 14004KT 10SM SCT075 01/M01 A3011 RMK AOA TNO ZRNO "
|
||||
"SLP171 70001 T00061011 10139 21006 51005",
|
||||
"KFLG 281156Z 29006KT 10SM CLR 04/M01 A3012 RMK AO TNO SLP147 "
|
||||
"T00391011 21006 51004",
|
||||
"KGTF 281156Z 27005KT 7SM BKN080 04/04 A3010 RMK AOA SLP205 "
|
||||
"T00440045 10117 20039 51006",
|
||||
|
||||
"K13A 1918Z 20011KT 26/M06 RMK AO PKWND 020/RNO 644V264 T02611061",
|
||||
|
||||
"KP88 1919Z 09001KT 14/03 RMK AO / PKWND 002/RNO 158 Z T01440034",
|
||||
|
||||
"K40B 1924Z 29004KT 15/M07 RMK AO PKWND 011/RM MV263 T01501072",
|
||||
|
||||
"KGGW 1756Z 33018KT 10SM OVC015 M03/M06 A3041 RMK AOA SLP338 "
|
||||
"4/007 60002 T10281055 11028 21072 51009",
|
||||
"KPHX 1756Z 130004KT 10SM CLR 18/M03 A3001 RMK AOA SLP154 "
|
||||
"T01781033 10178 20067 58007",
|
||||
"KFCA 1756Z 29005KT 10SM CLR 05/M11 A3049 RMK AOA TNO SLP352 "
|
||||
"T00501111 10050 21044 50004",
|
||||
"KAST 1756Z 01006KT 10SM CLR 11/04 A3047 RMK AOA SLP316 "
|
||||
"T01110045 10111 20000 50002",
|
||||
"KELY 1753Z 34010KT 10SM CLR 01/M07 A3022 RMK AOA TNO ZRNO "
|
||||
"SLP240 T00111066 10011 21078 58007",
|
||||
"KFLG 1756Z 07006KT 10SM CLR 06/M12 A3009 RMK AO TNO ZRNO "
|
||||
"SLP178 T00561122 10061 21100 58005",
|
||||
"KGTF 1756Z 35010KT 1/2SM -SN FG VV09 M06/M08 A3051 RMK AOA "
|
||||
"933004 SFC VSBY 3/4 "
|
||||
"PCPN M SLP393 60010 T10611077 11044 21067 53013",
|
||||
"KHLN 1756Z 35012KT 10SM SCT032 OVC060 M02/M09 A3048 RMK AOA "
|
||||
"SLP369 60000 T10171094 11017 21061 53006",
|
||||
"KAST 1756Z 01006KT 10SM CLR 11/04 A3047 RMK AOA SLP316 61104 "
|
||||
"71235 T01110045 10111 20000 401720056 58002",
|
||||
"METAR KLAX 04281156Z AUTO VRB100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT FC "
|
||||
"+TS BLPY FEW000 BKN050 SCT150 OVC250 3/M1 A2991 RMK "
|
||||
"TORNADO B13 DSNT NE A02 PK WND 18515/45 "
|
||||
"WSHFT 1350 FROPA TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"VIS 2 1/2 RY11 OCNL LTG VCY STN "
|
||||
"RAB1030E1145 FZDZE56 BLPYE57 CIG 1000V1500 CIG 020 RY11 "
|
||||
"PRESFR PRESRR SLP013 FG FEW000 VIS NW2 1/2 GR 3/4 "
|
||||
"VIRGA SE -XRAFG3 CIGE005 BKN014 V OVC "
|
||||
"FU BKN020 NOSPECI LAST 8/365 SNINCR 2/10 4/178 "
|
||||
"933125 98096 P 0125 60225 70565 "
|
||||
"T00261015 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 17012KT 130V210 3 1/2SM R15L/0500FT -RA "
|
||||
"SCT050 OVC110 26/18 A2991 RMK FUNNEL CLOUDS A02 RAB30 "
|
||||
"SLP 101 GR M1/4 VIRGA SCT V BKN P 0010 T02640178",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 05008KT 10SM R15L/P6000FT CLR A2991 "
|
||||
"RMK WATERSPOUTS VCY STN NW A02 SLP 101 10288 20243 52021 $ ",
|
||||
|
||||
"SPECI KGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"A2900 RMK A02A PK WND 18056/28 OCNL LTG AP "
|
||||
"RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 T01990182",
|
||||
|
||||
"KABE 281900Z NIL",
|
||||
|
||||
"METAR KPIT NIL",
|
||||
|
||||
"METAR KCLE 04281156Z 170100G135KT 110V180 M1/4SM "
|
||||
"R01L/P6000FT +TSSHRA VCFG "
|
||||
"BKN025 SCT100 OVC200 M26/ A2991 RMK PK WND 18515/45 A02 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"CIG 1000V1500 PRESFR FRQ LTG CG NW "
|
||||
"RAB1030E1145 FZDZE56 PRESRR SLP135 GS "
|
||||
"T1263 "
|
||||
"VIRGA NW 8/365 4/178 P 0125 60225 7//// 70565 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"METAR KPHL 040256Z AUTO 170100G135KT 130V210 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 LTG DSNT "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP037 GR 2 3/4 "
|
||||
"VIRGA E 8/365 4/178 P 0125 70565 21026 T0263 10369 60225 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"SPECI KGFI 041420Z AUTO 18030KT 2 1/2SM RVRNO TS -RA BKN008 "
|
||||
"OVC060 25/22 A2991 RMK A02 LTG DSNT W "
|
||||
"RAB15TSB20 PRESFR SLP101 P 0000 "
|
||||
"254/218",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR M1/4 "
|
||||
"VIRGA SE 8/365 4/178 P 0125 6//// 60225 70565 T0263 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 M26/ A2991 RMK A02 PK WND 185150/1345 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
|
||||
"VIRGA 35 8/365 4/178 P 0125 6//// 60225 70565 T0263 10369 21026 "
|
||||
"VIRGA 35 8/365 4/178 P 0125 21026 70565 10369 60225 T0263 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 3/M1 A2991 RMK A02 PK WND 18515/45 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
|
||||
"VIRGA 35 8/365 4/178 P 0125 60225 70565 T00261015 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO $",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 170100G135KT 130V210 3 1/2SM "
|
||||
"R15L/0500FT R22L/2700FT R16/1200FT R34/1000V1600FT R01L/P6000FT "
|
||||
"FC +TS BKN050 SCT150 OVC250 3/M1 A2991 RMK A02 PK WND 185150/1345 "
|
||||
"WSHFT 1350 TWR VIS 1 1/2 SFC VIS 1/4 VIS 1/4V1 1/4 "
|
||||
"RAB1030E1145 FZDZE56 CIG 1000V1500 PRESFR PRESRR SLP997 GR 25 "
|
||||
"VIRGA 35 8/365 4/178 P 0125 60225 70565 T00261015 10369 21026 "
|
||||
"404800360 52101 PWINO FZRANO TSNO",
|
||||
|
||||
"METAR KGFI 041356Z AUTO 05008KT 10SM R15L/P6000FT CLR A2991 RMK "
|
||||
"A02 SLP 101 10288 20243 52021",
|
||||
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 M199/M182",
|
||||
|
||||
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 M199/182",
|
||||
|
||||
"SPECI DGFI 041430Z 18045G56KT M1/4SM R15/0200FT FC +TS VV010 20/18 "
|
||||
"M20/M18 A2900 RMK A02A PK WND 18056/28 RAB15E25TSB20 FCB1430 PRESFR "
|
||||
"SLP 701 P 0254 199/M182",
|
||||
|
||||
"METAR APIT 171755Z AUTO 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 4/369 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 8/563 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 1/2V2 SLP875 SGB1213E1225",
|
||||
|
||||
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
|
||||
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK SLP056 "
|
||||
"RAE0123",
|
||||
|
||||
"SPECI APIT 171755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 8/321 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 SLP875 FGB1713",
|
||||
|
||||
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2 SLP875",
|
||||
|
||||
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 1/2V2 1/2 SLP875",
|
||||
|
||||
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2 1/2 SLP875",
|
||||
|
||||
"EGPF 1720Z 00000KT 9999 -SHRA STC014 SCT020CB BNK024 12/09 "
|
||||
"Q1003 NOSIG",
|
||||
|
||||
"NZAA 1700Z 03010KT 30KM 03 5CU022 7SC035 11/07 Q1006.5 NOSIG",
|
||||
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
|
||||
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK KAUKAU 30050KT",
|
||||
"DGAA 1800Z 22012KT 9999 SCT009 BKN120 25/21 Q1015",
|
||||
"DAAT 1830Z 30010KT CAVOK 29/06 Q1019",
|
||||
|
||||
"GQPP 1800Z 34023KT 3000 DRSA SKC 24/20 Q1011 NSG",
|
||||
"DAAG 1830Z 06006KT 9999 SCT020 25/22 Q1015",
|
||||
"DABB 1830Z 04010KT 9999 SCT030TCU SCT033CB 27/18 Q1017",
|
||||
"DABC 1830Z 00000KT 9999 SCT026TCU SCT036CB 22/18 Q1020 RETS",
|
||||
|
||||
"NZAA 1700Z 03010KT 30KM 03 5CU022 7SC035 11/07 Q1006.5 NOSIG",
|
||||
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
|
||||
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK K",
|
||||
"NZWN 1700Z 35030G49KT 320V030 20KM 02 5SC021 7SC046 12/08 "
|
||||
" Q0994.2 TEMPO 6000 RA 5ST012 2CB015 RMK KAUKAU 30050KT",
|
||||
"DGAA 1800Z 22012KT 9999 SCT009 BKN120 25/21 Q1015",
|
||||
|
||||
"GFLL 1900Z NIL",
|
||||
|
||||
"GOOY 1800Z 03006G17KT 340V080 6000 TSRA BKN016 BKN030CB "
|
||||
"BKN133 26/23 Q1013 NOSIG",
|
||||
|
||||
"GCXO 1930Z 32018KT 8000 SCT003 SCT007 18/16 Q1019",
|
||||
|
||||
"APIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 1/2V2",
|
||||
|
||||
"BPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2",
|
||||
|
||||
"CPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1V2 1/2",
|
||||
|
||||
"DPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 1 1/2V2 1/2",
|
||||
|
||||
"FPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 3/4V2 1/2",
|
||||
|
||||
"GPIT 1755Z 22015G25KT 1 3/4SM R22L/2700FT R16/1200FT "
|
||||
"R34/1000V1600FT R01L/P6000FT R04RR/900FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/16 A2992 "
|
||||
"RMK 58033 6003/ TWELVE 70125 10039 20029 410840112 "
|
||||
"PCPN 0009 WSHFT 1715 PK WND 2032/1725 "
|
||||
"CIG 20V25 WND 12V25 TWR VIS 2 1/2 "
|
||||
"SFC VIS 1 1/2 VIS 3/4V3",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/M16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/M16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/M16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB MM/16 A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB M18/MM A2992",
|
||||
|
||||
"KPIT 1935Z 22015G25KT 1 3/4SM R22L/2700FT "
|
||||
"TSRA -DZ FG +SNPE SCT005 BKN010 OVC250CB 18/MM A2992",
|
||||
|
||||
NULL};
|
||||
|
||||
|
||||
void dispMetarStation( CMetarStation *s )
|
||||
{
|
||||
glPointSize( 2.0 );
|
||||
glColor3d(1.0,1.0,0.0);
|
||||
glVertex3d( s->locationCart().x()/1000.0, s->locationCart().y()/1000.0, s->locationCart().z()/1000.0 );
|
||||
}
|
||||
|
||||
static int ii = 0;
|
||||
|
||||
void
|
||||
display(void)
|
||||
{
|
||||
glPushMatrix();
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
glRotatef((ii%360), 1.0, 0.0, 0.0);
|
||||
glRotatef((ii%360), 0.0, 1.0, 0.0);
|
||||
glRotatef((ii%360), 0.0, 0.0, 1.0);
|
||||
glBegin( GL_POINTS );
|
||||
CMetarStation::for_each( dispMetarStation );
|
||||
glEnd();
|
||||
glColor3d(0.0, 0.0, 1.0);
|
||||
glutWireSphere(SG_EARTH_RAD,32,16);
|
||||
glutSwapBuffers();
|
||||
ii++;
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
idle(void)
|
||||
{
|
||||
// std::cout << "Idle" << std::endl;
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
init(void)
|
||||
{
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
gluPerspective( 50.0, 1.0, 1.0, 40000.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
gluLookAt(0.0, -19000.0, 0.0,
|
||||
0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
|
||||
void testMetarStation(int argc,
|
||||
char **argv )
|
||||
{
|
||||
std::cout << "Display all Metar Stations" << std::endl;
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
|
||||
glutCreateWindow("Metar Stations");
|
||||
glutDisplayFunc(display);
|
||||
glutIdleFunc(idle);
|
||||
init();
|
||||
glutMainLoop();
|
||||
}
|
||||
|
||||
void testMetarReport()
|
||||
{
|
||||
std::cout << "Decode some Metar reports" << std::endl;
|
||||
int i = 0;
|
||||
while ( report[i] )
|
||||
{
|
||||
std::cout << i << ": " << report[i] << std::endl;
|
||||
|
||||
CMetarReport dr( report[i] );
|
||||
|
||||
//dr.dump();
|
||||
std::cout << dr << std::endl;
|
||||
|
||||
CMetarStation *ms = CMetarStation::find( dr.StationID() );
|
||||
if ( ms )
|
||||
{
|
||||
std::cout << *ms << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "No corresponding METAR station found" << std::endl;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(
|
||||
int argc,
|
||||
char **argv )
|
||||
{
|
||||
std::cout << "Metar subsystem test" << std::endl;
|
||||
|
||||
testMetarReport();
|
||||
testMetarStation( argc, argv );
|
||||
return 0;
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="MetarLibTest" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=MetarLibTest - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "MetarLibTest.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "MetarLibTest.mak" CFG="MetarLibTest - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "MetarLibTest - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "MetarLibTest - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "MetarLibTest - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /Zi /O2 /I "..\..\..\lib" /I "..\lib" /I "..\..\lib" /I "..\..\..\..\lib" /I ".." /I "..\.." /I "..\..\.." /I "..\..\..\.." /I "..\include" /I "..\..\include" /I "..\..\..\include" /I "..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "MetarLibTest - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /GX /Zi /Od /I "..\..\..\lib" /I "..\lib" /I "..\..\lib" /I "..\..\..\..\lib" /I ".." /I "..\.." /I "..\..\.." /I "..\..\..\.." /I "..\include" /I "..\..\include" /I "..\..\..\include" /I "..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "MetarLibTest - Win32 Release"
|
||||
# Name "MetarLibTest - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MetarLibTest.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,95 +0,0 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "LibMisc"=..\..\..\..\Win32\Workspace\LibMisc\LibMisc.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Metar"=..\Metar.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "MetarLibTest"=.\MetarLibTest.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Metar
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name MetarLib
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name glut
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name LibMisc
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "MetarTest"=.\MetarTest.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name Metar
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name MetarLib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "glut"=..\..\..\..\..\glut\glut.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -1,587 +0,0 @@
|
||||
#include "Local.h" /* standard header file */
|
||||
#include "Metar.h"
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Title: prtDMETR */
|
||||
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
|
||||
/* Date: 15 Sep 1994 */
|
||||
/* Programmer: CARL MCCALLA */
|
||||
/* Language: C/370 */
|
||||
/* */
|
||||
/* Abstract: prtDMETR prints, in order of the ASOS METAR */
|
||||
/* format, all non-initialized members of the structure */
|
||||
/* addressed by the Decoded_METAR pointer. */
|
||||
/* */
|
||||
/* External Functions Called: */
|
||||
/* None. */
|
||||
/* */
|
||||
/* Input: Mptr - ptr to a decoded_METAR structure. */
|
||||
/* */
|
||||
/* Output: NONE */
|
||||
/* */
|
||||
/* Modification History: */
|
||||
/* None. */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
void prtDMETR( Decoded_METAR *Mptr )
|
||||
{
|
||||
|
||||
/***************************/
|
||||
/* DECLARE LOCAL VARIABLES */
|
||||
/***************************/
|
||||
|
||||
int i;
|
||||
|
||||
/*************************/
|
||||
/* START BODY OF ROUTINE */
|
||||
/*************************/
|
||||
|
||||
printf("\n\n\n/*******************************************/\n");
|
||||
printf("/* THE DECODED METAR REPORT FOLLOWS */\n");
|
||||
printf("/*******************************************/\n\n");
|
||||
|
||||
if( Mptr->codeName[ 0 ] != '\0' )
|
||||
printf("REPORT CODE NAME : %s\n",Mptr->codeName);
|
||||
|
||||
if( Mptr->stnid[ 0 ] != '\0' )
|
||||
printf("STATION ID : %s\n",Mptr->stnid);
|
||||
|
||||
if( Mptr->ob_date != MAXINT )
|
||||
printf("OBSERVATION DAY : %d\n",Mptr->ob_date);
|
||||
|
||||
if( Mptr->ob_hour != MAXINT )
|
||||
printf("OBSERVATION HOUR : %d\n",Mptr->ob_hour);
|
||||
|
||||
if( Mptr->ob_minute != MAXINT )
|
||||
printf("OBSERVATION MINUTE : %d\n",Mptr->ob_minute);
|
||||
|
||||
if( Mptr->NIL_rpt )
|
||||
printf("NIL REPORT : TRUE\n");
|
||||
|
||||
if( Mptr->AUTO )
|
||||
printf("AUTO REPORT : TRUE\n");
|
||||
|
||||
if( Mptr->COR )
|
||||
printf("CORRECTED REPORT : TRUE\n");
|
||||
|
||||
if( Mptr->winData.windVRB )
|
||||
printf("WIND DIRECTION VRB : TRUE\n");
|
||||
|
||||
if( Mptr->winData.windDir != MAXINT )
|
||||
printf("WIND DIRECTION : %d\n",Mptr->winData.windDir);
|
||||
|
||||
if( Mptr->winData.windSpeed != MAXINT )
|
||||
printf("WIND SPEED : %d\n",Mptr->winData.windSpeed);
|
||||
|
||||
if( Mptr->winData.windGust != MAXINT )
|
||||
printf("WIND GUST : %d\n",Mptr->winData.windGust);
|
||||
|
||||
if( Mptr->winData.windUnits[ 0 ] != '\0' )
|
||||
printf("WIND UNITS : %s\n",Mptr->winData.windUnits);
|
||||
|
||||
if( Mptr->minWnDir != MAXINT )
|
||||
printf("MIN WIND DIRECTION : %d\n",Mptr->minWnDir);
|
||||
|
||||
if( Mptr->maxWnDir != MAXINT )
|
||||
printf("MAX WIND DIRECTION : %d\n",Mptr->maxWnDir);
|
||||
|
||||
if( Mptr->prevail_vsbyM != (float) MAXINT )
|
||||
printf("PREVAIL VSBY (M) : %f\n",Mptr->prevail_vsbyM);
|
||||
|
||||
if( Mptr->prevail_vsbyKM != (float) MAXINT )
|
||||
printf("PREVAIL VSBY (KM) : %f\n",Mptr->prevail_vsbyKM);
|
||||
|
||||
if( Mptr->prevail_vsbySM != (float) MAXINT )
|
||||
printf("PREVAIL VSBY (SM) : %.3f\n",Mptr->prevail_vsbySM);
|
||||
|
||||
if( Mptr->charPrevailVsby[0] != '\0' )
|
||||
printf("PREVAIL VSBY (CHAR) : %s\n",Mptr->charPrevailVsby);
|
||||
|
||||
if( Mptr->vsby_Dir[ 0 ] != '\0' )
|
||||
printf("VISIBILITY DIRECTION: %s\n",Mptr->vsby_Dir);
|
||||
|
||||
if( Mptr->RVRNO )
|
||||
printf("RVRNO : TRUE\n");
|
||||
|
||||
for ( i = 0; i < 12; i++ )
|
||||
{
|
||||
if( Mptr->RRVR[i].runway_designator[0] != '\0' )
|
||||
printf("RUNWAY DESIGNATOR : %s\n",
|
||||
Mptr->RRVR[i].runway_designator);
|
||||
|
||||
if( Mptr->RRVR[i].visRange != MAXINT )
|
||||
printf("R_WAY VIS RANGE (FT): %d\n",
|
||||
Mptr->RRVR[i].visRange);
|
||||
|
||||
if( Mptr->RRVR[i].vrbl_visRange )
|
||||
printf("VRBL VISUAL RANGE : TRUE\n");
|
||||
|
||||
if( Mptr->RRVR[i].below_min_RVR )
|
||||
printf("BELOW MIN RVR : TRUE\n");
|
||||
|
||||
if( Mptr->RRVR[i].above_max_RVR )
|
||||
printf("ABOVE MAX RVR : TRUE\n");
|
||||
|
||||
if( Mptr->RRVR[i].Max_visRange != MAXINT )
|
||||
printf("MX R_WAY VISRNG (FT): %d\n",
|
||||
Mptr->RRVR[i].Max_visRange);
|
||||
|
||||
if( Mptr->RRVR[i].Min_visRange != MAXINT )
|
||||
printf("MN R_WAY VISRNG (FT): %d\n",
|
||||
Mptr->RRVR[i].Min_visRange);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if( Mptr->DVR.visRange != MAXINT )
|
||||
printf("DISPATCH VIS RANGE : %d\n",
|
||||
Mptr->DVR.visRange);
|
||||
|
||||
if( Mptr->DVR.vrbl_visRange )
|
||||
printf("VRBL DISPATCH VISRNG: TRUE\n");
|
||||
|
||||
if( Mptr->DVR.below_min_DVR )
|
||||
printf("BELOW MIN DVR : TRUE\n");
|
||||
|
||||
if( Mptr->DVR.above_max_DVR )
|
||||
printf("ABOVE MAX DVR : TRUE\n");
|
||||
|
||||
if( Mptr->DVR.Max_visRange != MAXINT )
|
||||
printf("MX DSPAT VISRNG (FT): %d\n",
|
||||
Mptr->DVR.Max_visRange);
|
||||
|
||||
if( Mptr->DVR.Min_visRange != MAXINT )
|
||||
printf("MN DSPAT VISRNG (FT): %d\n",
|
||||
Mptr->DVR.Min_visRange);
|
||||
|
||||
|
||||
i = 0;
|
||||
while ( Mptr->WxObstruct[i][0] != '\0' && i < MAXWXSYMBOLS )
|
||||
{
|
||||
printf("WX/OBSTRUCT VISION : %s\n",
|
||||
Mptr->WxObstruct[i] );
|
||||
i++;
|
||||
}
|
||||
|
||||
if( Mptr->PartialObscurationAmt[0][0] != '\0' )
|
||||
printf("OBSCURATION AMOUNT : %s\n",
|
||||
&(Mptr->PartialObscurationAmt[0][0]));
|
||||
|
||||
if( Mptr->PartialObscurationPhenom[0][0] != '\0' )
|
||||
printf("OBSCURATION PHENOM : %s\n",
|
||||
&(Mptr->PartialObscurationPhenom[0][0]));
|
||||
|
||||
|
||||
if( Mptr->PartialObscurationAmt[1][0] != '\0' )
|
||||
printf("OBSCURATION AMOUNT : %s\n",
|
||||
&(Mptr->PartialObscurationAmt[1][0]));
|
||||
|
||||
if( Mptr->PartialObscurationPhenom[1][0] != '\0' )
|
||||
printf("OBSCURATION PHENOM : %s\n",
|
||||
&(Mptr->PartialObscurationPhenom[1][0]));
|
||||
|
||||
i = 0;
|
||||
while ( Mptr->cldTypHgt[ i ].cloud_type[0] != '\0' &&
|
||||
i < 6 )
|
||||
{
|
||||
if( Mptr->cldTypHgt[ i ].cloud_type[0] != '\0' )
|
||||
printf("CLOUD COVER : %s\n",
|
||||
Mptr->cldTypHgt[ i ].cloud_type);
|
||||
|
||||
if( Mptr->cldTypHgt[ i ].cloud_hgt_char[0] != '\0' )
|
||||
printf("CLOUD HGT (CHARAC.) : %s\n",
|
||||
Mptr->cldTypHgt[ i ].cloud_hgt_char);
|
||||
|
||||
if( Mptr->cldTypHgt[ i ].cloud_hgt_meters != MAXINT)
|
||||
printf("CLOUD HGT (METERS) : %d\n",
|
||||
Mptr->cldTypHgt[ i ].cloud_hgt_meters);
|
||||
|
||||
if( Mptr->cldTypHgt[ i ].other_cld_phenom[0] != '\0' )
|
||||
printf("OTHER CLOUD PHENOM : %s\n",
|
||||
Mptr->cldTypHgt[ i ].other_cld_phenom);
|
||||
|
||||
i++;
|
||||
|
||||
}
|
||||
|
||||
if( Mptr->temp != MAXINT )
|
||||
printf("TEMP. (CELSIUS) : %d\n", Mptr->temp);
|
||||
|
||||
if( Mptr->dew_pt_temp != MAXINT )
|
||||
printf("D.P. TEMP. (CELSIUS): %d\n", Mptr->dew_pt_temp);
|
||||
|
||||
if( Mptr->A_altstng )
|
||||
printf("ALTIMETER (INCHES) : %.2f\n",
|
||||
Mptr->inches_altstng );
|
||||
|
||||
if( Mptr->Q_altstng )
|
||||
printf("ALTIMETER (PASCALS) : %d\n",
|
||||
Mptr->hectoPasc_altstng );
|
||||
|
||||
if( Mptr->TornadicType[0] != '\0' )
|
||||
printf("TORNADIC ACTVTY TYPE: %s\n",
|
||||
Mptr->TornadicType );
|
||||
|
||||
if( Mptr->BTornadicHour != MAXINT )
|
||||
printf("TORN. ACTVTY BEGHOUR: %d\n",
|
||||
Mptr->BTornadicHour );
|
||||
|
||||
if( Mptr->BTornadicMinute != MAXINT )
|
||||
printf("TORN. ACTVTY BEGMIN : %d\n",
|
||||
Mptr->BTornadicMinute );
|
||||
|
||||
if( Mptr->ETornadicHour != MAXINT )
|
||||
printf("TORN. ACTVTY ENDHOUR: %d\n",
|
||||
Mptr->ETornadicHour );
|
||||
|
||||
if( Mptr->ETornadicMinute != MAXINT )
|
||||
printf("TORN. ACTVTY ENDMIN : %d\n",
|
||||
Mptr->ETornadicMinute );
|
||||
|
||||
if( Mptr->TornadicDistance != MAXINT )
|
||||
printf("TORN. DIST. FROM STN: %d\n",
|
||||
Mptr->TornadicDistance );
|
||||
|
||||
if( Mptr->TornadicLOC[0] != '\0' )
|
||||
printf("TORNADIC LOCATION : %s\n",
|
||||
Mptr->TornadicLOC );
|
||||
|
||||
if( Mptr->TornadicDIR[0] != '\0' )
|
||||
printf("TORNAD. DIR FROM STN: %s\n",
|
||||
Mptr->TornadicDIR );
|
||||
|
||||
if( Mptr->TornadicMovDir[0] != '\0' )
|
||||
printf("TORNADO DIR OF MOVM.: %s\n",
|
||||
Mptr->TornadicMovDir );
|
||||
|
||||
|
||||
if( Mptr->autoIndicator[0] != '\0' )
|
||||
printf("AUTO INDICATOR : %s\n",
|
||||
Mptr->autoIndicator);
|
||||
|
||||
if( Mptr->PKWND_dir != MAXINT )
|
||||
printf("PEAK WIND DIRECTION : %d\n",Mptr->PKWND_dir);
|
||||
if( Mptr->PKWND_speed != MAXINT )
|
||||
printf("PEAK WIND SPEED : %d\n",Mptr->PKWND_speed);
|
||||
if( Mptr->PKWND_hour != MAXINT )
|
||||
printf("PEAK WIND HOUR : %d\n",Mptr->PKWND_hour);
|
||||
if( Mptr->PKWND_minute != MAXINT )
|
||||
printf("PEAK WIND MINUTE : %d\n",Mptr->PKWND_minute);
|
||||
|
||||
if( Mptr->WshfTime_hour != MAXINT )
|
||||
printf("HOUR OF WIND SHIFT : %d\n",Mptr->WshfTime_hour);
|
||||
if( Mptr->WshfTime_minute != MAXINT )
|
||||
printf("MINUTE OF WIND SHIFT: %d\n",Mptr->WshfTime_minute);
|
||||
if( Mptr->Wshft_FROPA != FALSE )
|
||||
printf("FROPA ASSOC. W/WSHFT: TRUE\n");
|
||||
|
||||
if( Mptr->TWR_VSBY != (float) MAXINT )
|
||||
printf("TOWER VISIBILITY : %.2f\n",Mptr->TWR_VSBY);
|
||||
if( Mptr->SFC_VSBY != (float) MAXINT )
|
||||
printf("SURFACE VISIBILITY : %.2f\n",Mptr->SFC_VSBY);
|
||||
|
||||
if( Mptr->minVsby != (float) MAXINT )
|
||||
printf("MIN VRBL_VIS (SM) : %.4f\n",Mptr->minVsby);
|
||||
if( Mptr->maxVsby != (float) MAXINT )
|
||||
printf("MAX VRBL_VIS (SM) : %.4f\n",Mptr->maxVsby);
|
||||
|
||||
if( Mptr->VSBY_2ndSite != (float) MAXINT )
|
||||
printf("VSBY_2ndSite (SM) : %.4f\n",Mptr->VSBY_2ndSite);
|
||||
if( Mptr->VSBY_2ndSite_LOC[0] != '\0' )
|
||||
printf("VSBY_2ndSite LOC. : %s\n",
|
||||
Mptr->VSBY_2ndSite_LOC);
|
||||
|
||||
|
||||
if( Mptr->OCNL_LTG )
|
||||
printf("OCCASSIONAL LTG : TRUE\n");
|
||||
|
||||
if( Mptr->FRQ_LTG )
|
||||
printf("FREQUENT LIGHTNING : TRUE\n");
|
||||
|
||||
if( Mptr->CNS_LTG )
|
||||
printf("CONTINUOUS LTG : TRUE\n");
|
||||
|
||||
if( Mptr->CG_LTG )
|
||||
printf("CLOUD-GROUND LTG : TRUE\n");
|
||||
|
||||
if( Mptr->IC_LTG )
|
||||
printf("IN-CLOUD LIGHTNING : TRUE\n");
|
||||
|
||||
if( Mptr->CC_LTG )
|
||||
printf("CLD-CLD LIGHTNING : TRUE\n");
|
||||
|
||||
if( Mptr->CA_LTG )
|
||||
printf("CLOUD-AIR LIGHTNING : TRUE\n");
|
||||
|
||||
if( Mptr->AP_LTG )
|
||||
printf("LIGHTNING AT AIRPORT: TRUE\n");
|
||||
|
||||
if( Mptr->OVHD_LTG )
|
||||
printf("LIGHTNING OVERHEAD : TRUE\n");
|
||||
|
||||
if( Mptr->DSNT_LTG )
|
||||
printf("DISTANT LIGHTNING : TRUE\n");
|
||||
|
||||
if( Mptr->LightningVCTS )
|
||||
printf("L'NING W/I 5-10(ALP): TRUE\n");
|
||||
|
||||
if( Mptr->LightningTS )
|
||||
printf("L'NING W/I 5 (ALP) : TRUE\n");
|
||||
|
||||
if( Mptr->VcyStn_LTG )
|
||||
printf("VCY STN LIGHTNING : TRUE\n");
|
||||
|
||||
if( Mptr->LTG_DIR[0] != '\0' )
|
||||
printf("DIREC. OF LIGHTNING : %s\n", Mptr->LTG_DIR);
|
||||
|
||||
|
||||
|
||||
i = 0;
|
||||
while( i < 3 && Mptr->ReWx[ i ].Recent_weather[0] != '\0' )
|
||||
{
|
||||
printf("RECENT WEATHER : %s",
|
||||
Mptr->ReWx[i].Recent_weather);
|
||||
|
||||
if( Mptr->ReWx[i].Bhh != MAXINT )
|
||||
printf(" BEG_hh = %d",Mptr->ReWx[i].Bhh);
|
||||
if( Mptr->ReWx[i].Bmm != MAXINT )
|
||||
printf(" BEG_mm = %d",Mptr->ReWx[i].Bmm);
|
||||
|
||||
if( Mptr->ReWx[i].Ehh != MAXINT )
|
||||
printf(" END_hh = %d",Mptr->ReWx[i].Ehh);
|
||||
if( Mptr->ReWx[i].Emm != MAXINT )
|
||||
printf(" END_mm = %d",Mptr->ReWx[i].Emm);
|
||||
|
||||
printf("\n");
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
if( Mptr->minCeiling != MAXINT )
|
||||
printf("MIN VRBL_CIG (FT) : %d\n",Mptr->minCeiling);
|
||||
if( Mptr->maxCeiling != MAXINT )
|
||||
printf("MAX VRBL_CIG (FT)) : %d\n",Mptr->maxCeiling);
|
||||
|
||||
if( Mptr->CIG_2ndSite_Meters != MAXINT )
|
||||
printf("CIG2ndSite (FT) : %d\n",Mptr->CIG_2ndSite_Meters);
|
||||
if( Mptr->CIG_2ndSite_LOC[0] != '\0' )
|
||||
printf("CIG @ 2nd Site LOC. : %s\n",Mptr->CIG_2ndSite_LOC);
|
||||
|
||||
if( Mptr->PRESFR )
|
||||
printf("PRESFR : TRUE\n");
|
||||
if( Mptr->PRESRR )
|
||||
printf("PRESRR : TRUE\n");
|
||||
|
||||
if( Mptr->SLPNO )
|
||||
printf("SLPNO : TRUE\n");
|
||||
|
||||
if( Mptr->SLP != (float) MAXINT )
|
||||
printf("SLP (hPa) : %.1f\n", Mptr->SLP);
|
||||
|
||||
if( Mptr->SectorVsby != (float) MAXINT )
|
||||
printf("SECTOR VSBY (MILES) : %.2f\n", Mptr->SectorVsby );
|
||||
|
||||
if( Mptr->SectorVsby_Dir[ 0 ] != '\0' )
|
||||
printf("SECTOR VSBY OCTANT : %s\n", Mptr->SectorVsby_Dir );
|
||||
|
||||
if( Mptr->TS_LOC[ 0 ] != '\0' )
|
||||
printf("THUNDERSTORM LOCAT. : %s\n", Mptr->TS_LOC );
|
||||
|
||||
if( Mptr->TS_MOVMNT[ 0 ] != '\0' )
|
||||
printf("THUNDERSTORM MOVMNT.: %s\n", Mptr->TS_MOVMNT);
|
||||
|
||||
if( Mptr->GR )
|
||||
printf("GR (HAILSTONES) : TRUE\n");
|
||||
|
||||
if( Mptr->GR_Size != (float) MAXINT )
|
||||
printf("HLSTO SIZE (INCHES) : %.3f\n",Mptr->GR_Size);
|
||||
|
||||
if( Mptr->VIRGA )
|
||||
printf("VIRGA : TRUE\n");
|
||||
|
||||
if( Mptr->VIRGA_DIR[0] != '\0' )
|
||||
printf("DIR OF VIRGA FRM STN: %s\n", Mptr->VIRGA_DIR);
|
||||
|
||||
for( i = 0; i < 6; i++ ) {
|
||||
if( Mptr->SfcObscuration[i][0] != '\0' )
|
||||
printf("SfcObscuration : %s\n",
|
||||
&(Mptr->SfcObscuration[i][0]) );
|
||||
}
|
||||
|
||||
if( Mptr->Num8thsSkyObscured != MAXINT )
|
||||
printf("8ths of SkyObscured : %d\n",Mptr->Num8thsSkyObscured);
|
||||
|
||||
if( Mptr->CIGNO )
|
||||
printf("CIGNO : TRUE\n");
|
||||
|
||||
if( Mptr->Ceiling != MAXINT )
|
||||
printf("Ceiling (ft) : %d\n",Mptr->Ceiling);
|
||||
|
||||
if( Mptr->Estimated_Ceiling != MAXINT )
|
||||
printf("Estimated CIG (ft) : %d\n",Mptr->Estimated_Ceiling);
|
||||
|
||||
if( Mptr->VrbSkyBelow[0] != '\0' )
|
||||
printf("VRB SKY COND BELOW : %s\n",Mptr->VrbSkyBelow);
|
||||
|
||||
if( Mptr->VrbSkyAbove[0] != '\0' )
|
||||
printf("VRB SKY COND ABOVE : %s\n",Mptr->VrbSkyAbove);
|
||||
|
||||
if( Mptr->VrbSkyLayerHgt != MAXINT )
|
||||
printf("VRBSKY COND HGT (FT): %d\n",Mptr->VrbSkyLayerHgt);
|
||||
|
||||
if( Mptr->ObscurAloftHgt != MAXINT )
|
||||
printf("Hgt Obscur Aloft(ft): %d\n",Mptr->ObscurAloftHgt);
|
||||
|
||||
if( Mptr->ObscurAloft[0] != '\0' )
|
||||
printf("Obscur Phenom Aloft : %s\n",Mptr->ObscurAloft);
|
||||
|
||||
if( Mptr->ObscurAloftSkyCond[0] != '\0' )
|
||||
printf("Obscur ALOFT SKYCOND: %s\n",Mptr->ObscurAloftSkyCond);
|
||||
|
||||
|
||||
if( Mptr->NOSPECI )
|
||||
printf("NOSPECI : TRUE\n");
|
||||
|
||||
if( Mptr->LAST )
|
||||
printf("LAST : TRUE\n");
|
||||
|
||||
if( Mptr->synoptic_cloud_type[ 0 ] != '\0' )
|
||||
printf("SYNOPTIC CLOUD GROUP: %s\n",Mptr->synoptic_cloud_type);
|
||||
|
||||
if( Mptr->CloudLow != '\0' )
|
||||
printf("LOW CLOUD CODE : %c\n",Mptr->CloudLow);
|
||||
|
||||
if( Mptr->CloudMedium != '\0' )
|
||||
printf("MEDIUM CLOUD CODE : %c\n",Mptr->CloudMedium);
|
||||
|
||||
if( Mptr->CloudHigh != '\0' )
|
||||
printf("HIGH CLOUD CODE : %c\n",Mptr->CloudHigh);
|
||||
|
||||
if( Mptr->SNINCR != MAXINT )
|
||||
printf("SNINCR (INCHES) : %d\n",Mptr->SNINCR);
|
||||
|
||||
if( Mptr->SNINCR_TotalDepth != MAXINT )
|
||||
printf("SNINCR(TOT. INCHES) : %d\n",Mptr->SNINCR_TotalDepth);
|
||||
|
||||
if( Mptr->snow_depth_group[ 0 ] != '\0' )
|
||||
printf("SNOW DEPTH GROUP : %s\n",Mptr->snow_depth_group);
|
||||
|
||||
if( Mptr->snow_depth != MAXINT )
|
||||
printf("SNOW DEPTH (INCHES) : %d\n",Mptr->snow_depth);
|
||||
|
||||
if( Mptr->WaterEquivSnow != (float) MAXINT )
|
||||
printf("H2O EquivSno(inches): %.2f\n",Mptr->WaterEquivSnow);
|
||||
|
||||
if( Mptr->SunshineDur != MAXINT )
|
||||
printf("SUNSHINE (MINUTES) : %d\n",Mptr->SunshineDur);
|
||||
|
||||
if( Mptr->SunSensorOut )
|
||||
printf("SUN SENSOR OUT : TRUE\n");
|
||||
|
||||
if( Mptr->hourlyPrecip != (float) MAXINT )
|
||||
printf("HRLY PRECIP (INCHES): %.2f\n",Mptr->hourlyPrecip);
|
||||
|
||||
if( Mptr->precip_amt != (float) MAXINT)
|
||||
printf("3/6HR PRCIP (INCHES): %.2f\n",
|
||||
Mptr->precip_amt);
|
||||
|
||||
if( Mptr->Indeterminant3_6HrPrecip )
|
||||
printf("INDTRMN 3/6HR PRECIP: TRUE\n");
|
||||
|
||||
if( Mptr->precip_24_amt != (float) MAXINT)
|
||||
printf("24HR PRECIP (INCHES): %.2f\n",
|
||||
Mptr->precip_24_amt);
|
||||
|
||||
if( Mptr->Temp_2_tenths != (float) MAXINT )
|
||||
printf("TMP2TENTHS (CELSIUS): %.1f\n",Mptr->Temp_2_tenths);
|
||||
|
||||
if( Mptr->DP_Temp_2_tenths != (float) MAXINT )
|
||||
printf("DPT2TENTHS (CELSIUS): %.1f\n",Mptr->DP_Temp_2_tenths);
|
||||
|
||||
if( Mptr->maxtemp != (float) MAXINT)
|
||||
printf("MAX TEMP (CELSIUS) : %.1f\n",
|
||||
Mptr->maxtemp);
|
||||
|
||||
if( Mptr->mintemp != (float) MAXINT)
|
||||
printf("MIN TEMP (CELSIUS) : %.1f\n",
|
||||
Mptr->mintemp);
|
||||
|
||||
if( Mptr->max24temp != (float) MAXINT)
|
||||
printf("24HrMAXTMP (CELSIUS): %.1f\n",
|
||||
Mptr->max24temp);
|
||||
|
||||
if( Mptr->min24temp != (float) MAXINT)
|
||||
printf("24HrMINTMP (CELSIUS): %.1f\n",
|
||||
Mptr->min24temp);
|
||||
|
||||
if( Mptr->char_prestndcy != MAXINT)
|
||||
printf("CHAR PRESS TENDENCY : %d\n",
|
||||
Mptr->char_prestndcy );
|
||||
|
||||
if( Mptr->prestndcy != (float) MAXINT)
|
||||
printf("PRES. TENDENCY (hPa): %.1f\n",
|
||||
Mptr->prestndcy );
|
||||
|
||||
if( Mptr->PWINO )
|
||||
printf("PWINO : TRUE\n");
|
||||
|
||||
if( Mptr->PNO )
|
||||
printf("PNO : TRUE\n");
|
||||
|
||||
if( Mptr->CHINO )
|
||||
printf("CHINO : TRUE\n");
|
||||
|
||||
if( Mptr->CHINO_LOC[0] != '\0' )
|
||||
printf("CHINO_LOC : %s\n",Mptr->CHINO_LOC);
|
||||
|
||||
if( Mptr->VISNO )
|
||||
printf("VISNO : TRUE\n");
|
||||
|
||||
if( Mptr->VISNO_LOC[0] != '\0' )
|
||||
printf("VISNO_LOC : %s\n",Mptr->VISNO_LOC);
|
||||
|
||||
if( Mptr->FZRANO )
|
||||
printf("FZRANO : TRUE\n");
|
||||
|
||||
if( Mptr->TSNO )
|
||||
printf("TSNO : TRUE\n");
|
||||
|
||||
if( Mptr->DollarSign)
|
||||
printf("DOLLAR $IGN INDCATR : TRUE\n");
|
||||
|
||||
if( Mptr->horiz_vsby[ 0 ] != '\0' )
|
||||
printf("HORIZ VISIBILITY : %s\n",Mptr->horiz_vsby);
|
||||
|
||||
if( Mptr->dir_min_horiz_vsby[ 0 ] != '\0' )
|
||||
printf("DIR MIN HORIZ VSBY : %s\n",Mptr->dir_min_horiz_vsby);
|
||||
|
||||
if( Mptr->CAVOK )
|
||||
printf("CAVOK : TRUE\n");
|
||||
|
||||
|
||||
if( Mptr->VertVsby != MAXINT )
|
||||
printf("Vert. Vsby (meters) : %d\n",
|
||||
Mptr->VertVsby );
|
||||
|
||||
if( Mptr->charVertVsby[0] != '\0' )
|
||||
printf("Vert. Vsby (CHAR) : %s\n",
|
||||
Mptr->charVertVsby );
|
||||
|
||||
if( Mptr->QFE != MAXINT )
|
||||
printf("QFE : %d\n", Mptr->QFE);
|
||||
|
||||
if( Mptr->VOLCASH )
|
||||
printf("VOLCANIC ASH : TRUE\n");
|
||||
|
||||
if( Mptr->min_vrbl_wind_dir != MAXINT )
|
||||
printf("MIN VRBL WIND DIR : %d\n",Mptr->min_vrbl_wind_dir);
|
||||
if( Mptr->max_vrbl_wind_dir != MAXINT )
|
||||
printf("MAX VRBL WIND DIR : %d\n",Mptr->max_vrbl_wind_dir);
|
||||
|
||||
|
||||
printf("\n\n\n");
|
||||
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
There are 2 classes: CMetarStation (MetarStation.h) and CMetarReport
|
||||
(MetarReport.h). These classes provide mechanisms to get information
|
||||
about meteorological data reporting stations and about the reports
|
||||
themselves. These stations and reports are known as METAR. See
|
||||
http://tgsv5.nws.noaa.gov/oso/oso1/oso12/metar.htm for information
|
||||
from the USA perspective. Quoting from that site:
|
||||
|
||||
On 1 July 1996, the international standard code for hourly and special
|
||||
surface weather observations, METAR/SPECI, took effect.
|
||||
The METAR acronym roughly translates from the French as Aviation
|
||||
Routine Weather Report . A special report, SPECI, is merely a METAR
|
||||
formatted report which is issued on a non-routine basis as dictated by
|
||||
changing meteorological conditions. The SPECI acronym roughly translates as
|
||||
|
||||
Aviation Selected Special Weather Report . Meanwhile, the international
|
||||
standard code format for terminal forecasts issued for airports, TAF,
|
||||
also took effect. The acronym translates to Aerodrome Forecast.
|
||||
|
||||
This implementation ignores the SPECI and TAF acronyms, calling the
|
||||
entire system METAR.
|
||||
|
||||
The class CMetarStation is implemented by MetarStation.h and
|
||||
MetarStation.cpp. It decodes a text file containing information about
|
||||
individual METAR reporting stations and builds a static database of that
|
||||
information during static construction of the class. There are static
|
||||
member methods to find individual stations, and member functions to
|
||||
extract individual station attributes. The information about METAR
|
||||
stations probably has some overlap with FGFS airport information. That
|
||||
needs to be investigated. The METAR station information is kept in this
|
||||
file:
|
||||
http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.gz
|
||||
http://www.nws.noaa.gov/pub/stninfo/nsd_cccc.txt
|
||||
This class looks for the file FG_ROOT/Weather/MetarStations instead of
|
||||
nsd_cccc.
|
||||
The current implementation does not look for updates to this file on the
|
||||
internet.
|
||||
|
||||
The class CMetarReport is implemented by MetarReport.h and MetarReport.cpp.
|
||||
It encapsulates the decoding software written by Carl McCalla at -
|
||||
NOAA/National Weather Service
|
||||
1325 East-West Highway
|
||||
SSMC2, W/OSO242, Station 5114
|
||||
Silver Spring, Maryland 20910
|
||||
Work: (301) 713-0882, Ext 115
|
||||
FAX: (301) 608-0911
|
||||
E-Mail Address: cmccalla@smtpgate.ssmc.noaa.gov
|
||||
http://www.nws.noaa.gov/software/
|
||||
This software generally sucks and the CMetarReport class attempts to clean
|
||||
up some of that suckiness. A CMetarReport object is created with an ASCII
|
||||
string as a construction parameter. The string contains a METAR report.
|
||||
There
|
||||
are member methods to extract selected information from a report by calling
|
||||
the McCalla software. Additional information can be selected by adding new
|
||||
member methods as needed. Certainly the methods currently implemented are
|
||||
not sufficient. METAR reports are available via the internet. In the USA,
|
||||
NOAA provides individual METAR reports in this directory:
|
||||
ftp://weather.noaa.gov/data/observations/metar/stations
|
||||
Other sources are available as well. The current implementation does not
|
||||
look for reports on the internet.
|
||||
|
||||
There is a test program in the MetarTest subdirectory. It requires that a
|
||||
#define be changed in the MetarStation.cpp file. Add #define TESTPROG to
|
||||
the code or -D TESTPROG to the compilation. This is necessary because the
|
||||
FGFS options class is coupled tightly to code that shouldn't be pulled into
|
||||
the test program. The test program will decode many METAR reports and
|
||||
display
|
||||
them to the screen, then it will plot all the METAR reporting stations on a
|
||||
tumbling globe.
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
#include "Local.h" /* standard header file */
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Title: stspack2 */
|
||||
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
|
||||
/* Date: 05 Oct 1992 */
|
||||
/* Programmer: ALLAN DARLING */
|
||||
/* Language: C/2 */
|
||||
/* */
|
||||
/* Abstract: The stspack2 package contains functions to */
|
||||
/* perform the isalnum through isxdigit functions */
|
||||
/* on strings. The functions come in four forms: */
|
||||
/* those that test NULL delimited strings and are */
|
||||
/* named in the form sxxxxxxx, those that test at */
|
||||
/* most n characters and are named in the form */
|
||||
/* nxxxxxxx, those that search forward in a string */
|
||||
/* and are named in the form nxtyyyyy, and those */
|
||||
/* that search backward in a string and are named */
|
||||
/* in the form lstyyyyy. */
|
||||
/* */
|
||||
/* The xxxxxxx is the name of the test applied to */
|
||||
/* each character in the string, such as isalpha, */
|
||||
/* thus a function to test a NULL delimited string */
|
||||
/* an return a nonzero value if all characters in */
|
||||
/* the string are digits is named sisdigit. */
|
||||
/* */
|
||||
/* The yyyyy is the name of the test applied to */
|
||||
/* characters in a string, minus the 'is' prefix. */
|
||||
/* Thus a function to find the next digit in a NULL */
|
||||
/* delimited string and return a pointer to it is */
|
||||
/* named nxtdigit. */
|
||||
/* */
|
||||
/* The only exception to the naming rule is for the */
|
||||
/* functions that test for hexadecimal digits. */
|
||||
/* These are named sisxdigi, nisxdigi, nxtxdigi, */
|
||||
/* and lstxdigi because of the eight character */
|
||||
/* function name limitation. */
|
||||
/* */
|
||||
/* The nxxxxxxx class of functions will test up to */
|
||||
/* n characters or the first NULL character */
|
||||
/* encountered, whichever comes first. For all */
|
||||
/* classes of functions, the string sentinal is */
|
||||
/* not included in the test. */
|
||||
/* */
|
||||
/* External Functions Called: */
|
||||
/* isalnum, isalpha, iscntrl, isdigit, isgraph, */
|
||||
/* islower, isprint, ispunct, isspace, isupper, */
|
||||
/* isxdigit. */
|
||||
/* */
|
||||
/* Input: For sxxxxxxx class functions, a pointer to a */
|
||||
/* NULL delimited character string. */
|
||||
/* */
|
||||
/* For nxtyyyyy class functions, a pointer to a */
|
||||
/* NULL delimited character string. */
|
||||
/* */
|
||||
/* for nxxxxxxx class functions, a pointer to a */
|
||||
/* character array, and a positive, nonzero integer.*/
|
||||
/* */
|
||||
/* for lstyyyyy class functions, a pointer to a */
|
||||
/* character array, and a positive, nonzero integer.*/
|
||||
/* */
|
||||
/* Output: A nonzero value if the test is true for all */
|
||||
/* characters in the string, a zero value otherwise.*/
|
||||
/* */
|
||||
/* Modification History: */
|
||||
/* None. */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
|
||||
int nisalnum(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!isalnum(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nisalnum */
|
||||
|
||||
|
||||
int nisalpha(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!isalpha(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nisalpha */
|
||||
|
||||
|
||||
int niscntrl(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!iscntrl(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end niscntrl */
|
||||
|
||||
|
||||
int nisdigit(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!isdigit(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nisdigit */
|
||||
|
||||
|
||||
int nisgraph(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!isgraph(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nisgraph */
|
||||
|
||||
|
||||
int nislower(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!islower(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nislower */
|
||||
|
||||
|
||||
int nisprint(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!isprint(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nisprint */
|
||||
|
||||
|
||||
int nispunct(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!ispunct(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nispunct */
|
||||
|
||||
|
||||
int nisspace(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!isspace(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nisspace */
|
||||
|
||||
|
||||
int nisupper(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!isupper(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nisupper */
|
||||
|
||||
|
||||
int nisxdigi(char *s, int n) {
|
||||
|
||||
for (; *s && n; s++, n--)
|
||||
|
||||
if (!isxdigit(*s))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
||||
} /* end nisxdigi */
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
#include "Local.h" /* standard header file */
|
||||
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* Title: stspack3 */
|
||||
/* Organization: W/OSO242 - GRAPHICS AND DISPLAY SECTION */
|
||||
/* Date: 05 Oct 1992 */
|
||||
/* Programmer: ALLAN DARLING */
|
||||
/* Language: C/2 */
|
||||
/* */
|
||||
/* Abstract: The stspack3 package contains functions to */
|
||||
/* perform the isalnum through isxdigit functions */
|
||||
/* on strings. The functions come in four forms: */
|
||||
/* those that test NULL delimited strings and are */
|
||||
/* named in the form sxxxxxxx, those that test at */
|
||||
/* most n characters and are named in the form */
|
||||
/* nxxxxxxx, those that search forward in a string */
|
||||
/* and are named in the form nxtyyyyy, and those */
|
||||
/* that search backward in a string and are named */
|
||||
/* in the form lstyyyyy. */
|
||||
/* */
|
||||
/* The xxxxxxx is the name of the test applied to */
|
||||
/* each character in the string, such as isalpha, */
|
||||
/* thus a function to test a NULL delimited string */
|
||||
/* an return a nonzero value if all characters in */
|
||||
/* the string are digits is named sisdigit. */
|
||||
/* */
|
||||
/* The yyyyy is the name of the test applied to */
|
||||
/* characters in a string, minus the 'is' prefix. */
|
||||
/* Thus a function to find the next digit in a NULL */
|
||||
/* delimited string and return a pointer to it is */
|
||||
/* named nxtdigit. */
|
||||
/* */
|
||||
/* The only exception to the naming rule is for the */
|
||||
/* functions that test for hexadecimal digits. */
|
||||
/* These are named sisxdigi, nisxdigi, nxtxdigi, */
|
||||
/* and lstxdigi because of the eight character */
|
||||
/* function name limitation. */
|
||||
/* */
|
||||
/* The nxxxxxxx class of functions will test up to */
|
||||
/* n characters or the first NULL character */
|
||||
/* encountered, whichever comes first. For all */
|
||||
/* classes of functions, the string sentinal is */
|
||||
/* not included in the test. */
|
||||
/* */
|
||||
/* External Functions Called: */
|
||||
/* isalnum, isalpha, iscntrl, isdigit, isgraph, */
|
||||
/* islower, isprint, ispunct, isspace, isupper, */
|
||||
/* isxdigit. */
|
||||
/* */
|
||||
/* Input: For sxxxxxxx class functions, a pointer to a */
|
||||
/* NULL delimited character string. */
|
||||
/* */
|
||||
/* For nxtyyyyy class functions, a pointer to a */
|
||||
/* NULL delimited character string. */
|
||||
/* */
|
||||
/* for nxxxxxxx class functions, a pointer to a */
|
||||
/* character array, and a positive, nonzero integer.*/
|
||||
/* */
|
||||
/* for lstyyyyy class functions, a pointer to a */
|
||||
/* character array, and a positive, nonzero integer.*/
|
||||
/* */
|
||||
/* Output: A nonzero value if the test is true for all */
|
||||
/* characters in the string, a zero value otherwise.*/
|
||||
/* */
|
||||
/* Modification History: */
|
||||
/* None. */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
char *nxtalnum(char *s) {
|
||||
|
||||
for (; !isalnum(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtalnum */
|
||||
|
||||
|
||||
char *nxtalpha(char *s) {
|
||||
|
||||
for (; !isalpha(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtalpha */
|
||||
|
||||
|
||||
char *nxtcntrl(char *s) {
|
||||
|
||||
for (; !iscntrl(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtcntrl */
|
||||
|
||||
|
||||
char *nxtdigit(char *s) {
|
||||
|
||||
for (; !isdigit(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtdigit */
|
||||
|
||||
|
||||
char *nxtgraph(char *s) {
|
||||
|
||||
for (; !isgraph(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtgraph */
|
||||
|
||||
|
||||
char *nxtlower(char *s) {
|
||||
|
||||
for (; !islower(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtlower */
|
||||
|
||||
|
||||
char *nxtprint(char *s) {
|
||||
|
||||
for (; !isprint(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtprint */
|
||||
|
||||
|
||||
char *nxtpunct(char *s) {
|
||||
|
||||
for (; !ispunct(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtpunct */
|
||||
|
||||
|
||||
char *nxtspace(char *s) {
|
||||
|
||||
for (; !isspace(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtspace */
|
||||
|
||||
|
||||
char *nxtupper(char *s) {
|
||||
|
||||
for (; !isupper(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtupper */
|
||||
|
||||
|
||||
char *nxtxdigi(char *s) {
|
||||
|
||||
for (; !isxdigit(*s) && *s; s++) ;
|
||||
|
||||
if (*s)
|
||||
return (s);
|
||||
else
|
||||
return (NULL);
|
||||
|
||||
} /* end nxtxdigi */
|
||||
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
props_test
|
||||
tabbed_value_test
|
||||
|
||||
@@ -3,31 +3,30 @@ includedir = @includedir@/misc
|
||||
lib_LIBRARIES = libsgmisc.a
|
||||
|
||||
include_HEADERS = \
|
||||
commands.hxx \
|
||||
exception.hxx \
|
||||
props.hxx \
|
||||
props_io.hxx \
|
||||
sg_path.hxx \
|
||||
sgstream.hxx \
|
||||
stopwatch.hxx \
|
||||
strutils.hxx \
|
||||
tabbed_values.hxx \
|
||||
texcoord.hxx \
|
||||
zfstream.hxx
|
||||
zfstream.hxx \
|
||||
interpolator.hxx
|
||||
|
||||
libsgmisc_a_SOURCES = \
|
||||
commands.cxx \
|
||||
exception.cxx \
|
||||
props.cxx \
|
||||
props_io.cxx \
|
||||
sg_path.cxx \
|
||||
sgstream.cxx \
|
||||
strutils.cxx \
|
||||
tabbed_values.cxx \
|
||||
texcoord.cxx \
|
||||
zfstream.cxx
|
||||
zfstream.cxx \
|
||||
interpolator.cxx
|
||||
|
||||
noinst_PROGRAMS = props_test
|
||||
noinst_PROGRAMS = tabbed_value_test
|
||||
|
||||
props_test_SOURCES = props_test.cxx
|
||||
props_test_LDADD = libsgmisc.a ../xml/libsgxml.a ../debug/libsgdebug.a
|
||||
tabbed_value_test_SOURCES = tabbed_values_test.cxx
|
||||
tabbed_value_test_LDADD = \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user