1
0
Fork 0
Commit graph

163 commits

Author SHA1 Message Date
timoore
a9319336ba From Benoit Laniel: replace SG threading constructs with OpenThreads 2008-06-12 08:24:39 +00:00
fredb
278ab25f21 Win32 fix 2008-03-09 22:09:17 +00:00
timoore
b8de58bcdd cleanup of precipitation contribution
Reindent to Stroustrup style.

Make FGPrecipitationMgr an SGSubsystem and remove all references to it
in main.cxx and renderer.cxx.

Use SGGeod::makeZUpFrame instead of a private function in
tileentry.cxx. Rewrite that function, WorldCoordinate, to use
makeZUpFrame too.
2008-03-04 09:03:54 +00:00
timoore
eb26cb3590 precipitation effects from Nicolas Vivien 2008-03-04 09:02:24 +00:00
durk
ecc6548d71 cygwin related fixes, and some minor future release related maintenance
work.
2008-02-04 20:03:52 +00:00
mfranz
06c7c3c0f4 rename FGAirportSearchFilter::acceptable() -> ::pass() 2007-10-11 07:53:17 +00:00
mfranz
15139a42b6 - make FGAirport::search() more versatile, so that it can't only search
the next airport or airport with METAR station, but about any type of
  airport
- as a side effect this change makes it also 30 to 50% faster  :-)

