1
0
Fork 0
Commit graph

163 commits

Author SHA1 Message Date
torsten
cef9eb3d73 Clouds in scenario none and metar were above 0ft not above ground elevation, which lead to clouds at or below ground level for high altitude airfields. Reason: For the scenario none, the station_elevation was computed before the terrain was loaded, for METAR scenario station_elevation was not computed at all. 2009-06-03 00:18:54 +02:00
torsten
685132b5d2 wrong value for station_elevation_ft, meters != feet 2009-06-03 00:18:54 +02:00
torsten
a38d050ddf check for dt <= 0 aka paused sim 2009-06-03 00:18:54 +02:00
mfranz
b07ad149ae turn a few #include paths from the "foo" form to <foo>
The quotes form is normally only used for headers with path relative
to the including file's path, though the standard doesn't strictly
mandate this. This is consistent with the rest of sg/fg, it makes the
code's intent clearer and helps to find headers. (And it's a few
milliseconds faster, too.)
2009-05-18 12:24:17 +02:00
mfranz
f1d39fad28 use safer and faster property methods instead of creating property
paths via snprintf+strncat+absolute paths every time
2009-05-18 12:24:17 +02:00
mfranz
3700a42783 use safer and faster property methods instead of creating property
paths via snprintf+strncat+absolute paths every time (more to come)
2009-05-18 12:24:17 +02:00
mfranz
095c710c0e leak fixes 2009-05-18 12:24:16 +02:00
torsten
c8d321f3b9 just in case that someone does not like ridge lift at all, set the property
/environment/ridge-lift/enabled=true
works also at runtime.
And some tiny code optimization.
2009-05-02 00:44:21 +02:00
torsten
1ce2924c28 one final(?) cleanup:
- no need for sign() to be a class member
- rename local ground elevation variable and make it method local
2009-05-02 00:44:21 +02:00
torsten
6af3e0eec3 - avoid duplicate computations
- move local variables out of the class into the methods
- use SG_xxx constants where applicable
- use indexed properties instead of _0, _1, ...
- code cleanup
2009-05-02 00:44:21 +02:00
torsten
2f868fb68e Melchior FRANZ: fix array subscript is above array bounds 2009-05-02 00:44:21 +02:00
torsten
4b9a8ae9e4 Patrice Poly: correction for the lee side
attempt to fix nan issue
2009-05-02 00:44:21 +02:00
fredb
7b20e6caa4 Remove spurious semi-colon 2009-05-02 00:44:20 +02:00
torsten
7e3531ef5c Implementation of ridge lift from Patrice Poly based on an algorithm of Ian Forster-Lewis 2009-05-02 00:44:20 +02:00
frohlich
a99ea1c7b5 Port over remaining Point3D usage to the more type and unit safe SG* classes.
Remove leftover headers from plib/sg.

Modified Files:
 	src/AIModel/AIBase.cxx
 	src/AIModel/AIFlightPlanCreateCruise.cxx
 	src/ATCDCL/AIEntity.cxx src/ATCDCL/AIEntity.hxx
 	src/ATCDCL/AIGAVFRTraffic.cxx src/ATCDCL/AIGAVFRTraffic.hxx
 	src/ATCDCL/AILocalTraffic.cxx src/ATCDCL/AILocalTraffic.hxx
 	src/ATCDCL/AIMgr.cxx src/ATCDCL/ATC.hxx
 	src/ATCDCL/ATCDialog.cxx src/ATCDCL/ATCProjection.cxx
 	src/ATCDCL/ATCProjection.hxx src/ATCDCL/ATCutils.cxx
 	src/ATCDCL/ATCutils.hxx src/ATCDCL/approach.cxx
 	src/ATCDCL/commlist.cxx src/ATCDCL/ground.cxx
	src/ATCDCL/ground.hxx src/ATCDCL/tower.cxx
 	src/ATCDCL/tower.hxx src/Airports/calc_loc.cxx
 	src/Airports/dynamics.cxx src/Airports/groundnetwork.cxx
 	src/Airports/parking.cxx src/Airports/runwayprefs.cxx
 	src/Airports/simple.cxx src/Cockpit/cockpit.cxx
 	src/Cockpit/hud.hxx src/Cockpit/hud_card.cxx
 	src/Cockpit/hud_rwy.cxx src/Environment/environment.cxx
 	src/FDM/UFO.cxx src/FDM/SP/MagicCarpet.cxx src/GUI/dialog.hxx
 	src/Instrumentation/HUD/HUD.hxx
 	src/Instrumentation/HUD/HUD_runway.cxx
 	src/Instrumentation/KLN89/kln89.cxx src/Main/fg_init.cxx
 	src/Main/viewer.cxx src/Main/viewmgr.cxx
 	src/Model/panelnode.cxx src/MultiPlayer/mpmessages.hxx
 	src/Scenery/tilemgr.cxx src/Traffic/SchedFlight.cxx
 	src/Traffic/TrafficMgr.cxx
