1
0
Fork 0
Commit graph

84 commits

Author SHA1 Message Date
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