1
0
Fork 0
Commit graph

138 commits

Author SHA1 Message Date
ehofman
8ff709439b Some small fixes and security updates. 2005-05-30 08:47:00 +00:00
ehofman
a383d6285b Fix a number of build issues; Not all compilers support strnlen(), some platforms use more than one lend-ending character and capture lines starting with a whitespace also. 2005-05-27 18:49:45 +00:00
ehofman
e4bce63391 Be a tad more clever on readin the apt database; optimize the if statements a bit and dont tokenize strings we don't want to see anyhow. 2005-05-27 17:46:35 +00:00
andy
88c73d0ece Don't try to open runway and parking files for every airport in the
database.  Works fine on Linux, but is a huge performance hit (1
minute) on cygwin.  Keep a cache of actual directories and check that
first.
2005-05-27 17:06:13 +00:00
curt
40170cb722 The view frustum is defined in plib apps using calls to ssgSetFOV() and
ssgSetNearFar().  This by default creates a symmetric view frustum which is
typically what an application wants.

However, to get control of the view frustum in order to build support for
asymmetric view frustums, we need to wrap these calls with a bit of our own
logic.

This set of changes wraps all calls to ssgSetFOV() and ssgSetNearFar() with
FGRenderer methods.

I also standardized how the FGRenderer class is handled in globals.[ch]xx.
This led to some cascading changes in a variety of source files.

As I was working my way through the changes, I fixed a few warnings along
the way.
2005-02-25 19:41:53 +00:00
ehofman
02a757f9e6 MSVC (warning) fixes. 2005-02-18 10:16:30 +00:00
ehofman
5bc15d7a69 Durk Talsma:
I just heard from John Wojnaroski that you and he are going to work on getting
a flightgear demo machine up for the linux expo thursday and Friday. John
indicated that he would very much like to get a CVS version with the new
traffic code up and running before the expo.
2005-02-10 09:01:51 +00:00
ehofman
031f062686 Melchior FRANZ:
Here's again one of the more obscure bugs that valgrind complains about: somehow
the STL container classes manage to read out values before they were ever set.
This patch fixes that. This may not cause any harm in this case, but valgrind
seems to *always* be right about them.
2005-01-27 10:49:58 +00:00
ehofman
f488051bd3 Change debug level: try --log-level=debug and you see why (takes very, very, *very* long to output all 21.000 airports that way). 2005-01-15 14:25:58 +00:00
curt
5e81b331e1 David Luff:
Attached is a patched runways.cxx.  This fixes the find runway nearest to a given heading code.  This was returning the last runway loaded at a given airport, not the nearest runway to the heading requested (which seems to always be 270deg by default).  I have no idea how this has survived unnoticed for so long - I think it might be because you need to start at an airport with a runway near to 27 and one much greater than 27 eg. 36 to really tickle it, otherwise the runway nearest to 27 tends to be the final one loaded anyway.  Try starting at KARR with and without the patch and note the surface wind.  This should go in before the release.
2004-12-26 23:31:35 +00:00
curt
222446df29 Replace the data/Airports/basic.dat.gz and data/Airports/runways.dat.gz with
a single apt.dat.gz file which is in the native X-Plane format.

To do this I wrote a front end loader than builds the airport and runway
list.  Some of the changes I needed to make had a cascading effect, so there
are minor naming changes scattered throughout the code.
2004-12-22 23:57:07 +00:00
ehofman
c537267f96 Durk Talsma:
Okay, here's the latest update to the tarffic manager/AI Manager. AITraffic
can now fly multiple routes and be initialized while sitting statically at
airports.
2004-11-29 09:41:43 +00:00
curt
d05121ef46 Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
curt
225298a09e Often, the elevation of an ILS component is not listed in our nav database.
A good elevation is critical for proper glide slope modeling.  This patch
assigns the average field elevation to any ILS component that doesn't have
a valid elevation.

Also, for an ILS approach, use the GS transmitter elevation for glide slope
calculations rather than the localizer elevation, in some cases this can
make a big difference.
2004-06-09 03:13:13 +00:00
curt
a3cde21637 Curt Olson:
These change add some code that at initialization time will snap all
localizers into perfect alignment with their runways.  It's my experience
that the DAFIF/FAA data reports runway and localizer headings to a level
of precision that is great for making charts, or adjusting your OBS, etc.
But the level of precision of this data can be far enough off to make you
visibly *un*aligned with the runway when the CDI needle is centered.

There are probably cases where the localizer isn't really perfectly
aligned with the runway, or intentionally misaligned to avoid obstacles
or terrain.  So I have made this configurable for those that trust the
data more than I do.  Just set "/sim/navdb/auto-align-localizers" to
true/false in the preferences file to turn this feature on or off in the
code.
2004-05-28 16:24:43 +00:00
curt
2acdd02879 Clean up various compiler warnings that have crept into the code. This
by no means get's them all, but it's a start.
2004-04-01 15:27:53 +00:00
curt
00002357b3 Roy Vegard Ovesen:
I've done som more work on the gps instrument.