2009-03-18 08:00:08 +01:00
Tim Moore
0c5e9f46e7 Merge branch 'maint' into next 2009-01-26 09:49:07 +01:00
Tim Moore
194527a59a division-by-zero fix from Csaba Halasz 2009-01-26 09:37:46 +01:00
Tim Moore
b8724644c6 Merge branch 'maint' into next 2009-01-14 11:42:26 +01:00
Tim Moore
ad6a8df3ab FGClouds: initialize clouds_3d_enabled in constructor.
From Csaba Halász
2009-01-14 11:33:00 +01:00
Tim Moore
736823d032 FGEnvironment: fix broken copy constructor.
Noticed by Csaba Halász.
2009-01-14 09:19:41 +01:00
jmt
c9e8112a81 Add various helper filters, to make use of type-ranges, and reduce the need
to down-cast in filter implementations.
2009-01-10 00:07:01 +01:00
Tim Moore
89010e6b0a Merge branch 'maint2' into next 2009-01-04 00:25:04 +01:00
fredb
12dc71a3c0 Csaba/Alexis : fix a NAN problem when wind is unspecified in a metar 2009-01-04 00:24:05 +01:00
jmt
cf42cfab16 Fix up environment code for threading-enabled case, d'oh. 2008-12-26 15:33:38 +00:00
jmt
660d59a098 Another clean-up iteration: FGAirportList::search is gone, replaced by two
static FGAirport helpers. As a result, another global index goes away. Use
the helpers to avoid ugly FGPositioned down-casts in various places.

Also converts the environment/METAR code to deal with FGAirport pointers,
instead of string identifiers, and contains work-in-progress code to implement
the AirportList dialog using FGPositioned. This isn't enabled yet for various
reasons, but is the final piece to allow FGAirportList to be removed.
2008-12-26 15:26:42 +00:00
jmt
82bfb6a08d Clean out FGAirportList - not quite obsolete yet, but the spatial queries are
gone. This is good news, since the old query was implemented as a linear
search, sorted by Manhattan distance, and with a warning not to use the logic
at runtime. Various systems (such as the Mk-VIII) do query such data often,
eg every second.

Also gets Point3D out of Airports/simple.hxx, as a precursor to removing it
completely.
2008-12-26 11:15:00 +00:00
mfranz
ed1369bd8a Stuart BUCHANAN: fix METAR cloud interpolation
"I've managed to fix this by differentiating rebuilding the 3D layers
(e.g. due to METAR updates) from rebuilding the entire environment (due to a
change in scenario)."
2008-12-21 15:52:29 +00:00
fredb
c7b896c8c6 Stuart : The attached patch
reverts one of my changes which ensured that the 3D clouds were updated with
METAR. Unfortunately this had the side-effect of over-writing the environment
properties, and therefore nuking the interpolation work.
2008-12-19 23:11:58 +00:00
fredb
b0b4ab5003 Stuart Buchanan :
Attached is yet another 3D clouds patch, to fix the following:
1) The 3D clouds were not modified by the cloud coverage, due to some problems with osg::Switch
2) METAR changes to cloud coverage were not obeyed.
3) Making changes via the Cloud dialog had no effect unless 3D clouds were toggled.
4) Cloud cover was too sparse.
5) 3D Stratus clouds caused performance issues on some hardware (fixed by removing 3D stratus from cloudlayers.xml - it will now be a 2D layer).
2008-12-19 07:42:13 +00:00
mfranz
400b5a853e segfault-- 2008-12-18 11:49:33 +00:00
mfranz
084ba158b7 Stuart BUCHANAN:
"fixes the issue reported by Martin where
--prop:/environment/weather-scenario=METAR had no effect"
2008-12-17 19:51:18 +00:00
fredb
35f973ece1 Stuart :
the 3D clouds now respect changes to the environment caused by updated METAR etc.

