1
0
Fork 0
Commit graph

5430 commits

Author SHA1 Message Date
curt
c76aca9a3d Add an additional option. Work around an inconsistency in hardware design. 2009-01-21 09:55:33 +01:00
curt
d95f541528 Add a variant of the ARNAV (AV400) protocol to drive a Garmin 400/430/530
series GPS from FlightGear.
2009-01-21 09:55:33 +01:00
mfranz
b8c0e67cdc one more PUCLASS exception (not that we used puaScrollBar yet) 2009-01-21 09:55:33 +01:00
Tim Moore
270a4093a8 Merge branch 'maint' into next 2009-01-19 21:18:03 +01:00
Tim Moore
ec72392aa5 Fix regression in Vivian's last patch. 2009-01-19 21:12:25 +01:00
Tim Moore
9bb896dd20 Merge branch 'maint' into next 2009-01-18 23:22:06 +01:00
mfranz
aa6e5fb528 disable dragging margins on non resizable dialogs 2009-01-18 23:21:44 +01:00
mfranz
390c1f4d1f - ctrl-click in the property browser is for toggling bools, not dragging
- add vertical arg to sliders (apparently nobody ever use a vertical one :-)
- simplification
2009-01-18 23:21:41 +01:00
Tim Moore
552c3149ae Merge branch 'maint' (early part) into next 2009-01-18 23:21:11 +01:00
timoore
51b686a796 Division by zero fixes from Vivian Meazza. 2009-01-18 23:17:23 +01:00
fredb
5c836d7ae8 Csaba/Jester : initialize all per-engine and per-tank attributes ( follow-up ) 2009-01-18 23:10:52 +01:00
fredb
2d4a87b41c Csaba/Jester : initialize all per-engine and per-tank attributes 2009-01-18 23:10:52 +01:00
Tim Moore
8a756eee54 Merge branch 'maint' into next 2009-01-15 16:16:08 +01:00
Tim Moore
45194f8e81 Pad T_PositionMsg to a multiple of 8 bytes, and check for messages that aren't.
T_PositionMsg had different sizes on 32 and 64 bit systems, which is bad when
a struct is put directly into an network message.