In the long run this linear search shall be replaced with a spatial
algorithm (like octree), which will be a much bigger performance gain.
2007-10-05 21:54:52 +00:00
timoore
411435a48f Make comparisons against OSG version less flakey
Turn OPENSCENEGRAPH_MAJOR_VERSION, OPENSCENEGRAPH_MINOR_VERSION and
OPENSCENEGRAPH_PATCH_VERSION into a single number for comparisons in the
preprocessor.
2007-10-04 20:40:29 +00:00
timoore
24173c0398 Corrected atmosphere data, extended above 62000ft
Author: John Denker
Reviewed by: Ron Jensen and Gerard Robin
2007-08-31 18:01:07 +00:00
timoore
e23f731ef7 Fix for weather interpolation problem from Anders Gidenstam
Anders said:
With Stuart's help I've looked closer at this and I think I've tracked
down the cause of the problem:
At least on my computer the sort() call on line 234 in
Environment/environment_ctrl.cxx sorts the vector entries by memory
address instead of altitude, i.e. the custom comparison predicate is not
used. This causes the tables of environment conditions to be reordered
into a wrong order at some weather updates, depending, basically,
on where the memory allocator places the objects. (Btw. why are they are
freshly allocated for each update?)
2007-08-15 15:22:44 +00:00
mfranz
e1019eb359 Stuart BUCHANAN:
"interpolates METAR changes over time as follows:
1) Wind changes are interpolated as vectors, so the change is much more
natural than before - no-longer will your aircraft be suddenly shoved to
one side.
2) Visibility is interpolated as an X-value, which looks pretty neat.
3) Cloud heights and thicknesses are interpolated if they are close to the
aircraft. Cloud textures are not."
2007-08-03 12:06:17 +00:00
mfranz
724ba5b4ad yet another round() ... 2007-03-31 17:45:23 +00:00
mfranz
7e6bc192ba John DENKER:
"This altimetry method is valid to above 100,000 feet, and
correctly handles Kollsman settings"
2007-03-31 09:36:19 +00:00
mfranz
f04aca91b2 Torsten DREYER:
"bind the visibility-property of the SGSky object to a property
named /envirionment/effective-visibility-m. This property is needed to decide
if the aircraft is within clouds or not. I use this property also for the
structural icing code."
2006-11-25 12:21:36 +00:00
fredb
19dd8133aa Remove ambiguities 2006-07-29 09:22:24 +00:00
frohlich
75f0dcbb1d Add missing includes required to compile 2006-07-27 16:13:37 +00:00
mfranz
e979f72ea6 - we could use the same property path names in fgUntie that we used int fgTie
- cleanup
2006-07-27 14:28:51 +00:00
durk
a69dfbbc9a Mark's dynamic sun color changes. 2006-07-27 05:16:06 +00:00
mfranz
e48967cb1d fix another crash on exit by finally converting the rest of unguarded
SGPropertyNode to guarded ones. This is also done for JSBSim/JSBSim.hxx,
for which JSB had given explicit permission a while ago. I postponed that
back then, but now is the time.
2006-06-11 10:21:10 +00:00
mfranz
6ecd221bca - make header not depend on *.cxx files (which would be wrong :-P ) 2006-04-17 17:17:21 +00:00
mfranz
6317faf376 Vassilii KHACHATUROV: read rain settings from property node (preferences.xml) 2006-03-23 16:48:45 +00:00
mfranz
ed9e16d001 Jean-Yves Lefort: fix "crash" on exit
mf:
pthread_cancel doesn't seem to work correctly on all supported platforms.
It apparently causes SGBlockingQueue::pop() to correctly leave the thread on
the cancellation point pthread_wait(), but the SGGuard() destructor isn't
called, so the queue mutex remains locked. This triggered an assert() on
pthread_join(). This patch uses an empty ICAO request as signal for the
thread to terminate itself.
2006-03-07 10:26:25 +00:00
mfranz
1fe9cce53b - remove unused pthread mutex and condition
- remove cleanup handler that unlocks unused mutex
- make the result_queue a locking queue (blocking is only done in the
  pop() anyway, and this isn't used in the thread at all)
- don't disallow thread cancelling in the request_queue's pop(), which
  is the only cancellation point in this thread
2006-02-21 13:19:33 +00:00
mfranz
c9813d1b5d new FSF address 2006-02-21 01:16:04 +00:00
fredb
36e4045810 Add missing include files needed by the new math code under windows 2006-02-18 13:58:09 +00:00
mfranz
a5fa24a586 one line sooner would be wise :-) 2006-02-09 17:27:37 +00:00
mfranz
e254d4e76d remove the subsystem in the destructor that was added in the constructor.
This prevents nasty crashes on "environment" subsystem removal.
2006-02-09 17:21:58 +00:00
curt
880a43bdbf John Ellson:
Changes require to compile with a Fedora-Core Development system running
on an X86_64 platform with gcc-4.1.0.
2005-12-29 16:22:38 +00:00
ehofman
4be621fbe9 Durk Talsma, Olaf Flebbe & Mathias Frhlich:
Split up simple.cxx
2005-12-29 13:58:21 +00:00
ehofman
9090fb5bf4 Olaf Flebbe:
The prototype of update_metar_properties does not match overridden func.
trafficmgr: iterators below begin() and after end().
tower.cxx : iterator incrementing beyond end().
2005-12-19 13:03:19 +00:00
curt
e807c7f95c A long, long time ago, a bug was inadvertently introduced into the threaded
metar fetcher.  Effectively this caused the metar thread and the main
thread to both attempt to fetch weather data.  This could lead to long pauses
when the main thread decided to fetch the weather, and introduced a race
condition that could cause a segfault/crash.

Investigating this issue, I discovered that even longer ago, someone confused
#defines and #ifdef symbols with C/C++ variables.  If I #define XYZ 0 it is
defined so #ifdef XYZ is true, not false like a variable.  Our thread
detection made this mistake and there were follow up patches to work around
it.

So I fixed the configure script (ahhh, reading the autoconf manual is highly
recommended excercise for people editing the configure.ac file.)  I also
discovered that we were hardwiring with_threads=yes with no way via configure
options to disable threads from the build so I fixed that.

