1
0
Fork 0
Commit graph

4768 commits

Author SHA1 Message Date
frohlich
2e32ccf393 Modified Files:
src/AIModel/AIMultiplayer.cxx: Apply longstanding patch from Maik
	Justus. Fix double aircraft.
2006-11-22 17:16:19 +00:00
frohlich
5d1c390194 Modified Files:
groundcache.cxx: Cheaper ray triangle intersection
2006-11-21 18:25:36 +00:00
frohlich
0adac854dc Modified Files:
renderer.cxx: Fill in that information into the update visitor
2006-11-20 18:16:31 +00:00
frohlich
42528de4ab Modified Files:
src/Main/renderer.cxx src/Cockpit/panel.cxx: Move some more into
	simple scenegraph wrappers. That fixes current problems with
	invisible panels.
2006-11-15 06:07:42 +00:00
durk
e389bed31f Fix for a crash reported by Maik Justus. 2006-11-14 20:08:50 +00:00
frohlich
16aee6ac41 Modified Files:
src/Main/renderer.cxx: Fix some ugly triangle artefacts on the
	bo105's Instrument panel.
2006-11-12 17:22:02 +00:00
fredb
3394d3c840 Don't segfault when sound is not available 2006-11-12 13:54:50 +00:00
frohlich
29778f1496 Modified Files:
src/Main/main.cxx src/Main/renderer.cxx: Avoid an extra clear of
	of the color buffer.
2006-11-12 12:38:57 +00:00
durk
33037b2139 AI Update:
- Ground network slow-down finally works as expected
   (although occasionally causing a traffic jam)
 - Hold position instruction now really sets speed to zero, in addition
   it actually works now for crossing and two-way traffic
 - Attempt to limit execution time of ground network trace algorithm
   to make performance acceptable at high-density networks
 - Removed remaining terminal messages
 - Various minor tweaks and clean-ups
2006-11-11 10:52:05 +00:00
frohlich
bb7c889bbb Modified Files:
src/Time/tmp.cxx src/Time/light.hxx src/Time/light.cxx
	src/Main/renderer.cxx src/Cockpit/panel.cxx: Initialize sky colors
2006-11-10 05:37:50 +00:00
frohlich
9148f9065a Modified Files:
groundcache.cxx: Reorder intersection tests a bit
2006-11-08 20:46:07 +00:00
frohlich
bd97270782 Modified Files:
src/Main/renderer.cxx: Make sure the normalize mode is not set
2006-11-08 20:45:21 +00:00
frohlich
8627dd1669 Modified Files:
src/FDM/groundcache.cxx: Tim Moore: fix for groundcache problems.
2006-11-07 06:09:36 +00:00
frohlich
a8523d94ed Olaf Flebbe: remove unused variable. 2006-11-07 05:39:33 +00:00
fredb
f65abb8a61 Win32 compilation fix 2006-11-02 17:41:53 +00:00
mfranz
a1e62b9c62 remove function declarations for long removed functions 2006-11-01 23:36:46 +00:00
mfranz
8d1ecbfa1b remove obsolete and non-functional menu toggle command 2006-11-01 23:23:26 +00:00
mfranz
65e2ce16d6 remove obsolete preset dialogs 2006-11-01 22:55:15 +00:00
mfranz
4deaed6d99 remove obsolete preset dialogs 2006-11-01 22:48:34 +00:00
frohlich
6e370ce895 Modified Files:
fg_init.cxx: Oops, forgot to commit that chunk
2006-11-01 22:26:57 +00:00
mfranz
284c73a95c remove old property dialog 2006-11-01 22:10:22 +00:00
mfranz
91dbe0c3fe remove old property dialog 2006-11-01 21:59:46 +00:00
frohlich
7e5d6d1d75 Modified Files:
Time/tmp.cxx Main/viewer.hxx Main/viewer.cxx Main/renderer.cxx
	Get rid of an other OSGFIXME. The view matrix had some plib specials
	included. The viewer is now updated for that.
2006-11-01 21:22:25 +00:00
frohlich
b8f9a40fc6 Removed Files:
hitlist.cxx hitlist.hxx: Is obsolete.
2006-11-01 21:14:28 +00:00
mfranz
ef10fcb676 insert punctuation for better festival speech 2006-10-31 11:57:16 +00:00
frohlich
6b9d29194b Modified Files:
src/AIModel/AIBase.cxx src/Main/main.cxx src/Main/renderer.cxx
	Reflect last change in SimGear
2006-10-31 06:27:34 +00:00
frohlich
f62fe07a48 Modified Files:
src/MultiPlayer/multiplaymgr.cxx: Check in long standing broadcast
	multiplayer fix
2006-10-31 06:20:27 +00:00
frohlich
c53eef58e4 Modified Files:
src/Main/Makefile.am: now we need libsgutil ...
2006-10-31 06:19:53 +00:00
mfranz
3bc199c59f ssgSharedPtr.hxx -> SGSharedPtr.hxx 2006-10-30 16:31:45 +00:00
frohlich
b0f9d24f9d Modified Files:
configure.ac src/AIModel/AIAircraft.cxx src/AIModel/AIBase.cxx
 	src/AIModel/AIBase.hxx src/AIModel/AICarrier.cxx
 	src/AIModel/AICarrier.hxx src/AIModel/AIManager.cxx
 	src/AIModel/AIManager.hxx src/ATC/AIEntity.cxx
 	src/ATC/AIEntity.hxx src/ATC/AIMgr.cxx src/ATC/AIMgr.hxx
 	src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx
 	src/Cockpit/cockpit.cxx src/Cockpit/cockpit.hxx
 	src/Cockpit/hud.cxx src/Cockpit/hud.hxx
 	src/Cockpit/hud_rwy.cxx src/Cockpit/panel.cxx
 	src/Cockpit/panel.hxx src/Cockpit/built_in/FGMagRibbon.cxx
 	src/Cockpit/built_in/FGMagRibbon.hxx src/FDM/flight.cxx
 	src/FDM/groundcache.cxx src/FDM/groundcache.hxx
 	src/GUI/gui_funcs.cxx src/Input/input.cxx
 	src/Instrumentation/od_gauge.cxx
 	src/Instrumentation/od_gauge.hxx
 	src/Instrumentation/render_area_2d.cxx
 	src/Instrumentation/render_area_2d.hxx
 	src/Instrumentation/wxradar.cxx
 	src/Instrumentation/wxradar.hxx
 	src/Instrumentation/HUD/HUD.cxx
 	src/Instrumentation/HUD/HUD.hxx
 	src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am
 	src/Main/main.cxx src/Main/renderer.cxx src/Main/renderer.hxx
 	src/Main/viewmgr.cxx src/Model/acmodel.cxx
 	src/Model/acmodel.hxx src/Model/model_panel.cxx
 	src/Model/model_panel.hxx src/Model/modelmgr.cxx
 	src/Model/modelmgr.hxx src/Model/panelnode.cxx
 	src/Model/panelnode.hxx src/Navaids/awynet.cxx
 	src/Scenery/Makefile.am src/Scenery/hitlist.cxx
 	src/Scenery/hitlist.hxx src/Scenery/newcache.cxx
 	src/Scenery/scenery.cxx src/Scenery/scenery.hxx
 	src/Scenery/tileentry.cxx src/Scenery/tileentry.hxx
 	src/Scenery/tilemgr.cxx src/Scripting/NasalSys.cxx
 	src/Scripting/NasalSys.hxx src/Time/light.cxx
	Big BLOB on the way to OSG.