Try to work around this difference in old clients still on the network.
2009-01-15 16:03:34 +01:00
Tim Moore
e108eddc22 FGMultiplayMgr: use binary search to find a property by id 2009-01-15 13:05:23 +01:00
Tim Moore
76958a0382 Merge branch 'maint' into next 2009-01-14 22:32:52 +01:00
jmt
473bf5f731 Apply Ron Jensen's fix for Csaba's atan2() fix. Also remove some dead code,
and use SG_NORMALIZE_RANGE.
2009-01-14 22:31:55 +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
c3d611f7f9 HUD::Ladder::draw was capturing the value of a freed temporary
Fix from Csaba Halász
2009-01-14 11:22:18 +01:00
Tim Moore
736823d032 FGEnvironment: fix broken copy constructor.
Noticed by Csaba Halász.
2009-01-14 09:19:41 +01:00
mfranz
e0463a51ae - shift drag for global window dragging (like ctrl for global resizing)
- cleanup & some coding style unification
2009-01-13 23:07:52 +01:00
mfranz
8c1b1f50a5 don't blindly overwrite user settings -- only initialize if necessary 2009-01-12 13:05:05 +01:00
mfranz
cd4b05909d add property for wildfire propagation 2009-01-12 13:04:52 +01:00
mfranz
a59ae7cb92 fix mouse flicker/disappearing problem 2009-01-12 13:04:44 +01:00
mfranz
16d2de1a0f allow resizing dialogs by grabbing the frame (without Ctrl-key);
Ctrl extends the resize sensible area to the whole dialog
2009-01-12 13:04:39 +01:00
mfranz
1382c81dca add support for resizing mouse cursors
(except on OSX, where OSG uses a default)
2009-01-12 13:04:33 +01:00
mfranz
8605c6f33d only unhide the cursor if it was actually hidden 2009-01-12 13:04:24 +01:00
mfranz
ab58bbd41e hits are consumed by default (prevents actions in lower dialogs) 2009-01-12 13:04:19 +01:00
mfranz
cc0b7e0076 puaLargeInput (textbox) aren't draggable areas 2009-01-12 13:04:14 +01:00
mfranz
014f366369 resize in SE direction (draggable borders planned) 2009-01-12 13:04:03 +01:00
mfranz
95c5a726a7 make dialogs resizable with Ctrl-dragging
At the moment the dialog grows to North-East. Only dialogs with
the <resizable> flag set to true are resizable.
2009-01-12 13:03:55 +01:00
mfranz
79ad3d44b8 create $FG_HOME/Export/ 2009-01-12 13:03:40 +01:00
Tim Moore
35396de6f8 Merge branch 'maint' into next 2009-01-10 00:12:49 +01:00
Tim Moore
da8dd13138 Change the near plane value back to .1
By popular demand...
2009-01-10 00:11:41 +01:00
jmt
9e945e3408 Fix Torsten's crash. A completely cross-platform issue, no idea why it didn't show up in local testing. 2009-01-10 00:07:44 +01:00
mfranz
41da00105c apply custom widget fonts also to the legend, so that they show
up in list/textbox etc. (This should really be separately settable
via style definition, but it's very rarely used and a change now
is probably not worth it as we'll probably switch to osgWidget,
anyway.)
2009-01-10 00:07:15 +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
jmt
2d852024c6 Basic infrastructure to expose type ranges from filters, and hence reduce
how many candidates need to be submitted to the pass() hook.
2009-01-10 00:06:47 +01:00
Tim Moore
8ad7f4eb70 Merge branch 'maint' into next 2009-01-08 09:07:16 +01:00
timoore
17ccf72e44 Divide-by-zero fixes from Csaba Halász 2009-01-08 09:02:19 +01:00
jmt
6f2dc41135 Simpler bearing and distance computations for AIFlightPlan. 2009-01-07 10:39:09 +01:00
Tim Moore
90b2d25671 Merge branch 'maint2' into next 2009-01-07 10:38:07 +01:00
jmt
e98ffd1006 Prevent exceptions in getRunwayByIdent when a malformed rwyuse.xml means
there is no valid active runway. This is not ideal, since it masks underlying
problems - the real fix is to make the runway-use code more robust and
validate input XML.
2009-01-07 10:36:31 +01:00
jmt
e171f0ecdb Rename FGMarkerBeacon to FGMarkerBeacon record, to avoid a clash with the
instrument of the same name. In the future I'd prefer to rename the
instrument class instead (FGMarkerBeaconReciever?) but this is the safest
change for now.