Then I patched up the #ifdef's scattered through the code to match the
configure script changes, oh and by the way, I stumbled upon a past typo
that led to the race condition in the metar fetching thread and fixed that.
2005-11-22 17:02:31 +00:00
mfranz
624ca31263 number one reason for lots of stale METAR reports is wrongly set system time 2005-11-14 21:59:13 +00:00
mfranz
6a3be655d2 Prevent download of thousands of METAR reports if all are for some reason
too old (wrong system time or broken proxy): stops after 10 stale reports
were fetched in a row. This should simply stop further fetching, but due
to a bug in the threading system(?) it does currently lead to abortion,
just like any other exception in the fetcher.
2005-11-14 17:18:27 +00:00
ehofman
e5d3c3134b Make use of the new sound_sample function arrangement. 2005-11-12 10:27:05 +00:00
ehofman
b24dbb3f8b Alex Romosan:
I tried to make sure accessor functions which return by reference act
on const objects. also replaced some iterators with const_iterator
and a few return/pass by reference that were missed the first time
around.
2005-10-26 09:03:49 +00:00
ehofman
62a359cc4a Alex Romosan:
* Use "const string&" rather than "string" in function calls when appropriate.
* Use "const Point3D&" instead of "Pint3D" in function calls when appropriate.
* Improved course calculation in calc_gc_course_dist()
* Safer thread handling code.

Vassilii Khachaturov:

Dont use "const Point3D&" for return types unless you're absolutely sure.

Erik Hofman:

* Use SGD_(2)PI(_[24]) as defined in simgear/constants.h rather than
  calculating it by hand every time.
2005-10-25 13:49:55 +00:00
ehofman
12fc19080b Ima Sudonim:
CygWin/gcc-3.4.4 updates.

I replaced my cygwin compiler with 3.4.4, did a make clean of plib, simgear,
and flightgear, then did a make install of all three. With the included changes,
everything builds fine, and runs fine.
2005-10-22 11:22:05 +00:00
curt
0bb1494452 David Luff:
Attached is a patch to the airport data storage that I would like committed
after review if acceptable.  Currently the storage of airports mapped by ID
is by locally created objects - about 12 Meg or so created on the stack if
I am not mistaken.  I've changed this to creating the airports on the heap,
and storing pointers to them - see FGAirportList.add(...) in
src/Airports/simple.cxx.  I believe that this is probably better practice,
and it's certainly cured some strange problems I was seeing when accessing
the airport data with some gps unit code.  Changes resulting from this have
cascaded through a few files which access the data - 11 files are modified
in all.  Melchior and Durk - you might want to test this and shout if there
are problems since the metar and traffic code are probably the biggest
users of the airport data.  I've also added a fuzzy search function that
returns the next matching airport code in ASCII sequence in order to
support gps units that have autocompletion of partially entered codes.

More generally, the simple airport class seems to have grown a lot with the
fairly recent addition of the parking, runway preference and schedule time
code.  It is no longer just an encapsulation of the global airport data
file, and has grown to 552 bytes in size when unpopulated (about 1/2 a K!).
 My personal opinion is that we should look to just store the basic data in
apt.dat for all global airports in a simple airport class, plus globally
needed data (metar available?), and then have the traffic, AI and ATC
subsystems create more advanced airports for themselves as needed in the
area of interest.  Once a significant number of airports worldwide have
ground networks and parking defined, it will be impractical and unnecessary
to store them all in memory.  That's just a thought for the future though.
2005-09-20 20:26:57 +00:00
ehofman
dcbc6369ac Harald JOHNSEN:
this is the correction for the visibility bug/yasim crash. I've also made a little change that could help in the metar init.
2005-09-18 09:49:26 +00:00
ehofman
a760dcdf13 Harald JOHNSEN:
- replay.cxx :
  corrected a bug, now reinitialize the recording data when replay is
  deactivated

- fgclouds.cxx :
  cloud layers and weather condition are saved when choosing a weather scenario,
  added a new scenario 'none' so we can switch back to standard flightgear
  weather

- navradio.cxx :
  force a search() on init to initialize some variables, preventing a nearly
  infinite loop  when delta-time == 0 on the first update()

- electrical.cxx :
  uninitialized variable in apply_load() for FG_EXTERNAL supplier

- panel.cxx, panelnode.cxx :
  added a property "depth-test" for 2.5D panels so that they update the depth
  buffer and are no more visible from the outside of the aircraft when the
  aircraft uses textures without an alpha channel