- You can now input airport-, nav- or fix-ID to select a waypoint.
- You have to specify either "airport", "nav" or "fix" in the waypoint-type
  property (some fixes and navs have identical IDs).
- Formatted the time to waypoint output.
- Cleaned up and changed some propery names (wp-heading -> wp-bearing).

- I've also added a name member to the FGNav class so that the gps instrument
  can get the name of the nav.
- Changed the airport name parsing in simple.cxx.
2004-03-15 19:23:39 +00:00
curt
4fca15fa1d Avoid a possible segfault crash if a nonexistant airport is specified. 2004-02-25 02:16:36 +00:00
curt
31e563c2a4 A first stab at limiting the noaa.gov query to only valid stations. There
are many recognized limitations and inefficiencies with this entire approach,
however, it's a quick and dirty way to get something working, where before
we didn't.
2004-02-23 18:25:29 +00:00
ehofman
86e94fd08e Frederic Bouvier:
The last change from Curt to Airports/simple.[ch]xx made
GUI/AirportList.cxx not compilable because of the loss of
a '*' in getAirport.

Also : fabs is not defined under MSVC unless <math.h> is
included.
2004-02-23 09:48:10 +00:00
curt
4606f96e13 Various mods to allow querying for nearest airport (with optional ability to
only query those stations with metar weather available.)  Metar availability
is determined on the fly for now.
2004-02-23 01:37:26 +00:00
david
e3737de2d6 Allow sequential access to airports. 2003-11-27 23:37:03 +00:00
ehofman
0e370e6e28 Fix a problem where older IRIX compilers needed a typecast for certain opperations 2003-10-16 14:14:03 +00:00
curt
c81fbb937a David Luff:
Firstly, the search of a given runway number was coming out wrong if the
reverse of the one actually in the database was given, resulting in the AI
plane going to the wrong runway.  This was caused by the fact that if the
reverse runway number to the one wanted was matched then revrwyno was
assigned to rwy.rwy_no, whereas actually it was the original runwayno that
should have been assigned.

Secondly, whilst instrumenting the search with couts to see what was going
wrong, I noticed that one runway would come up loads of times.  It turns
out that this is because taxiways and the next airport line were loaded in
as the last runway, with only the type changed, in the constructor.  Thus
the total number of runway entries for all except the last airport equalled
(no-of-runways + no-of-taxiways +  1).  I've changed a couple of lines to
fix this.

[Curt: this was partially fixed last week, but now it should be completely
fixed.  Thanks Dave!]
2003-09-02 19:12:11 +00:00
curt
1cbcd89e5e I had to make a small mod to the runways.dat format, code changes to handle
that.
2003-08-29 20:27:48 +00:00
ehofman
3ba01fa762 New automake, new problems. Add $base_LIBS for programs since $LIBS isn't substituted automatically anymore 2003-08-29 09:03:49 +00:00
curt
314c324556 Depricated ... 2003-08-29 04:12:34 +00:00
curt
e6859e4fe0 Redo the runway database scheme to use a flat/ascii file and load the entire
database into memory at the start.  This should completely eliminate any
dependencies we have on metakit.
2003-08-29 04:11:23 +00:00
curt
212f5d66bf Depricated ... 2003-08-28 21:04:12 +00:00
curt
6665d7d609 Remove one dependence on MetaKit. 2003-08-28 20:53:08 +00:00
david
c5137afccc Ignore calc_loc program. 2003-06-07 13:54:35 +00:00
ehofman
f39e079b75 Duh! Remove some debug messages 2003-06-03 14:36:56 +00:00
ehofman
32bb2af2af Fix a bug where FlightGear would crach when an aiport id was geven in lower
case. It turned out that MetaKit is case insensitive, so I adden an extra
check to see if we got what we were asking for.
2003-06-03 14:34:02 +00:00
ehofman
61cabd1871 Satisfy some strict compilers by adding a number of libraries 2003-05-28 08:23:54 +00:00
curt
c538cc44fd Add a utility that given a specific localizer position and corresponding
runway info, repositions the localizer and realigns it with the runway
heading so that the approach lines up perfectly.
2003-05-27 18:59:14 +00:00
ehofman
df2ce45ab7 Change cout and cerr in SG_LOG() where appropriate, otherwise comment it out 2003-03-20 10:43:02 +00:00
ehofman
f2e2101264 David Luff writes:
I've fixed a bug in FGRunways::search(aptid, tgt_hdg) which wasn't working properly for airports with multiple parallel runways. I've also firmed up and pulled out into it's own function the GetReverseRunwayNo code, and done some input checking.