Thanks (again) to Yon Uriarte for pointing out the problem (which seems to
affect MSVC more than gcc)
2009-01-07 10:33:02 +01:00
durk
63d224081e James Turner: Rewrite of the getSpeed function. Smaller and more elegant. 2009-01-07 10:32:25 +01:00
jmt
b0b6a0d998 Fix a bug resulting from my marker-beacon refactoring. Thanks to Yon Uriarte
for spotting the problem.
2009-01-07 10:27:18 +01:00
Tim Moore
030742fa4a Merge branch 'rj/ttw' into next 2009-01-07 10:26:12 +01:00
jmt
0b9e224be9 Patch from Ron Jensen: make the TTW computation marginally less silly. 2009-01-07 10:25:26 +01:00
jmt
e39373cb6a Clean up naming of the 'point on runway' helpers, to get rid of the confusing
notion of a 'displacedThreshold'. Now there's just a real threshold,
displaced or otherwise, and people who care about the paved area can use
'begin' and 'end'. Thanks to John Denker for pointing out the confusion this
leads to. Using 'end' also gets rid of the 'reverseThreshold' name, which was
clearly a bad choice of mine.
2009-01-07 10:22:53 +01:00
jmt
d756f913ec Refactor marker-beacons to be distinct from FGNavRecord. This is a big space
saving for beacons, but since they're surprisingly few (in nav.dat), not a
an enormous saving in real terms. The major motivation is that marker beacons
don't behave like other NavRecords for radio interaction - they have no ident,
frequency or range (in the sense that NavRecord means them).
2009-01-07 10:17:35 +01:00
Tim Moore
89010e6b0a Merge branch 'maint2' into next 2009-01-04 00:25:04 +01:00
timoore
2b0ffae339 Protect against divide-by-zero in setCameraParameters
Found by Csaba Halász
2009-01-04 00:24:49 +01:00
jmt
1a05695ff5 NaN fix by Csaba/Jester - prefer atan2(x,y) to atan(a/y). 2009-01-04 00:24:33 +01:00
fredb
fd043ed56e Temporary hack to avoid NaN problems when _mp is negative (?). Discovered by Csaba 2009-01-04 00:24:20 +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
Tim Moore
871b92ae33 Merge branch 'maint2' into next 2009-01-04 00:19:56 +01:00
fredb
fa769ee4e8 Win32 fixes 2009-01-04 00:19:37 +01:00
durk
632d89d6e7 James Turner: Cleanup of AI traffic route generation code. 2009-01-04 00:17:45 +01:00
Tim Moore
c604514754 Merge branch 'maint2' into next 2009-01-04 00:16:19 +01:00
durk
2b631eeceb Prevent CVS from complaining about unknown files in ATCDCL. 2009-01-04 00:16:06 +01:00
Tim Moore
18d1593c42 Merge branch 'jt/runway' into next 2009-01-04 00:14:09 +01:00
jmt
91bed7b6da Automake on Hardy Heron seems to be considerably more picky about white-
space than previous versions.
2009-01-04 00:08:31 +01:00
jmt
7345a044e0 Split runway and taxiway into separate classes, with a (new) common base.
This makes taxiways smaller (important since at present there are so many).
Restructure the apt.dat parsing code to use a helper class instead of one long
function, and to do less work when parsing the file.

Some of these ideas come from Yon Uriarte's patches - thanks Yon.
2009-01-04 00:08:12 +01:00
Tim Moore
4f18563281 Merge branch 'tbm/graphics-bug' into maint2 2009-01-04 00:05:45 +01:00
Tim Moore
0603aba9ae Merge branch 'tbm/graphics-bug' into next 2009-01-04 00:03:26 +01:00
Tim Moore
43b300fe46 Merge branch 'maint2' into next 2009-01-04 00:01:46 +01:00
fredb
6ccc0b64ef Win32 fixes 2009-01-04 00:00:20 +01:00
fredb
f12b1f00ec Remove warnings 2009-01-04 00:00:02 +01:00
timoore
61a496c2ea Set far camera reference frame to ABSOLUTE_RF
This was lost when I stopped cloning the near camera to make the far
camera. The result was a lot of breakage, including explicit camera
configurations not working and various ordering issues too.
2009-01-03 23:56:58 +01:00
timoore
74031287b4 Set BACKGROUND_BIT as camera node mask.
This prevents the dreaded black rectangle from appearing on systems
that don't have OpenGL frame buffer object support.
2009-01-03 23:56:39 +01:00
timoore
ada7f622d7 Change the order of the main cameras from NESTED_RENDER to POST_RENDER
This seems to be accepted OSG usage for slave cameras. It's possible
that this order is important for rendering instruments that use RTT
textures on systems without frame buffer object support. I'm thinking
that the resulting bugs may be implicated in the "black rectangle" problem.
2009-01-03 23:56:03 +01:00
timoore
60e8f14d5b Don't clone far camera; create a new one and initialize it from the near camera
The clone operation may be sharing things that shouldn't be shared.
2009-01-03 23:55:44 +01:00
timoore
d43e0b83f7 Expose the CameraGroup near, far, and near/far boundry as properties
The near/far boundary, called "near-field", can be set to 0 which
disables the far camera and renders the whole scene using only one
camera. I'm hoping that this may be useful in resolving some
system-specific rendering bugs.