- panel.cxx :
  moved the computation of the instruments diffuse color outside the
  texturelayer code since this is constant during a frame, this is a big speedup
  for 2D panels
2005-08-22 17:49:50 +00:00
ehofman
83b414482f Harald JOHNSEN:
I did some profiling of the code and found a few interessant things. Some corrections are obvious like the one in the multiplayer code, the fps is no more divided by 2 or 3 when another plane is on screen.

Other things like collision detection and computation of agl can not really be optimized. I changed a few things in hitlist.cxx but this only give a very low increase of fps. The groundcache eats a lot of cpu but I think that the real way to do it is to use a real collision system like OPCODE or something like that.



And I added an option to disable the recording of replay data. It takes more cpu than we can think.


Changes
=======

- panel.cxx :
  moved the computation of the instruments diffuse color outside the texturelayer code
  since this is constant during a frame, this is a big speedup for 2D panels ;

- hitlist.cxx :
  changed the computation of the intersection between ray and triangle, optimized
  the sphere culling by using a normalized direction vector. This can give a
  35% speedup on the computation of elevation in some situations ;

- renderer.cxx, acmodel.cxx :
  call ssgDrawAndCull with plane scene graph in external or internal view,
  calling ssgDrawAndCull with the root scene graph was drawing other players plane
  a second time in multiplayer mode ;

- mplayer.cxx :
  removed the calls to ssgFlatten and ssgStripify because it was degenerating models,
  causing a massive drop in frame rate ;

- replay.cxx :
  added an option to disable the recording of the flight

- fgclouds.cxx :
  changed the path of cloudlayer properties to match preferences.xml ;
  set the altitude of clouds from scenarios to a more correct value if metar is not enabled ;
2005-07-31 09:04:18 +00:00
ehofman
e59d38bf00 Harald JOHSNEN:
Changes
=======

- correct the transparency probleme when old 3d clouds were enabled
 (rendering context with an alpha channel)
- changed rain cone orientation, it can now be viewed from helicopter or chase
  view (still not tower view)
- clouds are a bit more yellow/red at dawn/dusk
- weather data is now correctly propagated to the interpolator, this correct
  visibility, wind, etc
- the 'metar' weather scenario now immedialty reuse the real metar data
- real metar no more overwrite custom weather scenario
2005-05-22 08:08:22 +00:00
curt
5c6020f2bc Added Farenheit temperature conversion to the property tree. 2005-05-20 19:42:53 +00:00
ehofman
d2271c3bf4 Harald JOHNSEN:
This is another update for the cloud code, a lot of lines but this time I have started to add the doxygen doc.

Misc
====

- corrected a bug when RTT is not available, the current rendering context was
  altered
- if RTT is not available then 3d clouds are not drawn at all
- impostors lighting is now recomputed when the sun changes position
- distant objects are no more seen in front of clouds
- blending of distant clouds is a bit better now
- litle optimization of code (uses a less cpu time)
- use layer wind speed and direction (no more hardcoded wind)
- fov is no more hardcoded

Changes
=======

- clouds (cu only) are dissipating/reforming (experimental)
- compute a turbulence factor that depends on surrounding clouds and type of
  clouds (experimental)
- clouds shapes are defined in cloudlayers.xml
- type of clouds present in a layer is also defined in cloudlayers.xml
- cloud layers are generated from metar and other misc. data (in progress)
- added a rain effect around the viewer (enabled in the rendering dialog and
  when the metar property says so)
- added a lightning effect (enabled in the rendering dialog) : cb clouds spawn
  new lightnings
- added a dialog to select from different weather source : metar/property,
  a 'fair weather' environment and a 'thunderstorm' environment.
2005-05-15 09:26:17 +00:00
ehofman
a78dae1fb7 Harald Johnson:
Changes
=======

- corrected some strange behavior when playing with the render dialog options
- the density slider is now working : if you are fps limited and still want to see clouds in
  the distance you should play with that
- added the choice for texture resolution, its more comprehensible now (before it was
  wrongly allways choosing 64x64 textures)