It also increases the AlphaFunc as suggested by Tim.
2008-12-14 18:48:00 +00:00
fredb
cc37d8740c Csaba/Jester : fix an incorrect string comparison in metar 2008-12-13 06:08:22 +00:00
fredb
6a154a59e1 Stuart :
- Removes the cloud type re-use code - I think they aren't worth the graphical artefacts that they cause in light of Tim's improvements
- Changes the transparency of the clouds. Previously, the clouds were transparent at 0m distance, opaque at 200m, then gradually more transparent to the fog limits. This meant they were generally quite transparent. Now, they are opaque from 200m to 15km, then become transparent at 20km. A side effect of this is that the current textures could probably benefit from being made slightly transparent to improve the blending of the sprites against each other.
2008-12-11 08:24:58 +00:00
mfranz
5262e78ed8 slightly more efficient iterator handling 2008-12-07 08:19:54 +00:00
fredb
da940af484 Stuart Buchanan :
- Replaces simple shader attributes with vectors (this was missed out of the last patch by mistake)
- Includes Yon's Fog update code (Thanks!)
- Fixes a bug since 1.0 where --enable-real-weather-fetch stopped the other weather scenarios from working.
2008-12-06 23:03:12 +00:00
fredb
9721d7811f This provides the following enhancements & bug fixes
- Fix the chequer-board bug.
- Add proper cloud coverage function - so scattered clouds are now truly scattered.
- Add real-time control for visibility range.
- Use a limited set of clouds rather than generating a completely new Geode for each cloud. This saves sorting and display time.
- Add controls to Rendering dialog to allow fine-tuning of the number of sprites, cloud visibility and the number of different types of cloud.
- Add some variance to the sort back-off to avoid all clouds being sorted at the same time.
- Pack attributes into vectors for performance
- Re-order the cloud type determination code so that if a cloud layer could either be stratus or cumulus, cumulus is used.
- Lowered the cloud level in the standard cloud configuration slightly so a cumulus layer is generated rather than stratus.

These last two mean that you should see some 3D cumuli if disabling real weather fetch.

My thanks to Yon Uriarte for his help with performance work.
2008-12-04 20:56:40 +00:00
timoore
19d9287d3a Expose precipitation property
from Vivian Meazza
2008-11-25 22:50:04 +00:00
fredb
7b547acbf9 Stuart Buchanan :
It fixes the following issues (to a greater or lesser extent):
1) Performance. Quad trees used to improve culling, and the sprites are placed on the surface of a sphere rather than
randomly throughout the cloud, requiring fewer textures. This saves about 5-10fps on my machine.
2) Disabled 3D clouds have no performance impact. Previously they were still in the scenegraph. Now they are removed.
3) Clouds are now loaded on start-up, and don't require the scenario to be changed, they also work with METAR.
4) The cloud field is shifted as you travel. There's a small bug in that the clouds "jump" as you reach the edge of the field.
5) Iterative sorting of sprites. This doesn't appear to solve the alpha blending problem completely, but may help a bit.
2008-11-06 21:58:50 +00:00
fredb
0fbf965b39 Patch from Nicolas Vivien : don't pour rain above cloud layers, turn rain into snow when temperature is below 0°C 2008-11-02 09:45:31 +00:00
fredb
bc240daaf3 3D clouds from Stuart Buchanan. Need a recent driver update, --enable-clouds3d option and a Weather Scenario to show up 2008-10-26 09:38:21 +00:00
timoore
a18a0593d4 set wind vector for particle systems 2008-09-11 10:29:18 +00:00
ehofman
a1426a812a James Turner:
Switches the MkVIII code to use the same 'closest airport' logic as everything
else, instead of its own special version.
2008-08-15 18:48:11 +00:00
durk
301054204e James Turner: Improved runway management code:
- Runways are now part of an airport, instead of a separate list
 - Runways are no longer represented as a boring struct, but as a class
   of their own.
 -Improved runway access to unify various runway access methods.
2008-08-14 18:13:39 +00:00
durk
a8c27e0cf1 Make sure 'make dist' keeps working. 2008-07-31 17:21:45 +00:00
ehofman
14885374de header cleanups 2008-07-31 12:04:32 +00:00
ehofman
429f2530de James Turner:
* experimental clean-up / reduction on two of the FG headers:
   (I'm going to await feedback on the developers list before doing more of
    these, to avoiding going over files multiple times, but in principle it
    seems pretty straightforward.)

 * final fixes for SG_USING_STD removal
2008-07-29 08:27:48 +00:00
ehofman
667e64e1eb - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
- this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
   extensions.hxx was pulling in all of Carbon to the global namespace
   - very scary. As a result, I now need to explicitly include CoreFoundation
   in fg_init.cxx.
 - change SG_USING_STD(x) to using std::x
2008-07-27 16:25:13 +00:00
fredb
3db0cf1659 Remove unneeded inclusions of windows.h, GL.h and GLU.H 2008-07-27 15:18:34 +00:00
ehofman
d9bfd5a425 This should apply, and everything should build cleanly, in isolation from the
SimGear change. It changes all the SG_xxxx to be the 'real' includes, and gets
rid of many #ifdef SG_HAVE_STD_INCLUDES. As an added bonus, rather than
replacing 'SG_USING_NAMESPACE(std)' with 'using namespace std', I just fixed
the small number of places to use std:: explicitly. So we're no longer polluting
the global namespace with the entire contents of std, in many cases.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another
mechnical change, replacing <math.h> with <cmath> and so on *everywhere*, but
one step at a time)
2008-07-25 18:38:29 +00:00