2006-10-29 19:30:21 +00:00
mfranz
74faacdf16 Maik JUSTUS: last changes for better consistency with The FlightGear Way. 2006-10-29 12:44:15 +00:00
mfranz
cf86ca67f8 Maik JUSTUS: replace underscore with hyphen in config keywords, to be
consistent with the rest of YASim and almost all of fgfs
2006-10-28 21:14:32 +00:00
mfranz
edd8c25fae Maik JUSTUS: change /rotors/*/blade1_pos to /rotors/*/blade[0]/position-deg,
incidence to incidence-deg, and flap to flap-deg
2006-10-28 20:53:19 +00:00
mfranz
70bab80507 remove unused and empty files 2006-10-28 18:02:47 +00:00
mfranz
4621db6b7c simplify name/number handling 2006-10-26 17:46:05 +00:00
mfranz
fc98b57b15 simplify name/number handling 2006-10-26 17:39:47 +00:00
mfranz
e63b8b3351 - simplify number/name handling
- consistent member naming
- coding style fixes in clock.*
2006-10-26 15:06:12 +00:00
mfranz
19f3ae5133 - simplify namer/number handling
- consistent naming of members with underscore
2006-10-26 14:47:15 +00:00
mfranz
d90922fe1e - don't read the channel always from tacan[0] (even if the existence of
a second tacan may not be likely)
- remove some dead code
- simplify <name>/<number> handling
- let a listener watch over input props and search for new channel/frequency
- allow to set channel number as one number (rather than as single digits),
  as some aircraft may prefer this (the ch53 does so); this is to be set
  in /instrumentation/tacan[n]/frequencies/selected-channel[0]
2006-10-26 14:09:13 +00:00
mfranz
546d76269a emit signal /sim/signals/fdm-initialized when the FDM is up; this is
useful to attach listeners and have their functions run at a time when
they can safely access FDM generated properties
2006-10-26 09:07:41 +00:00
fredb
9827a79987 Leidson Campos A. Ferreira improved the jpeg http server 2006-10-24 17:51:56 +00:00
mfranz
b4a4e9ea86 Vivian MEAZZA: add missing heading-indicator-dg inclusion (instrument_mgr.cxx)
mf:
- fix abs/fabs bug
- typos & cosmetics
2006-10-24 16:03:44 +00:00
mfranz
eb6b28f507 Vivian MEAZZA: Directional Gyro (DG) compass & electrically powered master
reference gyro
2006-10-23 21:58:28 +00:00
mfranz
43ce93303c drop pointless warning. If the sound can't be removed, then proably because
it was never added, which is perfectly normal when the aircraft started
out of range. (Analog to the DME sound, which doesn't have that warning
either.)
2006-10-20 12:12:12 +00:00
curt
39869b582a Fix a typo so that turbulence can work in JSBSim models once again. 2006-10-19 02:39:05 +00:00
mfranz
bdf16b7b7e use correct data type for string::find() 2006-10-17 21:21:26 +00:00
mfranz
f6244d769c Alexis Bory: revert hack; use correct type for string::find() 2006-10-17 20:39:00 +00:00
andy
3362ea2447 A bug was discovered on IRC where an errant script was setting a nil
value on a property.  This becomes a NaN when converted to a numeric
value, which then percolated into the C++ world where it ultimately
caused a crash in YASim's turbulence code.  While converting nil to
NaN isn't *strictly* wrong, it's dangerous for this reason.  Toss a
Nasal exception instead.  Hopefully this won't break too much
preexisting code.
2006-10-17 19:58:33 +00:00
mfranz
4da02e3d99 Vivian MEAZZA: "Bug fix - make TACAN work with no carrier in the environment" 2006-10-16 11:15:35 +00:00
mfranz
cc3ad61175 cerr don't belong in CVS
use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG!
use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG!
2006-10-12 22:12:09 +00:00
mfranz
8f7df58c94 don't clutter the terminal with meaningless (to all but one developer)
"cerr" messages (SG_LOG/SG_BULK is meant for that)
2006-10-12 21:48:18 +00:00
frohlich
8a67faaf5a Modified Files:
src/AIModel/AIMultiplayer.cxx src/MultiPlayer/mpmessages.hxx
	src/MultiPlayer/multiplaymgr.cxx
	src/MultiPlayer/multiplaymgr.hxx src/Network/multiplay.cxx
	Apply Stuart Buchanan's multiplayer property/chat patch.
2006-10-10 05:17:07 +00:00
durk
77edd7e57e Initial checkin. 2006-10-06 17:37:09 +00:00
durk
666910a793 Major update of traffic manager and AI related airport facilities.
- Moved AIModels/Traffic Manager related AI functions to a new file
- Rewrote the traffic manager so that the containers use pointers to
  objects instead of the objects themselves, which will allow for a
  more flexible memory management.
- Rewrote parts of the airport groundnetwork code, also because the
  stl containers now contain object pointers instead of the objects
  themselves.
- Fixed an uninitialized iterator in the AI distance tracking code
- Fixed flawed logic in some of the traffic controller's while loops
- Added a tower controller, which paces take-off behavior of AITraffic
  in a more realistic way.
- Various other minor fixes and fine tuning.
2006-10-06 17:36:31 +00:00
durk
fee78e5119 Fixed a potentially tiny memory leak. 2006-09-30 05:17:45 +00:00
fredb
ec4887d1d2 Win32 only : Advertise we need a console when the program is linked as a 'Windows' subsystem 2006-09-27 20:18:08 +00:00
durk
8de6a69e3e Adding some more intelligence to the AI system step 2: Added a system to
detect interfering taxi routes and added a "hold position" instruction to
make one of two conflicting aircraft wait until it's route is cleared again
2006-09-19 17:04:22 +00:00
andy
7c445ccb73 Another fix from Maik 2006-09-14 21:05:34 +00:00
andy
77ecc04676 Helicopter update from Maik:
More realistic calculation of vortices at the blades and therefore
 real airfoil parameters can be used now (not to be mixed up with the
 vortex ring state which is still not simulated), ground effect is now
 continuous e. g. at buildings, calculating of the rotor in more than 4
 directions, better documentation of the airfoil parameters.
2006-09-14 18:18:33 +00:00
curt
2c193be0ca Syd Adams:
- Well I finally licked it, the clipping works great now, in 16 and 32
  bpp mode, on 2d and 3d panels.
- I tried glScissors, didnt work because clipping was done in screen
  co-ordinates.
- Stencil buffer methods worked great for 2d panel, but messed up 3d
  panels,(depth buffer problems I think), and only worked in 32 bpp mode.
- I then tried clip planes , and so far it appears to work with no
  problem, and no framerate drop like I had with the stencil buffer
  method...

I'm attaching the panel.cxx file for testing...
2006-09-05 20:28:48 +00:00
fredb
789779d532 Fix missing return statement and unused local variable 2006-09-02 08:10:13 +00:00
frohlich
4ea7fc6327 Attemp to fix the 'bogous tile problem' 2006-08-31 05:07:50 +00:00
andy
2f2d486778 Curt noticed a while back that YASim was producing alpha and sideslip
values that were angles between the aircraft's orientation and the
global velocity vector, not the airflow velocity.  So the HUD velocity
vector was wrong when the wind was non-zero.  Fix that.
2006-08-28 17:24:34 +00:00
curt
03bba2a792 Clear up a line terminator issue between windows/unix. 2006-08-26 14:24:14 +00:00
durk
5b2e16ca73 Ground network distance tracking code. AIAircraft taxiing at airports
maintain a resonable distance from each other while taxiing on the same
route. The current code does not yet take crossing routes or aircraft
taxiing into opposite directions into account.
2006-08-26 07:22:20 +00:00
fredb
905f5a1029 Better encapsulation for personality 2006-08-25 22:16:31 +00:00
curt
e1edf2366a Tested and working under Linux. I have no way to test this under windows.
If there is a windows problem, look very carefully at the line termination
with a serial port monitor.  It should be \r\n (CR-LF), not \n, not \r\r\n
or any other possible variant.
2006-08-22 00:58:25 +00:00
fredb
2fc8a4bb4b Remove compilation warnings 2006-08-21 07:41:23 +00:00
curt
fe86900e57 Make the vertical acceleration rate scale with vertical performance. The
default case for tankers should still be right about the same as where it was.
2006-08-20 23:38:38 +00:00
curt
2d6f291d4f Add an initial implementation of the Garmin 400 series "Aviation In" data
format.  I have a Garmin 295 to test with, but so far I haven't been able
to make this work (code should compile cleanly though.)  I don't know if
I've made a mistake in the protocol or if my 295 just doesn't support this.
More work on this to come.
2006-08-20 23:37:13 +00:00
mfranz
32c39edf44 - make *all* class members start with underscore (not all but two)
- NEVER EVER use leading underscores for auto variables
- don't store values in auto variables for the next function call (not
  even when they start with underscore :-)   This fixed the TACAN
  channel lookup, which was supposed to be done on channel changes only,
  but was always done)