- changed the initial texture size : you now have 64 texture of 64x64, this uses 1Mo of
  texture memory (before it was 20 texture of  256x256, that took more memory and there was
  not enought impostors)
- sun vector is now right so the lighting is a bit better
- removed useless sort and light computations for impostors, this should save a lot of cpu
- blending of distant cloud is more accurate now
- clouds are now positioned correctly, they don't try to escape you anymore
- no more red/white boxes around cloud
- textures are now filtered (no more big pixels)

known bugs
==========

- distant objects are seen in front of clouds
2005-04-26 08:31:25 +00:00
ehofman
1f35f4c1ab Harald Johnson:
- new and updated sources for the new volumetric clouds
- 2 new textures for the clouds
- an update to the render dialog to enable/disable and change a few parameters
  for the new clouds
2005-04-24 11:17:23 +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
ba13669d32 Add the ability to set the minimum allowed age for metar reports. 2005-02-22 18:12:32 +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
33b6694311 Melchior FRANZ:
The following patches to SimGear & FlightGear ...

- create an FGMetar abstraction layer, whose purpose is:
  * provide defaults for unset values
  * interpolate/randomize data (GREATER_THAN)
  * derive additional values (time, age, snow cover)
  * consider minimum identifier (CAVOK, mil. color codes)
