1
0
Fork 0
Commit graph

6692 commits

Author SHA1 Message Date
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
frohlich
ff907d87e3 Updates to the MSVC8 project file from Olaf. 2006-06-10 11:19:51 +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