- only do frequency search if frequency has changed (this was apparently
  planned, but not finished; leftover from adf.cxx?)
- don't use double as bool switch
- some minor cleanup
2006-08-20 15:27:26 +00:00
mfranz
5656526d83 as the "Attempting to schedule tiles for bogus lon and lat = (-1000,0)"
bug happens now on a regular basis, and just ignoring it doesn't seem to
cause any harm, just return after it, rather than abort.
2006-08-19 07:30:52 +00:00
durk
e06e9ccd1e Bugfix of problem reported by Mathias Fröhlich: Ground network trace()
algorithm caused a program crash. Because there is always one waypoint more
than there are routes, the trace function should only pop_back the final route
entry at search depths of one or higher. I also added a lot of of additional
safeguarding code, due to the fact that the new trace algorithm was
apparently not as stable as I'd hoped it would be. ...
2006-08-16 09:58:26 +00:00
andy
0838ca6d35 Giant helicopter code update from Maik Justus. 2006-08-14 21:59:44 +00:00
mfranz
ad0921f3e0 print the whole autosave.xml path, not just the filename. Unfortunately,
in the case of fg_init.cxx we'll only see that if the log-level is set
in preferences.xml, because command line options weren't even processed
at that time.  :-/
2006-08-10 11:21:15 +00:00
mfranz
6a6eb2c00b fix log message 2006-08-10 11:12:39 +00:00
mfranz
371419acbf warnings-- 2006-08-08 18:40:18 +00:00
andy
0c109dabbb More warnings, similar issues. 2006-08-08 18:32:17 +00:00
andy
e26481cf0a Fix a few warnings while I'm in there. Melchior poitned out that my default
configure-generated Makefiles don't include -Wall and a few issues had crept
into the code.
2006-08-08 18:23:20 +00:00
andy
90e7c4ec43 Add a lift/drag vs. AoA graph option to the yasim tool, which
generates a data file of aerodynamic lift and drag (and L/D) against
AoA at a specified speed and altitude through a full circle.  Wrote it
to track down the YF-23 superthrust issue, but it wasn't any help.
All the forces look fine.
2006-08-08 18:05:43 +00:00
frohlich
13ce1e48fb Make better use of SGMath 2006-08-08 17:57:33 +00:00
andy
95da644df9 Melchior sent me a property dump of the YF-23 in the wacky superthrust
state.  The only really obvious problem was a giant negative engine
RPM, which happened because of a lack of clamping in the engine code
combined with the YF-23's ability to actually reach speeds near the
engines _vMax value.  It's not clear to me that this will fix the
superthrust issue at high AoA's, but it's an obvious bug nonetheless.
2006-08-08 14:19:15 +00:00
andy
16b11e311c Fixes from Maik Justus:
+ The wing compilation step was accidentally omitting regions that lie
  between the tips and the first/last control object.  That's a real
  problem for wings that contain no controls, and a significant issue
  for those that contain only a few.  I'm stunned that this went
  undetected for so long.
+ The Surface::flapLift() function was oddly returning 1.0 Newtons as
  a minimum, instead of zero.
2006-08-07 16:49:26 +00:00
mfranz
eb38d1f92b remove experimental and unused code (we read the splash screen style
from /sim/gui/style[0] since a while, not from the preferred style.
This allows overriding it from *-set.xml files.)
2006-08-07 15:19:22 +00:00
mfranz
74391d55a1 cosmetics only:
- unify indentation (throw out 2-space indentation; this file uses 4 spaces)
- fix mixed indentation
- remove trailing spaces
- fix a couple of spelling mistakes
2006-08-07 15:16:46 +00:00
mfranz
d84043fbe2 move GL_TEXTURE_LOD_BIAS_EXT one section up and document what it does
(this was the reason why the first two text lines on the splash screen
looked more blurry than the others). BTW: I played with other values
than -0.5, but this turned out to be the best already. It makes textures
sharper than 0, but not too sharp (and thus flickering).
2006-08-07 15:11:46 +00:00
mfranz
6ce68a226a remove confusing error message that leads first-time users on the wrong
track and is a PITA for support staff. It's this message:

Error reading properties:
Failed to open file
 at /home/newbie/.fgfs/autosave.xml
 (reported by SimGear XML Parser)
2006-08-03 09:37:31 +00:00
mfranz
010e03fab4 throw out "zoomed" tapes. These drew 60% of the scale with bullets rather
than tick marks, and looser (zoomed) than the other 40%. Rationale:

- this was only used in *one* tape of *one* HUD ("custom")
- it's not in the MIL-STD!
- doesn't seem very useful
- relies on integer scale values, while we now have float values in the new HUD

This feature would have had to be rewritten anyway. If someone needs it and
can come forward with a (MIL-)STD description, then it can be added to the
existing tape generator again (using a value->screen-position mapper function).
Otherwise it's simply declared dead.

