1
0
Fork 0
Commit graph

4694 commits

Author SHA1 Message Date
frohlich
0a522b383a Modified Files:
src/Scenery/tileentry.cxx: No longer need to lift lights due to agl.
2006-12-27 10:36:18 +00:00
durk
bd34d34d16 Change the traffic manager's position calculations to use a spherical
earth model instead of WGS84. WGS84 precision is overkill for what the
traffic manager requires, and also keeps locking up while computing
course and distance for anti podal points in New Zealand vs. south west
france.
2006-12-27 10:02:13 +00:00
frohlich
bb3d4ad3af Modified Files:
src/Main/renderer.cxx src/Main/viewer.cxx: Clean up the viewers
	frames a bit. Do no longer require a axis permutation in osg's
	viewer.
2006-12-27 09:28:15 +00:00
fredb
0bd6fa4bc0 Maik Justus : if the build is configured without FG_JPEG_SERVER, the compilation fails. 2006-12-25 19:38:34 +00:00
andy
f04499cdc6 Disable the defaulting of gear friction so the tunables actually work 2006-12-22 18:02:17 +00:00
andy
ef7e7f90dd Patch from Maik adds user-settable scaling constants for per-axis fuselage drag and induced drag. 2006-12-18 21:22:20 +00:00
fredb
462dd6900c Remove unused variables 2006-12-17 18:40:55 +00:00
fredb
240feb6961 Use SG_LOG instead of printf 2006-12-17 18:40:17 +00:00
fredb
c9401da22d Remove two g++ warnings 2006-12-17 18:32:56 +00:00
frohlich
cb62950760 Modified Files:
utils/Modeller/Makefile.am src/FDM/YASim/Makefile.am:
	Remove -lssg from the linker lines.
	Do no longer build threedconvert. A very similar functionality
	is available with osgvconv. But leave threedconvert in place
	if somebody will need that ...
2006-12-17 10:12:38 +00:00
durk
8634b9124e Modified the model path verification to take advantage of Maik Justus's
AI search path patch.
2006-12-17 08:01:56 +00:00
durk
b34dc24bdc Maik Justus:
Here the patch that makes fg search for multiplayer aircraft in AI/Aircraft
first.
2006-12-17 08:00:14 +00:00
fredb
e48663b87d Prototype of fake functions should match the real ones 2006-12-16 21:40:38 +00:00
fredb
2422747bcc Port jpg-httpd to OSG 2006-12-16 17:44:46 +00:00
frohlich
1c76f6db74 Modified Files:
src/Cockpit/cockpit.cxx src/Cockpit/cockpit.hxx: Remove unused code
2006-12-14 05:48:33 +00:00
curt
5d18c09c08 Maik Justus:
I found a small conspicuity  in YASim. The destructor of the fdm was
never called, therefore a modification of the heli fdm (not in cvs) did
not work after reset (I tie some properties and untie them in the
destructor, but the destructor was not called and the tieing failed
after reset. I don't know if any other parts of YASim need their
destructors, at least it wastes memory.

Another small fix I have made to the turbulence.cpp. The code needed,
that (a-floor(a)) is >=0 and <1. This is analytical correct, but
numerical only for "small" values. In normal fg-operation a in this
function is always small, but with unrealistic parameters in the
aircraft config file it is not and then fg crashes (instead a crash of
the aircraft or cataputling it far away).
2006-12-09 20:37:59 +00:00
mfranz
b9e4775a7a Roy Vegard Ovesen:
- finish cleanup/optimization of instrumentation system (started by mfranz)
- improve configuration of special properties by
  addressing them directly
2006-12-06 22:11:43 +00:00
mfranz
880e4908ac don't crash when a panel (or one of its elements) can't be found (-> pc7) 2006-12-03 20:14:12 +00:00
frohlich
66b6fa0001 Modified Files:
renderer.cxx: set TexEnv for the 2d stuff.
2006-12-03 16:50:00 +00:00
frohlich
037a961280 Modified Files:
renderer.cxx: Put light information into the update visitor
2006-12-03 16:48:25 +00:00
mfranz
c0e1a380d6 make sure the node for the AI model removal report exists;
addressing a node with its path is unsafe at that time
2006-11-26 12:02:06 +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
durk
78aea9eb80 Reorganization of the AI directory tree. Make FlightGear search for airport
related AI stuff in data/AI/Airports instead of in data/Airports/AI
2006-11-25 09:05:03 +00:00
durk
3bd32f75e4 Removed a potentially illegal cross-container iterator comparison that made
FlightGear crash on mircosoft visual c++ compilers, as reported by Maik
Justus.
2006-11-25 07:52:08 +00:00
frohlich
6ad85fbae9 Modified Files:
src/Main/renderer.cxx: Use a LightSource for the Light.
2006-11-23 17:50:49 +00:00
mfranz
baa16f4995 AJ MacLEOD: don't only turn the adf off with exactly zero voltage
as values like 1E-10 can occur due to binary representation issues;
(analog to navradio.cxx)
2006-11-22 20:08:45 +00:00
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