curt [Sat, 24 Jun 2006 03:42:30 +0000 (03:42 +0000)]
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.
curt [Sat, 24 Jun 2006 00:52:20 +0000 (00:52 +0000)]
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.
curt [Sat, 24 Jun 2006 00:00:27 +0000 (00:00 +0000)]
- 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.)
curt [Wed, 21 Jun 2006 21:23:20 +0000 (21:23 +0000)]
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.
mfranz [Sat, 17 Jun 2006 16:33:00 +0000 (16:33 +0000)]
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).
curt [Fri, 16 Jun 2006 19:10:20 +0000 (19:10 +0000)]
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.
curt [Fri, 16 Jun 2006 14:22:21 +0000 (14:22 +0000)]
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.
mfranz [Wed, 14 Jun 2006 10:30:10 +0000 (10:30 +0000)]
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)
mfranz [Sun, 11 Jun 2006 15:32:18 +0000 (15:32 +0000)]
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.
mfranz [Sun, 11 Jun 2006 15:18:48 +0000 (15:18 +0000)]
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 ...
frohlich [Sun, 11 Jun 2006 13:34:18 +0000 (13:34 +0000)]
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.
mfranz [Sun, 11 Jun 2006 10:21:10 +0000 (10:21 +0000)]
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.
mfranz [Sat, 10 Jun 2006 15:25:48 +0000 (15:25 +0000)]
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.
mfranz [Sat, 10 Jun 2006 09:22:27 +0000 (09:22 +0000)]
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.)
mfranz [Sat, 10 Jun 2006 07:23:15 +0000 (07:23 +0000)]
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.)
mfranz [Tue, 6 Jun 2006 19:25:33 +0000 (19:25 +0000)]
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.
mfranz [Sat, 3 Jun 2006 11:20:19 +0000 (11:20 +0000)]
- 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
curt [Thu, 1 Jun 2006 21:13:56 +0000 (21:13 +0000)]
Fix a dumb bug where I inadvertantly did a computation in int32 land causing
me to loose 2 decimal places in my location data before converting to lon/lat.
mfranz [Wed, 24 May 2006 14:00:56 +0000 (14:00 +0000)]
- 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)
mfranz [Wed, 24 May 2006 09:42:10 +0000 (09:42 +0000)]
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.
mfranz [Tue, 23 May 2006 18:55:38 +0000 (18:55 +0000)]
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.