LCD hobbs meter (instead of the previous "static" hobbs meter that was pretty
but didn't ever change.) This requires some aircraft specific nasal support
since the hobbs meter isn't implemented in the same way on every aircraft:
# initialize the hobbs meter and configure to save every 5 minutes
var hobbs = aircraft.timer.new("/instrumentation/clock/hobbs-meter-sec");
aircraft.data.save(5);
hobbs.stop();
setlistener( "/engines/engine[0]/running",
func {
var running = getprop("/engines/engine[0]/running");
if ( running ) {
hobbs.start();
} else {
hobbs.stop();
}
}
);
setlistener( "/instrumentation/clock/hobbs-meter-sec",
func {
var secs = getprop("/instrumentation/clock/hobbs-meter-sec");
setprop("/instrumentation/clock/hobbs-meter-hours", secs / 3600);
},
1
);
- Automatic pitch trim (use autopilot/KAP140/settings/auto-pitch-trim to turn
on/off)
- Aural altitude alerter. Uses the same sound file as the stall warning.
- Replace custom flasher routines with nasal aircraft.light objects.
- Cleanup.
- fix breakage due to former commit (AIManager.cxx, r1.72)
- make AI properties available in AIBase
- add <valid> property for animations/nasal scripts
- support more MP and AI targets
- add target select and altitude display
"This patch allows all the AC using the kap140 to use one kap140.nas
which includes Roy's move to "bool" values as well as the check for
power used by the pa24-250." (dp)
I missed a few things in the last patch.
1. prop size did not match prop disc size.
2. rescaled yoke to match measured yoke.
3. messed up hot spots for heading indicator knobs when I tweaked the
panel last patch.
The fix that could not wait was #3, so I also re-textured the pilot head
with outdoor face photos. Yep, that's my face. The hair is now
textured also which looks better close up.
that the --dme option sets the switch position correctly, but the
preferences.xml file is read after that and sets the switch back to 1.
And then we do *correctly* get nav1. Ideally, we would only let
preferences set the switch position if it wasn't set before, but
for now lets just comment that out there.
Here is a patch that included the changes in my 2/22/06 posting plus the
3d-instrument light "emission" animations. I also added a magnetic
compas mount and moved it forward and down to better match the real ac
and make it easier to read when adjusting the hi. Ignore the "?" flaged
files at the beginning. none are required. I noticed that there is a
backup copy of pa24-250.ac in the pa24-250 folder in cvs. It can be
deleted. The only copy of that file required is in pa24-25/Models.
I "flew" a shake down instrument XC from 2v2 (Longmont, CO) to KLVN
(Airlake, just south of Minneapolis, MN). Even the fuel management is
realistic. The autopilot on the menu bar works well. Give the changes
a try and enjoy!
feature I added to the navcom-kx155.xml and the dme.xml in the
Instruments folder. I wanted to leave the frequencies, etc. on these
dark until there was voltage applied to
/systems/electrical/outputs/nav. This was accomplished by adding a
param and property alias pointing to the appropriate value. Since the
c172p "always" applies 28 volts, this made no change in the c172p, but
allowed me to model the avionics master and battery master realisticly
in pa24-electrical.nas. I put in comments explaining this at the change
points.
There is a useful "help > aircraft help" that walks you through the
start procedure and lists the key bindings as well as the key to "light
up" the hot spots.
mode according to the switch position. Now dme.cxx is more generic
and can't make these settings any more -- and doesn't. So the dme
didn't display anything even if the knob was on.
The initialization has now to be done in the dme.xml file.
(Button-less actions are fired at init time and then thrown away.)
The comm radio knobs are screwed. Left half increase, right half decrease.
Fixed that. (I wonder since when this is broken. Does nobody use it?)
To reproduce: $ fgfs --aircraft=c310
The c310's adf needle (HSI) doesn't work. The hsi.xml instrument does
still use the old property. The fix didn't have negative effects on
other a/c that I had tested.
I've finished the emigration of the radiostack, and I've also removed it
completely. It turned out that the comm radio is completely implemented in
the ATC subsystem. I've changed the affected ATC files to point
to /instrumentation/com, but I guess that the maintainer of the ATC code
should decide wether to make it configureable, and how.
I also had to change some files in Network and Main. The changes in network
should be obvious, but the changes in Main were a bit suspect. The files
included radiostack.hxx, but they weren't directly depending on
radiostack-hxx. They were depending on other files that were included by
radiostack.hxx. I got it to compile, but I'm not sure if I included the
correct directly depending file.
For the data directory I changed every occurrence of /radios/
with /instrumentation/ with this simple one-liner that I found on the net:
find -name '*.xml' -type f | xargs perl -pi -e
's/\/radios\//\/instrumentation\//g'
Instead of me sending all the files that got changed by this I suggest that
you execute the one-liner yourself. Of course I can not guarantee that this
will work perfectly, but I considered hand editing to be not an option (I'm
lazy). I don't want to test every aircraft to see if everything still works,
I think it's better to wait and see if anyone complaints about broken nav
radios/instruments.
Here are some updates to the KAP140 autopilot in the default c172. It now uses
ailerons and elevator instead of aileron-trim and elevator-trim. I've started
to "upgrade" it to the "two axis altitude preselect" version. Vertical speed
select rounds to nearest 100 fpm.
I've also modified the c172 electrical configuration to turn on the gps
instrument.
Perhaps the most important change is that the nasal script for the KAP140 has
moved from data/Nasal to the c172p aircraft subdir. So it is important that
you delete data/Nasal/kap140.nas. Having the kap140.nas script as a global
script was not a good solution. Now it is aircraft specific, and thus
included in the c172p-set.xml file. Ideally I would like it to be instrument
specific, so that it would be included whenever the KAP140*.xml instruments
where included on the panel.
All necessary elements for an ADF gauge had been migrated from
Cockpit/kr_87.cxx to Instrumentation/adf.cxx. Migrating the sound
related elements was apparently planned, but not done yet. This
intermediate state broke the ident morse sound: it couldn't get
turned off and it always indicated "SF", regardless of the tuned-in
frequency. The following patches continue the migration:
adf-radio.diff => Base/Aircraft/Instruments/adf-radio.xml:
---------------------------------------------------------------
* sets maximum volume to 1 (rather than 2); Not only is 1
loud enough (and 2 unpleasantly noisy), it also prevents
the knob from being turned to non-existant positions. :-)
* fixes wrong use of /instrumentation/adf/ident
* the voice/ident selector(?) remains unchanged, but as it's
not switched to "IDENT", there'll be no ident sound by default
this is consistent with other sounds and DME.
radiostack.diff => src/Cockpit/radiostack.[ch]xx:
---------------------------------------------------------------
* comment out use of FGKR_87 class. kr_87.[ch]xx is now no
longer used. kr-87adf.xml would no longer work, either, but
isn't used anywhere, anyway. Future adf radios have to use
the adf instrument, using xml/Nasal for specific hardware
implementation details.
adf.diff => src/Instrumentation/adf.[ch]xx:
---------------------------------------------------------------
* adds ident morse sound capability using two new input
properties:
- /instrumentation/adf/volume-norm (double)
- /instrumentation/adf/ident-audible (bool)