(Yay, one TODO and a few FIXMEs less.  ;-)
2006-08-02 15:34:33 +00:00
mfranz
46efbb0801 - "almost zero" is zero
- improve/add <format> warning
2006-08-01 21:43:13 +00:00
fredb
d0f8f8351b Avoid redefinition in the same prototype 2006-08-01 21:16:56 +00:00
mfranz
2f8a476c3a add optional <format> property for <tape>s 2006-08-01 21:11:38 +00:00
fredb
762c7ddb89 Olaf Flebbe : MSVC 2005 fix because time_t is defined as __int64 and there is no abs for this datatype 2006-08-01 21:09:26 +00:00
mfranz
b1a4fa24d4 cosmetics 2006-08-01 18:46:59 +00:00
mfranz
3f1af3334f fix no-hole ladder (not that I think this mode will enjoy a long life) 2006-08-01 18:07:26 +00:00
mfranz
866b7c0cbb fix vertical tape gap 2006-08-01 17:25:51 +00:00
mfranz
cc10e1986f use assignment operators (to my defense: the *x/*y were different on both
sides of the equal sign at some time ... :-)
2006-08-01 15:49:29 +00:00
mfranz
4419aa2cb3 - make the alignment function a static HUD member (for namespace
encapsulation, but a real namespace would probably be better)
- extend alignment to optionally adjust x/y, and to return absolute
  l/r/b/t coordinates (as opposed to plib's relative ones!)
- implement tape gaps as per Curt's order  :-)
- shuffling stuff around for fun
2006-08-01 15:31:15 +00:00
frohlich
6afe252440 Use bool where the source and destination variable is bool. 2006-08-01 05:56:49 +00:00
mfranz
46a70b21a6 whoops 2006-07-31 19:32:02 +00:00
mfranz
651861dfb1 cleanup 2006-07-31 19:25:41 +00:00
mfranz
f3dd7c363c draw dive lines always from the center, so that the stipple pattern is
symmetrical
2006-07-31 18:09:13 +00:00
mfranz
3abd816f46 cosmetics & cleanup 2006-07-31 17:36:27 +00:00
mfranz
acc3230fd0 remove obsolete text_width() function (a similiar function will be made
a method of TextList)
2006-07-31 16:56:15 +00:00
mfranz
5bb3eb260b use HUDText adjustment (gauges with text aren't used anywhere, and this
change is untested for now)
2006-07-31 15:57:39 +00:00
mfranz
8cd9535660 use HUDText adjustment 2006-07-31 15:36:48 +00:00
mfranz
ece7aee8a9 - use correct ladder bar angle
- minor dive angle number adjustment
2006-07-31 14:25:09 +00:00
mfranz
3cba94018b - move HUDText constructor/methods to HUD.cxx
- add generic text adjustment and
- use it in the ladder: climb -> vert bar on the outside, numbers below line
                        dive  -> vert bar on the inside, numbers above line
2006-07-31 13:10:26 +00:00
fredb
e35afbdec7 Suppress warnings : remove unused local variables. Use correct, initialized, variables. 2006-07-30 21:04:29 +00:00
mfranz
6a832d0d07 remove temporary fix 2006-07-30 08:08:51 +00:00
mfranz
f012620134 remove unused options & add two new ones 2006-07-29 19:45:17 +00:00
durk
8c2e595ff0 Spectacular improvement in traffic manager initialization and preparatory
work for ground based distance separation of AIAircraft.

Traffic manager initialization related changes:
- Schedules initialize "on the fly", instead of during initialization
- Invalid routes are no longer deleted, but marked as BOGUS and ignored
- Changed loading order from a distance based prioritization to a point-
  score based prioritization, resulting in a much faster establisment of
  AIAircraft near the user's plane.

Preparatory work for ground-based separation of Aircraft.
- The groundnetwork findShrortestRoute function not only returns a list
  of waypoints, but also a list of taxi "segments" (a.k.a. taxiways).
- The taxiway list is stored in the Flightplan, and updated everytime
  a new taxi leg is created.
2006-07-29 18:17:19 +00:00
fredb
46a3200569 Win32 fix 2006-07-29 09:27:50 +00:00
fredb
19dd8133aa Remove ambiguities 2006-07-29 09:22:24 +00:00
curt
d9723e6805 Specify "clip planes" as a separate independent option (not implied from
the type option.)  The clip area is and has always been hard coded, but at
some point we should make it configurable.
2006-07-28 20:17:58 +00:00
mfranz
1576fc1050 reduce marker gap 2006-07-28 18:41:12 +00:00
curt
183fffaa08 Simplify dynamic ladder motion option. 2006-07-28 18:37:33 +00:00
curt
8c38bd4427 Remove some junk.
Note: the previous commit angles the negative ladder marks progressively more
steeply as per MIL-STD.
2006-07-28 14:32:40 +00:00
curt
cccdbddddd Add an option to get a realistic climb dive ladder without all the other
implications.

Fix the ladder so it "moves" around in the hud correctly based on alpha/beta
offset projected onto the horizon line so the horizon is always the horizon.
2006-07-28 14:22:08 +00:00
mfranz
08d1b7748f <option>top</option> draws tbi on top (vertically mirrored) 2006-07-28 10:11:34 +00:00
mfranz
7c3711bcdf - fix turn bank indicator (bank scale type)
- cleanup
2006-07-27 23:34:11 +00:00
mfranz
8a482acf8f SGMiscf isn't known yet: add workaround 2006-07-27 17:12:37 +00:00
frohlich
cdb725528d Clean up scenery center handling. It is set now less often. 2006-07-27 16:36:22 +00:00
frohlich
75f0dcbb1d Add missing includes required to compile 2006-07-27 16:13:37 +00:00
durk
943b1b8e79 Enable the airway database parsing. 2006-07-27 14:49:41 +00:00
durk
10ebe06285 Initial commit of code that reads and parses Robin Peel's awy.dat airway
files.
2006-07-27 14:44:09 +00:00
durk
402046e580 AI Modifications: 1) Added a patch that takes ground speed into consideration
using Curt's new speed adjustment code. 2) Separated the function
FlightPlanCreateCruise() into a new source file in preparation of a more
elaborate airway following scheme.
2006-07-27 14:42:15 +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
curt
f30f4b866b Add support for drawing target markers (circles on top of any AI/MP aircraft)
as part of the conformal HUD ladder.
2006-07-27 02:46:14 +00:00
curt
5fc834f7f5 Attempt to shore up the numerical stability of the AI aircraft movement
computations.  This is probably not needed, but use double's consistently.
2006-07-27 02:27:43 +00:00
curt
1c2a3cc5ac White space ... 2006-07-27 02:26:30 +00:00
curt
f9badcf329 Remove side-slip (aka beta) from the heading offset of the target aircraft.
This is already accounted for in the true heading of the aircraft.
2006-07-27 02:25:58 +00:00
curt
f31088070c Fix a class of problem that could lead to needless extra time "jitter" in the flight dynamics
calculations.  We run the FDM at 120hz and compute how many loops can fit into each FG loop.
Floating point rounding could lead to a situation where we could end up running
1, 3, 1, 3, 1, 3... loops of the FDM when in fact we want to run 2, 2, 2, 2, 2...

If we artificially inflate ml above by a tiny amount to get the
closest integer, then subtract the integer from the original
slightly smaller value, we can get a negative remainder.
Logically this should never happen, and we definitely don't want
to carry a negative remainder over to the next iteration, so
never let the remainder go below zero.
2006-07-26 14:18:06 +00:00
mfranz
5d10e338d5 no more FONT_(LARGE|SMALL) (didn't work, anyway, and isn't needed) 2006-07-25 22:21:56 +00:00
mfranz
9799f05bb7 finally fix the text-in-box alignment (= Rocket Science[TM]!)
(This will be moved to HUD_instrument.cxx, where it will be available to
all draw_text() users.)
2006-07-25 20:05:52 +00:00
mfranz
89d56f0c60 define label box pointer via <pointer-width> (width of base) and
<pointer-length>
2006-07-25 07:07:34 +00:00
mfranz
447c06ecd3 I've heard that endless loops aren't overly popular. 2006-07-24 17:52:20 +00:00
mfranz
77019014d6 8 is a bit too much for <marker-offset> default; use 5 2006-07-24 17:46:08 +00:00
mfranz
04818a4bc7 no longer let top==left and bottom==right. This is necessary for label-box
pointers, and may introduce bugs elsewhere. Not that I've notice any yet.
2006-07-24 17:35:34 +00:00
mfranz
7a52695de0 first stab at label box pointers. <option>top</option> on a <label> makes
such a box:

    _____/\_____
    |   Booo   |
    |__________|

likewise with options bottom, left, right. The size can be set via option
<marker-offset> (analogous to <tape> offsets), which describes the distance
from the base to the peak. Default: 8 px
2006-07-24 17:09:03 +00:00
mfranz
a6c8610682 make old HUD code work with 8 px font size 2006-07-24 16:02:56 +00:00
mfranz
bd9ec88355 - don't use 10 pt font size for width calculations, when in fact we use
a 8 pt font (set 8 pt in preferences.xml, too)
- fix vertical alignment of digits in label and ladder (temporary
  solution -- the whole font handling needs to be reviewd and fixed)
- simplify nadir and zenith (they always want to be horizontally centered
  on the ladder lines, no?)
- simplify and abstract label box drawing (no need for stippled side lines)
- align text (more) correctly in label boxes
2006-07-24 16:00:18 +00:00
curt
b010480bfb Switch sign of beta/drift. 2006-07-23 17:47:23 +00:00
mfranz
52ceea2048 cleanup (getBoolValue() returns false by default) 2006-07-23 16:57:13 +00:00
curt
a91afd2482 Re-implement the flight path marker (aka "velocity vector") so it's position
is computed from alpha and beta.  Before the code U, V, & W body velocities
to compute alpha/beta.  Why not just use the values directly.
2006-07-23 16:41:18 +00:00
mfranz
0289cfcb36 - use Item::draw_circle() to draw circles (waypoint marker still to be done)
- move variable declaration near their first use (c++ style rather than c)
- rename (zenith|nadir|hat) to enable-(zenith|nadir|hat) and make them bool
  (for consistency reasons)
2006-07-23 08:14:03 +00:00
mfranz
4ce94a0ec4 reticle should fit into bounding box (don't take diameter as radius) 2006-07-22 17:27:43 +00:00
mfranz
f620af29cd don't be afraid of the comma operator! 2006-07-22 11:48:22 +00:00
mfranz
64502bdb80 get rid of struct Point and get_centroid(). Instruments may access *their*
properties directly. This is properly encapsulated already.
2006-07-22 10:09:36 +00:00
fredb
5c101b8021 Win32 fix 2006-07-22 08:49:47 +00:00
mfranz
a5125b6124 add MIL-STD-1787B Aiming Reticle (stadiametric; TODO: standby) 2006-07-22 08:00:56 +00:00
curt
aad3c711a1 Add support for a back-course mode. Nothing changes visualy, but this
reverses the autopilot helpers so that the FD/AP can properly fly a BC appr.
2006-07-21 19:37:04 +00:00
curt
ae62896f9f Small tweaks to point lighting configuration to better control the appearance
of approach rabbits.
2006-07-21 15:48:57 +00:00
curt
0cec9290db Add a configuration property to turn on/off the use of point sprites.
Generally you want point sprites for performance reasons when enhanced runway
lighting (and smooth points) are activated.  Most hardware doesn't
accelerate the rendering of standard smooth points, so without point sprites
you will kill your night time performance if you turn on enhanced runway
lighting.

Note that enhanced runway lighting "breaks" our clever scheme to make the
runway lighting brightness vary with the relative view angle.  This means
with enhanced lighting on, all lights are equally bright no matter what
direction you view them from.  So perpendicular runways are just as bright
as runways you are directly lined up with (when enhanced runway lighthing
is activated.)

You can revert to the original lighting scheme by turning off enhance runway
lights, turning off distance-attenuation, and turning off point-sprites in
the rendering options menu.
2006-07-20 03:47:39 +00:00
curt
5831d99fc0 Always check for if glPointParameterIsSupported, even if we haven't asked
for point light distance attenuation, because we may want to toggle this
on via the rendering options gui.
2006-07-20 03:43:07 +00:00
andy
503cc54a93 Rework the naModLock()/naModUnlock() semantics to be more
maintainable.  The rules are simple (extension functions are called
*with* the lock, which must be dropped before calling naCall(), which
grabs it) but the tracking of when the lock was held was getting a
little confused.  Keep a "nasal call depth" count in the subsystem to
figure out whether we are making a sub-call and thus hold the lock.
2006-07-19 19:46:53 +00:00
curt
c1d06064c8 - Code cleanups.
- Fix a warning about class member initialization order.
- Clear up a problem with the default autopilot behavior on the back side
  of an ILS in preparation for adding a real "back course" approach mode.
2006-07-18 21:35:11 +00:00
mfranz
98cd4a9086 only consider positive airspeed in longitudinal axis 2006-07-17 18:14:31 +00:00
ehofman
a4265a3b0a Use one standard define for enableing of the Special Purpose FDM code. 2006-07-17 17:58:53 +00:00
mfranz
4914844c31 ... but then again: it's only a rumor that listeners on tied properties
don't work. And like most rumors, it's untrue. So just output a debug
message.
2006-07-16 11:48:22 +00:00
mfranz
1841bd7343 - complain about attempts to attach a listener to a tied node
- do *not* complain about a listener writing to its own node, but don't
  enter recursion either
2006-07-16 11:30:33 +00:00
mfranz
a952ed210f whoops ... don't let the new HUD turn off 3D mode in the old one :-) 2006-07-15 18:15:00 +00:00
mfranz
722fb05ce7 bracesless blocks are peanuts! It's forgotten "else" that do real harm. :-) 2006-07-12 20:54:27 +00:00
curt
674df0c4cd Add a "ufo" performance entry for the AI Aircraft. This gives very agressive
accel/decel and climb/decend performance which is useful for some scripting
scenarios.
2006-07-12 19:10:35 +00:00
curt
cf325ce088 Fix a small typo. 2006-07-12 15:11:47 +00:00
mfranz
d94e691f1e - read new HUD from /sim/hud/path[1] (was: /hud)
- cosmetics
2006-07-11 16:09:35 +00:00
mfranz
7ae6dd709a don't let invisible objects prevent dragging (for example: currently
not shown combobox menus)
2006-07-10 14:56:07 +00:00
mfranz
62bdd89fd7 - unify coding style (though not to the last detail)
- remove trailing spaces
- fix mixed indentation (tabs -> 8 spaces)
- throw out braindead FSF coding style that has somehow sneaked in
2006-07-10 11:36:38 +00:00
mfranz
2c20ef1c7f - untangle classes (methods of two classes were interwoven)
- fix mixed indentation (tabs converted to 8 spaces)
- remove trailing spaces
2006-07-10 07:59:20 +00:00
durk
d68723f3da Time initialization fixes. 1) Offset types "system-offset", "gmt-offset",
and "latitude-offset" should not use a precalculated value of warp.
2) Since the values of cur_time and crrGMT are identical in the current
version of the SGTime class, the calculations of the "system", "gmt", and
"latitude" are re-evaluated and updated where necessary.
2006-07-09 08:02:47 +00:00
mfranz
f339304c33 - more <tape> fixes
- make ladder numbers symmetrical (hackish)
- fix font BBox/str_width calculation
2006-07-06 21:46:50 +00:00
mfranz
5000731c03 fix <modulo> feature (required for the compass tape) 2006-07-06 16:46:25 +00:00
mfranz
6c8ae0df1f warning-- (not that it matters -- this code has yet to be converted) 2006-07-06 14:43:41 +00:00
mfranz
df2d876f72 - fix unzoomed tapes (TODO: restore tick length)
- get rid of braindead "struct Rect", where top meant y, and bottom meant height
- cleanup^3
2006-07-06 14:30:18 +00:00
mfranz
92272b5740 set altitude AGL 2006-07-06 14:24:14 +00:00
mfranz
42c3d8867f - cleanup of the day (more finegrained change history in my local cvs)
- <damp>ing coefficient is now 1.0 - 1.0 / pow(10, damp)
2006-07-05 22:55:33 +00:00
mfranz
80bada55cd remove redundant vector::clear(). A just created vector *is* clear. 2006-07-05 09:39:46 +00:00
fredb
9db2b4f22d Remove MSVC warnings 2006-07-05 06:28:37 +00:00
fredb
61419e83d8 Win32 fixes 2006-07-05 06:22:05 +00:00
mfranz
2c7e01133f Stefan Seifert:
- read bindings from template
- automatic deadband detection

mf:
- write js name into output file
- poor man's progress bar during deadband detection
- fix header inclusion, fix mixed indentation
2006-07-04 23:29:05 +00:00
mfranz
1d0b6290c4 - collect drawing primitives in the Item base class
- rename circle to draw_bullet, which is more correct
2006-07-04 21:04:22 +00:00
mfranz
eb69a4bd4b - don't store immutable states as strings (sigh!)
- class members start with underscore
2006-07-04 17:25:14 +00:00
mfranz
e46036d55f initialize HUD class and call its drawing routine from renderer
(basically a NOOP if /sim/hud/visibility[1] is false)
2006-07-04 15:54:41 +00:00
mfranz
0beba6c967 add new HUD to build system 2006-07-04 15:52:09 +00:00
mfranz
c6cbef666a new HUD (work in progress) 2006-07-04 15:32:55 +00:00
mfranz
8de07e024e make clear that "Failed to find runway ..." doesn't have fatal consequences 2006-07-01 16:00:27 +00:00
andy
a6661b43e0 Patch from Mathias: unify the AGL altitude with the other FDMs, but preserve the distance-to-touchdown metric in the gear-agl properties. 2006-06-26 17:59:58 +00:00
mfranz
2a40f9876f add GSDI (Ground Speed Drift Angle Indicator) instrument for helicopters 2006-06-25 12:36:19 +00:00
mfranz
7647b1620b cosmetics:
- fix indentation
- remove trailing spaces
2006-06-24 07:48:05 +00:00
mfranz
095efc1fcf Josh BABCOCK:
"Here is a patch that allows marker beacon volume to be set via
/instrumentation/marker-beacon/volume."
2006-06-24 07:43:09 +00:00
curt
98c03f95e1 Vivian Meazza:
I attach 2 new files and a diff file for the associated changes to add a
“fluxgate compass” to the instrument inventory. Whist this outputs
essentially the same data as /orientation/heading-magnetic-deg, it has to
be powered, and can be made to fail. I also followed Roy’s suggestion to
generate the error properties for this instrument here rather than in
xmlauto.xml.

When this instrument is included in cvs, I intend to use it in the Hunter,
A4F Seahawk and KC135. After a bit more research, it might be appropriate
for the Spitfire and Hurricane as well. AJ would also like to use it for his
Lightning model.
2006-06-24 03:42:30 +00:00
curt
bcd9b071c5 Create a "passive" mode for the autopilot. This is analogous to running the
autopilot with the servos off.  In otherwords, the computer goes through the
motions of computing the desired behavior (pitch or roll) but doesn't actually
drive the outputs.  This is potentially useful when implimenting a flight
director.
2006-06-24 00:52:20 +00:00
curt
e7ed073c68 - Make two variable name modification to clarify units: altitude -> altitude_ft
and tgt_altitude -> tgt_altitude_ft.  Also fix a comment in AIBase.hxx
  indicating that the altitude is in meters, even though the usage throughout the
  code was most definitely feet.

- In AIMultiplayer.cxx, update the altitude_ft variable so that the altitude
  is reported correctly in the entity's property subtree.

- In AIMultiplayer.cxx, compute a velocity value in kts to fill in the speed
  entry in the entity's property subtree.  Note, this is not an earth centered
  reference speed, not an indicated speed and not a speed relative to the local
  airmass (that would be much harder to do.)
2006-06-24 00:00:27 +00:00
mfranz
d702ed379d ok, so the old ~FGFontCache() was useless. But at least it didn't call
the buggy ~fnt(), causing an abort() ...   ;-)

(Only loaded texture fonts (*.txf) have a new'ed puFont. The built-in
pixmap fonts don't, and may, thus, not be deleted.)
2006-06-22 08:35:50 +00:00
curt
94badeabcd Existing ground track estimation code depended on current_value - last_value
each frame.  However, often these values didn't change leading to bogus data
getting introduced into the computational pipeline.

This patch switches to a much more sane method for ground track computation.
2006-06-21 21:23:20 +00:00
mfranz
229d499f7b oh, and by the way: this destructor didn't do anything useful :-) 2006-06-21 21:17:21 +00:00
mfranz
124dfab5ae umm ... fix a tiny leak :-) 2006-06-21 19:53:47 +00:00
mfranz
2a1077dae3 - auto_ptr.hxx: not used anywhere; functionally replaced by
simgear/structure/SGSharedPtr.hxx
- fg_stl_config.h: only used by obsolete auto_ptr.hxx
2006-06-21 09:36:15 +00:00
mfranz
cd3be41386 Vivian MEAZZA:
"Bugfix - a fix to fix the hack which hacked the TACAN Channel/freq
pairing."
2006-06-19 10:00:25 +00:00
mfranz
ef2bc6227a set blend mode back to make 2D panels opaque when used with transparent HUDs 2006-06-17 19:09:38 +00:00
mfranz
2360487b19 getGMTstring: remove leading space, cleanup 2006-06-17 18:25:12 +00:00
mfranz
b0271d17db - add direction letter to numeric mode, too
- avoid negative sign on 0.00
2006-06-17 18:08:53 +00:00
mfranz
fb1b1d98d3 remove lon/lat string representation generating functions; this is now
done in Main/fg_props.cxx and available via /position/{long,lat}itude-string
2006-06-17 16:40:51 +00:00
mfranz
e2deb397a9 remove obsolete "lon/lat format" commands that have been labeled "deprecated"
and "will very soon be removed" since years
2006-06-17 16:37:33 +00:00
mfranz
af0ad80b51 move generation of lon/lat string representations here from cockpit.cxx.
Thanks to tied functions, this is only executed when the node is read. This
will be done by the old & new HUD code, the latter of which won't have a
special lon/lat mode at all. Instead it will be regular labels that point
to these properties for displaying lon/lat.
   I would have liked to avoid the duplication of code (lon and lat being
basically the same thing), and to avoid using static buffers and all, but
... if anyone wants to make it prettier, go ahead.
   The format is controlled by /sim/lon-lat-format (will be changed if I
find a better place).
2006-06-17 16:33:00 +00:00
mfranz
890fa81c7e - remove unused classes lat_label and lon_label (it's the instr_label
that makes the lon/lat labels)
2006-06-16 19:29:34 +00:00
curt
4fade5839e Add a flag that allows the simulator to force "radar" computations even if
AI aircraft are out of range or the piloted aircraft has no radar system.

These computation include range, bearing, and angular offset relative to the
piloted aircraft.  This gives some external script the control the behavior
of the AI aircraft relative to the piloted aircraft without requiring a radar
system, and without requiring the AI aircraft to be within radar range.
2006-06-16 19:10:20 +00:00
curt
943b7b22a7 This patch only affects aircraft (AI Models) that have no predefined
flightplan.  Such aircraft are given some initial conditions that they
fly with.  They proceed on in "freeflight" mode indefinitely.  For example,
there is a refueling demo where the tanker starts at 3000', 280 kts, and
in a 15 degree bank, and then continues to orbit indefinitely.

For these aircraft with no flightplan, I have added several control nodes in
controls/flight that allow a script or menu or external application to set
heading, altitude, bank angle, and speed.  This permits some level of interactive
or scripted control over AI aircraft.
2006-06-16 14:22:21 +00:00
fredb
c5a7267206 Compile again on Win32 platforms 2006-06-16 10:17:06 +00:00
mfranz
038e047e8f - move FloatToInt() function to simgear/math/fastmath.hxx, renamed to
float_to_int() for consistency reasons
- remove hud_opts.hxx
2006-06-16 09:31:34 +00:00
frohlich
ef52b23e3a Make more use of SGGeod 2006-06-15 19:16:21 +00:00
mfranz
d336553d75 - make function table and lookup function
- make unnamed elements explicitly "[unnamed]"
2006-06-15 18:09:15 +00:00
mfranz
ed7ee6b534 - fix two bugs
- remove yet more unused code
- cosmetics
2006-06-15 16:03:27 +00:00
frohlich
d11ec8c8e7 Don't bail out for lon == 180 or lat == 90 2006-06-15 08:55:42 +00:00
frohlich
c2d8dcc18b More use of SGGeo[dc]. 2006-06-15 08:29:43 +00:00
mfranz
7327e35020 remove the rest of the static variables (except one); cleanup 2006-06-15 00:21:06 +00:00
mfranz
4e8a89c9c0 remove readCard() and let the hud_card class read its properties 2006-06-14 23:27:55 +00:00
mfranz
9e2de090b4 remove readCard and let the gauge_instr class read its own properties 2006-06-14 20:39:10 +00:00
mfranz
b32aa5086a remove readRunway() and let the runway_instr class read the properties in
the constructor
2006-06-14 18:41:36 +00:00
mfranz
d1a9512c91 remove readTBI() and let the fgTBI_instr class read its properties 2006-06-14 16:57:38 +00:00
mfranz
ddda2c68d5 - remove hud.cxx/readLabel and let the instr_label read its properties
- remove unused copy constructor
- fix potential crash bug
2006-06-14 16:23:44 +00:00
mfranz
812275cf15 remove readLadder(const SGPropertyNode *) and make the HudLadder
constructor read its properties on its own
2006-06-14 12:49:27 +00:00
mfranz
471fecd72c indentation, trailing spaces, ... (cosmetics only); doesn't make
the coding style fully consistent yet, but it's good enough for code changes
(mixed tab/space indents, 4 space tabs etc. are a royal pain)
2006-06-14 10:30:10 +00:00
mfranz
e545c563d5 remove assignment operators: they aren't used now and won't in the future 2006-06-13 15:00:31 +00:00
mfranz
0b0c681775 indentation, trailing spaces, alignment, ... (to make further work easier) 2006-06-13 14:48:19 +00:00
mfranz
b674037a3c - fix more cases of scale tick aliasing to get smooth scale movements
- remove trailing spaces, fix indentation, unify coding style, ...
2006-06-12 23:27:55 +00:00
mfranz
365546444c fix ugly aliasing effects in moving scales (caused by integer calculation
of tick coords)
2006-06-12 22:27:10 +00:00
mfranz
9edd0a1ea4 - remove trailing spaces
- fix indentation, alignment and other formal stuff
2006-06-12 21:34:47 +00:00
mfranz
5fa474e209 - remove evil exit()
- remove "enabled". It's unused, and that's a good thing: it wasn't
  initialized.
2006-06-12 15:39:38 +00:00
mfranz
79abf11466 add Nasal/Listener hooks for adding/removing AI/MP models. Things like
MP chat or Nasal/xml based radar instruments need that. It uses fgSetString,
because this is in a very "cold path" and shouldn't clutter the AIBase.
2006-06-11 15:32:18 +00:00
mfranz
56d8181da3 remove the "ai_model" subsystem manually before the other subsystems
are taken down by the C++ runtime environment. This will later be done
with runlevels. Why would we want to run nasal code in subsystem
destructors? We don't really. But some data structures may use nasal,
which are normally created/destroyed during runtime. And these will
also be destroyed at fgfs exit. In the past things like these didn't
happen, because someone had disabled all subsystem destructors ...
2006-06-11 15:18:48 +00:00
frohlich
14fe03ba6f Modified Files:
src/AIModel/AIAircraft.cxx src/ATC/AILocalTraffic.cxx
	src/FDM/flight.cxx src/FDM/flight.hxx src/FDM/groundcache.cxx
	src/FDM/groundcache.hxx src/Main/fg_init.cxx src/Main/main.cxx
	src/Scenery/hitlist.cxx src/Scenery/hitlist.hxx
	src/Scenery/scenery.cxx src/Scenery/scenery.hxx
	Make use of the attached SGMaterial reference userdata on scenegraph
	leafs. Make the SGMaterial pointer available to the ground query
	routines.
2006-06-11 13:34:18 +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
c4463b311c make sure the "nasal" subsystem is one of the last to be removed. That
way it can still process listener code during shutdown.
2006-06-10 22:24:05 +00:00
mfranz
00f3d1db80 - remove listener in ~FGNasalListener(), not FGNasalSys::removelistener
- delete all listeners in ~FGNasalSys()
2006-06-10 22:21:22 +00:00
mfranz
dee302354f the special line width doesn't make much sense, as it's only applied to the
arrow head marks. It was probably thought for all lines, but as those are
wide enough, I just comment that out for now.
2006-06-10 15:25:48 +00:00
mfranz
14addaab07 treat colors like the other parameters: only copy them from the palette
color group /sim/hud/palette/color[*]/ to the active group /sim/hud/color/
if they really exist. (Parameters like <antialiased> can be set in the
active group and be left alone, or set by each <palette> color group.)
2006-06-10 09:22:27 +00:00
mfranz
b2b9a32e4b consider new HUD path. It doesn't seem to make sense to put "antialiased"
into the <color> group, but that's because on HUD color changes a whole
"color" set from /sim/hud/palette/color[*] is copied to /sim/hud/color/, and
antialiasing needs to be considered with that. (I'm not entirely happy
with the property names yet.)
2006-06-10 07:23:15 +00:00
mfranz
925e1578cd - remove lots of traling spaces
- fix indendation and alignment
2006-06-09 21:29:40 +00:00
mfranz
265e411791 - add transparency option
- comment out date/time ... this needs to be added to the HUDs that need it
2006-06-09 20:37:16 +00:00
mfranz
942561d64c - remove trailing spaces
- fix many cases of broken indentation (but not all)
- unify indendation
- ...
2006-06-09 18:48:57 +00:00
mfranz
4db6e924fe Vivian MEAZZA:
" Make a couple of minor adjustments to Harald's weather radar code, make
elevation work in the radar code, and add station ident to the TACAN code"
2006-06-09 18:29:51 +00:00
mfranz
20076aa2b9 - remove obsolete definition
- make sure HUD is only initialized once
2006-06-09 10:53:48 +00:00
mfranz
782e6b82f0 - copy preset colors from <palette> to /sim/hud/color
- listen to color, alpha, alpha-clamping
- fix blend mode
2006-06-08 17:14:59 +00:00
frohlich
4fde3031eb Make use of the ground material types 2006-06-08 05:58:36 +00:00
mfranz
8369cc75f5 - don't hide HUD only because the color index is invalid
- initialize color components
2006-06-07 21:41:32 +00:00
mfranz
fe3bdf0837 boy, what a load of ... 2006-06-07 21:35:11 +00:00
mfranz
d2791fdc9d whoops ... compile (this silly #define will be removed very soon) 2006-06-07 21:28:33 +00:00
mfranz
e841b65a5a remove obsolete constants 2006-06-07 21:09:38 +00:00
mfranz
1ccacef184 - drop hardcoded color/brightness values
- let listener class watch and maintain HUD color properties, which is
  more effective and more flexible.
2006-06-07 18:01:19 +00:00
mfranz
14ab303877 remove obsolete HUD fgcommands 2006-06-07 17:59:28 +00:00
mfranz
95da0171a0 bark if the requested font isn't a texture font. A more graceful recovery
doesn't buy us much, as the font is only set at initialization time and not
changeable later. Better tell the user immediately that he goofed.
2006-06-06 19:25:33 +00:00
mfranz
675ff6fbc8 restore old default; this should probably be configurable ... 2006-06-06 18:36:34 +00:00
mfranz
c5e74d090a better always use style[0] (again). Otherise *-set.xml can't easily change
background/font
2006-06-06 17:30:49 +00:00
mfranz
88beabb2d3 use global fontcache ... this is mostly cosmetic, as the whole file will
probably die a soon as the old property picker was removed
2006-06-06 16:33:38 +00:00
mfranz
15dbbbf143 - use global fontcache
- make font/size configurable
2006-06-06 15:34:18 +00:00
mfranz
db86d15c5f use global fontcache. This hast the nice side effect that panels can now
use *any* texture (*.txf) font, not just "typewriter" and "led".
2006-06-06 12:52:45 +00:00
mfranz
355f86d6cf FGFontCache: add getter for the fntTexFont component of a cached font 2006-06-06 12:49:42 +00:00
mfranz
d8cd8f96aa read font and colors from the selected style, not always from /sim/gui/style[0] 2006-06-05 22:03:23 +00:00
mfranz
43b66ac74b don't choke on invalid nodes 2006-06-05 21:55:18 +00:00
mfranz
55903e9a07 use the global fontcache; this has the nice side-effect that the font is
now settable via /sim/gui/style/fonts/splash/{name,size,slant}
2006-06-05 20:49:35 +00:00
mfranz
067e6d56c2 use global fontcache 2006-06-05 20:25:43 +00:00
mfranz
47223b0442 make FGFontCache independent of NewGUI and allow early construction in
FGGlobals
2006-06-05 20:23:56 +00:00
mfranz
d5fd30249f make fontcache globally available 2006-06-05 20:21:45 +00:00
mfranz
4d9d907c05 whoops, sorry, I forgot to commit that. (Thanks, Fred, for fixing).
Belongs to the SGSubsystem interface functions.
2006-06-05 16:28:20 +00:00
fredb
d1d9fb8881 Declare new member functions 2006-06-05 16:19:50 +00:00
mfranz
b2d2ec2e16 make modifier keys accessible via /devices/status/keyboard/{shift,ctrl,alt} 2006-06-05 13:45:59 +00:00
mfranz
6cc4cbd696 fix the splash background color property path 2006-06-04 17:18:05 +00:00
mfranz
18d09b569f - display of SGPropertyNode flags can now be toggled per <property-list>
widget (Ctrl-click on "." entry), so we don't need a global property
  for this
- s/dotFiles/_dot_files/ for consistency reasons
2006-06-03 11:20:19 +00:00
fredb
35a8d66415 Mask error message 'Failed to find runway 28R at ...' when no runway is requested in the command line 2006-05-31 07:20:10 +00:00
frohlich
dcc77f1a7c From Olaf Flebbe: avoid iterator overruns if we delete the last list entry. 2006-05-30 17:21:50 +00:00
mfranz
4f17b48e83 - use guarded pointer for (unused) refuel_node
- comment out refuel_node->setBoolValue()  (as it was in the original patch :-)
2006-05-26 05:23:40 +00:00
mfranz
9e9d463a11 not that! 2006-05-24 21:05:48 +00:00
mfranz
68beab9fb2 s/isascii/isprint/ 2006-05-24 21:02:52 +00:00
mfranz
597298d5a7 - fix slider
- order functions like in puAuxList.cxx (plib/cvs) for easier
  back/forward-porting
2006-05-24 20:46:10 +00:00
mfranz
e7e0e84add - force multiline contents (Nasal scripts!) into one line, so that they
don't print over other entries or even leak out of the widget
- warning-- (MSVC)
2006-05-24 14:00:56 +00:00
fredb
790848b822 Compile 2006-05-24 10:51:35 +00:00
mfranz
dab5434edb Vivian MEAZZA:
"Remove unnecessary, redundant or duplicated code. Functionally, there is no
change"
2006-05-24 10:06:44 +00:00
mfranz
b08a588fb1 ok, now I know why the destructor was commented out in prop_picker.cxx:
there's a bug that I had copied: update() checks each list node: if it
has no children, then a listener is attached. Later, when freeing the
children list, it assumed again that each node without children would
have a listener attached. This caused a crash when a node had children
before, but lost them in the meantime. Now we tried to remove a listener
where there never was one.
2006-05-24 09:42:10 +00:00
mfranz
6465141ac2 - don't jump to top after bool toggling 2006-05-23 21:35:38 +00:00
mfranz
91a367379c catch non-existent nodes, too 2006-05-23 20:48:01 +00:00
mfranz
9c98766700 treat widget input correctly 2006-05-23 20:24:56 +00:00
mfranz
e0b1d12a60 don't abort fgfs only because a nasal script called a property function
with an invalid path, as in getprop("/sim/model/737") or x.getNode("f:1").
Forward sg's error message to the Nasal runtime error function instead, so
you get something like:

  Nasal runtime error: name must begin with alpha or '_'
    at /home/m/fgfs/Base.local/Nasal/props.nas, line 30

Unfortunately, the location points to the line where the ghost wrapper
sits, rather than the offending script line.
2006-05-23 18:55:38 +00:00
mfranz
fdb9e94af3 ugly "fix": the constructor was commented out in prop_picker.cxx since
*many* years, so the property browser always leaked memory. I activated
this line in property_list.cxx and ... got a crash right there. So this
was the reason for it being commented out? Doing the same for now, until
I know the exact reason and can really fix it.
2006-05-23 16:49:32 +00:00
mfranz
4c940a55f9 fix for broken plib 1.8.4 2006-05-23 16:44:10 +00:00
mfranz
d47e4ce0bd Vivian MEAZZA:
"Bug Fix - amend the code so that JSBSIm can have more than one tanker in
the environment at the same time. A nasal script has to be added to each
aar-capable JSBSim model to complete this fix."
2006-05-22 20:18:40 +00:00
mfranz
e2c195f3a6 - move the ID stuff to dialog.hxx
- add an identifier to fgPropertyList(), which is also PUCLASS_LIST based
2006-05-22 16:14:50 +00:00
mfranz
9ff339332c make new widget available as <property-list> 2006-05-22 14:35:39 +00:00
mfranz
0007098aac add property_list.[ch]xx 2006-05-22 14:34:59 +00:00
mfranz
3610680095 new property browser widget 2006-05-22 14:34:20 +00:00
mfranz
7b4238fe8c - backport plib/cvs (transparency feature; never tried that :-)
- backport submissions for plib 1.8.5:
  * set slider size correctly
  * remove slider/arrow when all entries fit into the view
  * don't allow to scroll off the list
2006-05-22 14:33:01 +00:00
mfranz
dfdb7f8107 the last patch fixed the AirportList ... and broke all other PUCLASS_LIST.;
Unfortunately, there's no simple way to distinguish them. plib has no
user defined widget classes, and getTypeString() -- which could be used
for that -- isn't virtual. Sigh. I'll discuss the problem on the plib list.
For now I can only offer an ugly workaround. (Don't look closely!)
2006-05-21 22:14:18 +00:00
mfranz
24981fd043 - replace string methods with property methods The class was originally adapted
from plib's file-picker, where it made some sense to keep the current path as
  string, and to chop off elements when leaving a dir, and adding them when
  entering. But it doesn't make the least sense in SGPropertyNode space, where
  we already have everything to move in a tree.

- add R & W flags for TRACE_READ and TRACE_WRITE. Remember: lower case letters:
  disabled (rw ... reading/writing), upper case letters: enabled (RWAUT)

- remove some verbosity & further cleanup ... to make further work easier :-)
2006-05-20 15:25:38 +00:00
fredb
d6320ad76b Create the /sim/ai node if someone has the unfortunate idea of removing it from preferences.xml 2006-05-20 13:29:31 +00:00
fredb
b55833dffb Add an option to enable ai scenarii from the command line instead of editing preferences.xml 2006-05-20 12:19:33 +00:00
mfranz
368349aa58 fix "airport list" crash: I had wrongly assumed that now all PUCLASS_LIST
would actually be an fgList class. The airport list is a PUCLASS_LIST, too,
so we have to check for that. -> Use getTypeString() for identification.
2006-05-20 11:35:28 +00:00
mfranz
53572823bc - unify several indentation and coding styles (and no, this is not my
preferred style, but the most sane of those used :-)
- remove trailing spaces
- cleanup

(all of this will make further work on the files easier)
2006-05-19 10:59:04 +00:00
mfranz
f5955a9cab Vivian MEAZZA:
"Add Air to Air TACAN and User-User refuelling over the Multiplayer Network.
With this change, your TACAN instrument can be tuned to the channel of a
Multiplayer ac. It also activates fuel flow between User and User aircraft
when they are less than 50 ft apart. To participate in multiplayer as a
tanker, all you require to do is to use the callsign MOBIL* (where * is some
number) on the net. Only MOBIL1, MOBIL2 and MOBIL3 have been assigned TACAN
channels, but any MOBIL callsign will be able to give fuel."
2006-05-18 16:59:04 +00:00
mfranz
ee0d288e32 show attributes if /sim/gui/dialogs/property-browser/show-flags == true:
r ... read protected
w ... write protected (untested; does probably not work for obvious reasons ;-)
A ... archive
U ... userarchive
T ... tied
2006-05-18 14:46:42 +00:00
mfranz
865a1c037e unselect entry after editing process has been finished 2006-05-18 13:09:34 +00:00