- add rain/hail/snow/snowcover support on the METAR side
- add max age of METAR data handling (currently set to
- add support for an external METAR cache proxy server
- add CAVOK handling
- set missing year/month in regular METAR messages
- fix a small bug in metar.cxx (wrong return value)
2005-01-20 09:28:45 +00:00
ehofman
38d327ba24 Tie the Scenery loader thread and the real weather fetching thread to CPU1 (if supported). 2005-01-09 10:27:01 +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
f42e3cb2ac More fixes to get the code working when threads are disabled. 2004-09-10 07:54:45 +00:00
ehofman
bfd8a50294 Frederic Bouvier:
Olivier discovered that environment_ctrl.cxx doesn't compile
when ENABLE_THREADS is not defined. The simple patch to correct
that is attached.
2004-09-09 08:32:11 +00:00
ehofman
97114e3159 Disable weather fetching if there are 3 errors within a 3 second period. This also solves the problem where FlightGear 'hangs' when real-weather fetching is enabled, but no network connection is present. 2004-08-21 11:43:48 +00:00
andy
7ceb85d454 Changes to get FlightGear (well, the src directory at least) to
configure and compile out-of-the-box on a MinGW target:

Use -lSDL instead of -lglut32 on windows builds when --enable-sdl
is set.

Link against alut.dll in addition to openal32.dll.

Replace BSD bcopy() with ANSI C memmove() in a few places.  This is
simpler than trying to abstract it out as a platform dependency in a
header file; bcopy() has never been standard.

The ENABLE_THREADS handling has changed to be set to 0 when threads
are not in use.  This breaks expressions like #ifdef ENABLE_THREADS.
Replace with a slightly more complicated expression.  It might have
been better to fix the configure.ac script, but I didn't know how and
this whole setting is likely to go away soon anyway.

The MinGW C runtime actually does include snprintf, so only MSVC
builds (and not all WIN32 ones) need _snprintf in JSBSim/FGState.cpp

Building on a platform with no glut at all exposed some spots where
plib/pu.h was being included without a toolkit setting (it defaults to
glut).  Include fg_os.hxx first.

And when still using glut, glut.h has a bizarre dependency on a
_WCHAR_T_DEFINED symbol.  It it's not defined, it tries to redefine
(!!) wchar_t to disasterous effect.
2004-04-30 00:52:11 +00:00
ehofman
deccb6c9a7 Fix a problem where the windspeed could be negative in the property tree. Animations relying on this property could become stressed because of that. 2004-03-21 10:57:44 +00:00
curt
d8000569ea Investigating some wierd behavior where the threaded metar fetcher would
occasionally cause a large number of valid stations to be flagged as invalid.
This *seemed* like a "race condition" type problem because there were some
assumptions in the communication between the main process and the threaded
loader which if they broke down could lead to this problem.

In the process of removing this ambiguity, I restructured the threaded
(and non-threaded) metar fetching code a bit.  Some of the top level logic
(which Erik politely left untouched) didn't make nearly as much sense in the
context of a threaded metar loader and could have contributed to some of the
wierdness I was seeing.
2004-02-28 19:52:17 +00:00
ehofman
feb9f16410 Revert the previous patch, wind-heading-from is part of a range, not a direction itself. 2004-02-28 12:08:01 +00:00
ehofman
2c6c83ce9b Fix a misunderstanding between wind-from and wind-heading 2004-02-28 11:03:59 +00:00
curt
8d44c8cecc For weather fetching from the noaa.gov site: If the closest station hasn't
changed, wait 15 minutes before grabbing it's weather data again.
2004-02-26 18:21:11 +00:00
ehofman
061f1688c3 Add support for a proxy server when retreiving metar data. 2004-02-26 10:23:48 +00:00
ehofman
bca8c29795 Add threading to metar data fetching where available. 2004-02-25 15:31:01 +00:00
ehofman
69d67d7478 only airports with four-letter codes can have metar stations 2004-02-23 09:49:02 +00:00
curt
11e0b75bc3 Oops, call *re*init() so that the weather conditions (not just clouds)
are actually updated.
2004-02-23 02:22:49 +00:00
curt
a8be680c43 Enhance the FGMetarEnvironmentCtrl class to also do on the fly weather
updates based on the "closest" airport with metar data available.  Note that
the web based query is in the main loop and causes brief sim pauses.  Update
rate (once per minute) needs to be tweaked with, but is a good value for
testing.
2004-02-23 01:39:12 +00:00
curt
969fbe4601 Updates so clouds, temp, and dewpoint can be set correctly using weather
station base elevation.
2004-02-22 14:21:37 +00:00
curt
b464703a6f For metar, correctly update visibility and pressure/altimeter. Temp and
clouds need to be implimented (and adjusted for station elevation.)
2004-02-22 02:06:05 +00:00
ehofman
3dd9b14190 ignore resets for now because every z/Z key press would trigger a call to NOAA. We need a better approach. 2004-02-21 15:20:41 +00:00
ehofman
cb77391d43 Catch exceptions when no metar data is available (e.g. KUFO) 2004-02-21 15:00:49 +00:00
ehofman
897f295988 Encapsulate the interpolstion version of FGEnvironment and fix some bugs 2004-02-21 14:04:40 +00:00
ehofman
84e4b1be2e Add support for retreiving metar data from the internet 2004-02-21 12:56:16 +00:00
ehofman
7ffce3ac6a Move the new metar class from FlightGear to SimGear 2004-02-02 10:14:20 +00:00
ehofman
f845aa9b2a Add Melchior FRANZ's metar class. It is not yet used anywhere (but in the resulting metar executable), but it makes adding live weather quite easy. 2004-01-24 10:38:39 +00:00
curt
41920268a6 I had made a change on 6/24/2003 relating to temperature interpolation.
Upon further review, I was very misguided, and unfortunately no one slapped
my hand at the time.

Factoring in the environment manager's interpolation scheme, it makes complete
sense to specify the sea level temperature at each boundary and aloft layer.
In fact, this is the only way that allows the temperature interpolation to
make sense, especially around the boundary layer.  This is confusing stuff,
but it now works perfectly. :-)
2003-11-10 21:55:49 +00:00
ehofman
cd4263f333 Fix some compiler warnings 2003-10-16 12:53:10 +00:00
ehofman
980012e168 Move FGEventMgr and FGSubsystemMgr over to SimGear, add SGEventMgr to FlightGear's globals structre and some small code cleanups 2003-09-24 17:20:55 +00:00
ehofman
32cb0df98e Add support for moving cloud layers 2003-08-19 13:06:51 +00:00
ehofman
5ae096b225 Reorganization of main.cxx 2003-08-17 09:54:41 +00:00
curt
429a5067d8 Make the property tree reading slightly more robust. 2003-07-31 01:43:57 +00:00
david
b8a8d2194a More turbulence tweaks and fixes.
Skip turbulence calculations with magnitude is 0.
2003-07-14 22:34:08 +00:00
david
1691d3ba19 Add the ability to control turbulence rate as well as magnitude.
Square the normalized direction acceleration for the y and z axes, so
that turbulence predominantly affects pitch.