As a result of fixing the above in runways.cxx, I've pulled out the
parallel implementation in the functions that set position by airport and
heading/runway number in fg_init.cxx and called the runways functions
instead.
2003-03-20 09:38:06 +00:00
curt
9b24a37180 David Luff:
// search for the specified apt id and runway no
bool FGRunways::search( const string& aptid, const string& rwyno, FGRunway*
r )

there was a bug, in that each runway corresponds to *two* runway numbers
(eg 01/19, 10L/28R) but the function was only checking one.  I've modified
it to check the supplied number against both possible numbers for each
runway.


Secondly, I sent in the function:

// Return the runway closest to a given heading
bool FGRunways::search( const string& aptid, const int tgt_hdg,
                        FGRunway* runway )

a year or two ago now when I first did the ATIS.  I'm not sure what I was
doing at the time (copied most of it out of fg_init.cxx) but I don't think
it's ever worked, so here's a brutal modification that does!
2003-03-05 18:02:24 +00:00
david
71f08e795d Patches from Erik Hofman for SGI compatibility:
Some more cmall changes to the SimGear header files and removed the
SG_HAVE_NATIVE_SGI_COMPILERS dependancies from FlightGear.

I've added a seperate JSBSim patch for the JSBSim source tree.
2002-12-31 18:26:02 +00:00
curt
f8c24745b6 Initial revision 2002-09-10 01:13:59 +00:00
curt
4f00d9a959 Tidy up the autoconf/automake configuration a bit.
- Removed some old cruft.