Various fixes were made to correctly render the scene using only the
near camera.
2009-01-03 23:53:04 +01:00
jmt
f1b10eddfa FGAirportList is gone. Everything should work as before, especially the
AirportList dialog. (It would now be possible to trivially implement a
VOR or NDB named search, if anyone wants such a thing).
2008-12-27 13:20:08 +00:00
jmt
b58c8b6f19 Further work (still not enabled) on a fast + correct implementation of the
airportList search function. At least for me (with a mutex-based SGAtomic),
large vectors of referenced-pointers is a Bad Thing - copying on vector
resize is thrashing the locks.
2008-12-27 10:08:12 +00: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
b2d4612beb Fix more test/util linkage for sgmath depending on sgstructure. 2008-12-26 12:38:32 +00:00
jmt
0f4f044a94 Kill off many Point3D includes, and a couple of uses in the HUD code.
Requires a SimGear update to get some new SGGeodesy helpers.
2008-12-26 12:28:05 +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
jmt
988de9dbca Remove all name and spatial queries from FGNavList. All remaining queries are
by frequency (which makes sense), and use the FGPositioned spatial data if
required. As a result, the marker beacon list is gone (since beacons are only
searched spatially). In the process, clean up various minor things - most
notably, all the 'airport-related' navaids (ILS, GS, LOC, and the beacons) now
store a FGRunway* instead of an airport id string. This is more precise, and
saves string allocations.
2008-12-25 23:11:43 +00:00
jmt
02d1b14c1a Finish conversion of FGRunway to a real class - all public members are gone. 2008-12-24 15:45:35 +00:00
jmt
7d5d756095 FGPositioned clean-ups - apply some desirable changes (such as making members
const) which were previously tricky but now easy. Make it possible not to
index certain types (used for taxiways) and exclude anonymous items from
the name index. Related to this, clean up FGRunway further - remove some public
members, and fix a dumb bug of mine, where we create reciprocal entries for
taxiways.

This should make startup (slightly) quicker, and shrinks FGRunway somewhat.
2008-12-24 14:48:30 +00:00
jmt
335584e29c Remove the FGIdentOrdering cruft from FGAirport; now handled by FGPositioned. 2008-12-24 04:58:36 +00:00
jmt
059f2e6a8e Convert the only remaining user of FGFixList to use an FGPositioned query,
and hence remove the query code from fix-list. The only remaining code deals
with parsing fix.dat.
2008-12-23 14:41:58 +00:00
jmt
d6277068f5 (first commit, partly a low-risk thing to sanity check my setup)
Add a helper predicate to FGAirport to encapsulate the common 'does this
airport have a suitable runway of at least xxxx ft?' query. Also add a
FGPositioned filter built on the predicate, and a 'closest airport' helper.
2008-12-23 12:37:59 +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
mfranz
163e593331 viewer position: tie variables directly, rather than getter functions 2008-12-20 12:49:37 +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
curt
231225da67 Attempt to sort out the version number mess in preparation for the v1.9.0
release.
2008-12-19 20:41:57 +00:00
mfranz
df0f0a531f export absolute viewer coordinates 2008-12-19 13:37:54 +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
35f7f55507 Csaba/"Jester" and /me: since a few weeks the property browser had
displayed garbage in the title line if one left a directory. Jester
spent a lot of time finding the cause: a bug that must have been
there since ... forever: fgfs reported to PUI the string addresses
as returned by SGPropertyNode::getStringValue() without considering
that this address isn't valid after the next write access to that
node! It's almost a miracle that it worked so well for so long,
despite that issue. (I also used to opportunity for some more
cleanup -- so I'm to blame for any newly introduced bugs, and
also for reverting some of Jester's cleanups. :-)
2008-12-18 20:18:50 +00:00
mfranz
4560580a4d now that /environment/weather-scenario is respected at startup, we
actually have to set it to get live weather.
--enable-real-weather-fetch shall imply weather-sceneario=METAR.
2008-12-18 13:08:44 +00:00
mfranz
400b5a853e segfault-- 2008-12-18 11:49:33 +00:00
fredb
91420a196e James Turner : in the 'tower' view, where the tower position is explicitly given in apt.dat (most of the larger airports), I was incorrectly treating the tower elevation as ASL, when it's AGL. 2008-12-18 06:52:51 +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