Bind to the /environment/turbulence/magnitude-norm and
/environment/turbulence/rate-hz properties in FlightGear.
2003-07-13 20:13:18 +00:00
curt
1a8fe25cf4 Previously the weather dialog box and environment system had some confusion
between temperature at altitude vs. temperature at sea level.  The dialog
box asked for temperature at altitude which makes sense, but all the
internal crunching expected temperature at sea level.  However, it makes no
logical sense to specify the sea level temperature for different layers so
I changed the internal processing to work with temperature at altitude and
then derive an approximate sea level temperature at the end.

If you know the ground temperature, you can just enter this temperature
for the first boundary layer and the system should do the right thing.
2003-06-24 20:04:29 +00:00
ehofman
ee806b50a1 MSVC fix 2003-06-10 12:03:07 +00:00
ehofman
3c93039bc3 density_slugft3 is used before its initialization 2003-06-10 11:59:17 +00:00
ehofman
414b4ada11 Irix/MipsPro compiler fixes 2003-06-09 08:44:59 +00:00
david
e588cbadd8 Removed FGEnvironmentMgr as a special case in globals, initialization,
etc.

Improved the weather system to interpolate between different
elevations and deal with boundary-layer conditions.  The configuration
properties are now different (see $FG_ROOT/preferences.xml).
2003-06-08 14:47:03 +00:00
curt
21b317ff21 Move simgear/sky/ to simgear/scene/sky as part of the consolodation of
graphics code.
2003-05-30 15:16:57 +00:00
david
27d5965703 Use "coverage" instead of "type".
Rename "mostly-cloudy" to "broken" and "mostly-sunny" to "scattered",
to follow standard weather terminology.

Add "few".
2003-04-05 03:33:01 +00:00
david
eff59b94a6 Do not allow the dewpoint to be higher than the temperature. 2003-04-04 22:38:55 +00:00
david
21b46469ee Make sure the gust wind speed is never less than the base wind speed. 2003-01-20 13:02:18 +00:00
david
cf3e79ee46 Cleanup from Norman Vine to prevent compiler warnings. He also writes:
Note I believe there was a 'missing comma' in the next to last row also
2002-12-30 22:21:31 +00:00
david
f0195b564d Made temperature, dew-point, and pressure at altitude read-only, so
that they won't get messed up during a reset if there are reassigned
before the altitude.
2002-09-07 13:00:20 +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
0d48bae1ef Patch from Cameron Moore:
The patch fixes the uninitialized values by explicitly starting
everything at sea_level values.
2002-06-28 17:41:18 +00:00
david
d982efc4c4 Fix two problems:
1. Typo where /environment/density-inhg instead of
   /environment/density-slugft3 was flagged as archivable.

2. Density should no longer be archivable anyway, since it is
   calculated internally and not directly settable by the user.
2002-06-07 14:23:09 +00:00
david
a08d92e142 Correct temperature value passed to FDM. 2002-06-07 00:15:21 +00:00
david
56642901b5 Air density is now calculated automatically from air pressure,
temperature, and dewpoint.  The /environment/density-sea-level-slugft3
property has been removed, and the /environment/density-slugft3
property is read-only.
2002-06-06 00:21:23 +00:00
david
2df334378f Use factors instead of offset in atmosphere model. The troposphere is
hard-coded for 38,000ft.
2002-06-05 22:30:07 +00:00
david
890c26a9ee Move initial setup of cloud layers to Main/main.cxx to ensure that
they are done only once, and ensure that all properties are untied in
unbind().
2002-06-05 17:45:42 +00:00