- Removed some support for older versions of automake which technically was
  correct, but caused the newer automakes to squawk warnings during an
  initial sanity check (which isn't done very intelligently.)

  NOTE: this fix is technically not correct for older version of automake.
  These older version use the variable "INCLUDES" internally and could have
  them already set to an important value.  That is why we were appending
  our values to them.  However, newer versions of automake don't set this
  value themselves so it is an error to append to a non-existant variable.
  We seem to "get away" with overwriting the value on older versions of
  automake, but if you have problems, consider upgrading to at least
  automake-1.5.
2002-08-25 19:40:04 +00:00
david
56473dc28d Mac OS X fixes and MSVC warning fixes from Jonathan Polley. 2002-05-10 23:35:06 +00:00
curt
6a399b24a3 Re-arranged include files to reduce external dependencies for a slight
improvement in compilation speed.
2002-04-04 06:05:51 +00:00
david
b3d5d24d81 Patch from Melchior Franz:
It seems that the airport database was changed some day and the End?Flags
changed from floats to strings. The database definition, though, was not
adapted and still created number entries. Reading out these flags led to
access to memory, that was never initialized. While it didn't cause crashes
during normal use, it actually caused one when I ran fgfs in ddd. Seems,
that the concerned memory region wasn't zeroed out then and hence uncovered
the bug.

Of course, the runways.mk4 database has to be re-created with the new
definitions.
2002-03-25 20:05:34 +00:00
curt
4f67824f09 - Removed redundant FG*:: qualifications from class members
- Fixed comparisons between signed and unsigned ints
2002-02-15 22:00:49 +00:00
curt
56db201e52 Cleaned up a few stray cout's 2002-02-13 18:17:04 +00:00
curt
1fa4c88d0e Updates to build system to better support automake-1.5
- automake-1.4 sets default values for INCLUDES which we can't
  overwrite.
- automake-1.5 renames this to DEFAULT_INCLUDES and leaves INCLUDES
  open for the developer to use.

Thus for automake-1.4 we are forced to 'append' to INCLUDES and in
automake-1.5 we can just set the value to whatever we like.
Unfortunately, the behaviors of the two versions are mutually
incompatible.

The solution I am committing now works for both versions but
automake-1.5 generates a lot of spurious warning messages that are
annoying, but not fatal.
2001-12-28 22:29:59 +00:00
david
4f5d70144a -Removed .cvsignore from itself, since .cvsignore is now in the CVS 2001-12-12 04:15:23 +00:00
curt
4cc5cee885 David Megginson writes:
Here's an unusual patch for FlightGear -- I've created .cvsignore
files for every source directory, to make CVS output more informative.
This is especially nice when using cvs-examine from (X)Emacs to look
for changes.
2001-12-09 05:43:40 +00:00
curt
8ff6965f98 Add #include <math.h> for fabs() 2001-11-08 16:52:51 +00:00
curt
b85be56a55 Changes to support Dave Luff's initial ATC/ATIS module. 2001-11-07 17:55:28 +00:00
curt
2653a8dc7e Patch to fix wrong case crash. 2001-10-10 18:15:07 +00:00
curt
706db85486 gcc-3.0 fixes. 2001-07-03 22:39:16 +00:00
curt
fe0c17625b Upgraded to handle new default.apt.gz file. 2001-07-03 16:44:37 +00:00
curt
0b8c3564ff Add a library needed by Irix. 2001-07-02 22:55:16 +00:00
curt
aea664cd15 MSVC++ changes contributed by Geoff McLane. 2001-05-17 21:55:22 +00:00
curt
0d999c9936 Added a search method for an airport/runway number combination. 2001-05-15 00:00:08 +00:00
curt
f1b1077d93 More fg -> sg namespace changes in simgear. 2001-03-25 14:20:12 +00:00
curt
182fd42b40 SG-ified logstream. 2001-03-24 06:03:11 +00:00
curt
5958389026 FG_ to SG_ namespace changes. 2001-03-23 22:59:18 +00:00
curt
8497f9b1ac FG_ to SG_ name changes. 2001-03-23 22:42:49 +00:00
curt
945163b540 FG_HAVE_STD_INCLUDES -> SG_HAVE_STD_INCLUDES 2001-03-23 22:15:19 +00:00
curt
c78827569a Properly close our database file ... 2001-01-31 15:58:53 +00:00
curt
152a5902c8 Moved winWidth and winHeight out of FGViewer since these are set on a
per-application level.  We can have multiple viewers ...
Cleaned up fov mistake on startup with panel activated.
2000-10-19 23:09:33 +00:00
curt
1dc35581f5 MSVC compatibility changes and code tweaks for minor nits caught by the
MSVC compiler.
2000-10-02 21:49:04 +00:00
curt
bf14bb1151 Fixes for MSVC++ issues. 2000-09-21 22:59:27 +00:00
curt
02def51a97 Tweaks to handle latest airport data file from Robin Peel. 2000-09-20 23:26:17 +00:00
curt
be88681d69 MacOS changes by Darrell Walisser. 2000-09-13 21:51:07 +00:00
curt
a009f04353 Miscellaneous MSVC fixes. 2000-09-06 22:46:43 +00:00
curt
26bdfd033b Initial revision. 2000-08-16 04:40:29 +00:00
curt
890ac4d237 Initial revision. 2000-08-16 01:28:33 +00:00
curt
535ed92264 Added code to put aircraft at the end of the runway closest to the desired
heading.  Only changed for initial position right now.
2000-08-16 00:09:03 +00:00
curt
39ae3864de Cleaned up all the old fragment and material_mgr stuff which originated
from the pre-ssg / render everything ourselves days.  Replaced with a
material library manager that is much better suited for working in the
context of ssg.  This simplified and cleaned up a ton of old junk.
2000-06-23 00:30:04 +00:00
curt
febc9cf0b2 First quick hack at panel shading. 2000-05-27 06:40:55 +00:00
curt
d4d10fad6b Replaced gdbm with metakit. Involves a new simgear version and a new database
format for the airports in the base package.
2000-05-27 05:54:02 +00:00
curt
b074559216 MSVC5 portability changes contributed by Bruce Finney. 2000-05-24 06:10:01 +00:00
curt
949fc00815 MacOS build updates. 2000-04-27 21:57:08 +00:00
curt
39f4bea43e Fixes for cygwin32 builds. 2000-04-27 03:26:36 +00:00
curt
7db09cfd2f Build gdbm database from original text file. 2000-03-29 20:23:28 +00:00
curt
3b34980556 Updates to simple.[ch]xx to use gdbm to look up airport values. 2000-03-29 20:21:31 +00:00
curt
cb4164c5e1 Added an #include <glut.h> to pick up the FLT_MAX definition. 2000-02-21 18:05:42 +00:00
curt
cc26bb7fe7 Removed all dependencies on <simgear/math/mat3.h> and friends. These are
old routines from SRGP.  Steve's plib/sg.h does a nice job of completely
replacing this (and since plib is already around) and is a nice clean design
so it just makes sense.
2000-02-19 14:29:27 +00:00
curt
1294aed465 One more pass at a reorg. 2000-02-16 23:01:03 +00:00
curt
485230b443 Code reorganization. 2000-02-15 03:30:01 +00:00
curt
243b73c10b Moving towards increased dependence on ssg. 1999-08-07 18:27:29 +00:00
curt
3895c604ce Borland C++ tweaks.
MacOS/Metrowerks tweaks.
Fix for fgText default constructor.
More ssg fiddling.
Fixed an include problem with client/server tile build tools.
1999-06-20 03:54:57 +00:00
curt
14a8533f63 Initial revision 1999-06-17 20:07:19 +00:00
Tim Moore
c90db01dc8 source tree reorganization prior to flightgear 0.7
SimGear and TerraGear appear to have been split off at this time.
2009-09-14 14:26:20 +02:00