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)
Here's some new AI stuff.
1) AI objects must now be defined in a scenario file, not in preferences.xml
or a *-set file. (Of course this doesn't prevent objects from being created
dynamically, as with Durk's traffic manager).
2) A new demo_scenario file is attached. It creates 3 aircraft, a sailboat,
and a thunderstorm.
3) Objects without flightplans live forever.
4) FGAIShip::ProcessFlightplan() is not yet implemented.
5) preferences.xml should now define only <enabled> and <scenario>
Here is the KAP140 Two Axis Autopilot update.
I think it's fairly complete now, all the modes are working. I tested the
localizer and glideslope hold and it was pretty stable all the way down to
the middle marker.
In the pilot guide for backcourse hold (REV) mode it says to reset the heading
bug to the _front course_. I haven't figured out how to implement this so for
the time beeing one should reset the heading bug to the _backcourse_. Apart
from this the panel should operate identical to the way the pilot guide
describes.
Here is the KAP140 Two Axis Autopilot.
Aircraft/Instruments/KAP140TwoAxis.xml
Is of course the instrument config file.
Aircraft/Instruments/Textures/KAP140.rgb
The texture.
Nasal/kap140.nas
Most of the work is done here. Without Nasal I don't see how I could implement
the NAV-ARM modes and the flashing annunciators.
Aircraft/c172p/Systems/KAP140.xml
The autopilot PID controllers configuration file. Maybe this file should be in
a more accessible directory and not hidden deep inside c172p!?
I've also attached the changes to the default C172 to include this autopilot
in the 3d-cockpit panel and the 2d vfr panel. Or at least I hope that I've
managed to include all that is needed.
Add clickable range selection for the radar and wxradar. Right
now it is clickable only between 20 and 40 mile ranges, which should work for
most uses.
OV10-jsbsim-set.xml has many changes. It creates a thunderstorm over
woodside VOR. It removes the lowest cloud layer so that the storm can be
seen. It sets the surface wind speed to zero, which may help stop the
"drifting left" complaints. It sets the radar range to 40 miles.
The weather radar instrument is corrected.
The radar instrument uses the above three items, and applies a scale factor to
the x-shift and y-shift in order to match the instrument's scale. Changing
the display scale can be done entirely in the XML code for the instrument.
Right now it's set up only to display a 40 mile scale.
The radar is an AWACS view, which is not very realistic, but it is useful and
demonstrates the technology. With just a little more work I can get a HUD
marker. All I need to do there is make a bank angle adjustment to the
current values.
This works great with one target. For two or more targets the radar
instrument will have to know the numbering of the aircraft model properties.
This isn't implemented yet.
David Culp:
I couldn't stop. Here's a better radar instrument. It has:
1) range select knob 20 and 40 nm (not clickable.. yet)
2) target altitude readout at lower right
3) target disappears when range exceeds 43 nm
4) range ring values now are read from instrumentation/radar/range
5) instrumentation/radar/range is preset in the *-set.xml file to 40 nm
The next step would be a clickable range selection. The problem here is that
the instrument currently displays the "blip" only if the target's range is
less then 43 nm. If the range scale is decreased to 20 nm, then the "blip"
will show past the edges of the instrument. I might need to make another
instrument for the 20 nm scale to make that work.
controls in the cockpit vs. which wheels they apply to. FlightGear now
sets /controls/gear/brake-left, /controls/gear/brake-right, and
/controls/gear/brake-parking. It should be up to the FDM to sort out
which wheels under which circumstances are affected by these controls
and ultimately what happens to the physical motion of the aircraft.
These patches add a clock instrument, which allows to model failure ("serviceable") and to adjust the time independently of the system time (defaults to GMT). The main incentive is to make the p51d clock work and adjustable via the knob.
o Offers a time string ("12:03:15") for the LCD or for LED
clocks, or an empty string in case of failure/power off. The
instrument assumes that digital clocks are battery buffered,
so they will be updated even if there's nothing on the display.
o Offers the number of seconds since midnight for analog
clocks, like in the p51d. This number is not increased
if !serviceable. So the clock will stand still and continue
where it stopped when it's serviceable again.
I did not consider voltage yet, because the Mustang's clock will need a lot more current than the LCD clock. The instrument is updated 4 times per second but returns immediately if neither time nor offset changed. The function getGMTString() in fg_props.cxx could be removed after applying these patches.
- HSI GS needles shouldn't disappear when they hit their limits, only when
there is no GS signal.
- Make vac/amp gauge driven by new minimalistic amp model.
- Update digital clock face color to look more "LCD-ish" based on a real
C172-S cockpit photo.
- Add an OAT gauge to the old C172 2d panel.
support under /radios/.
The display now goes dark when the switch is turned off.
The switch position is now handled entirely within the XML -- the C++
code is generic, so that other DME receiver types can also be
modelled.
Here're some updates for some of the instruments, the TSR2 and the B52.
The instruments are just parameterised/non-specific versions of the engine
and fuel gauges. The old gauges will still be used by the a10s and the sea
hawks until I get them done.
There're a couple of tweaks to the tsr2 yasim config and amendments to the
model file to change the angle at which the airbrakes operate, correct the
direction that the nose gear retracts/extends and to rotate the main-gear
carts during retraction/extention. There're also new panels, using the new
instruments.
The b52 yasim config has some big changes due to finding some more info i.e.
wing incidence of 6 degrees, fuel capacities and aileron changes (removed
from G & H versions!). It's now based on an 'F' model and I've put some
comments in the yasim config about it. The b52-readme.txt includes a
suggested method on getting airborne;). I've included an amended model -
B52-F.3ds, which is the default in the new model file, and a couple of panels.
I'm quite pleased with the b52 - the take-offs resemble the photographs I've
seen and I think I've got reasonable values where I've had to guess at stuff,
but the results from the yasim solver look as through the model is
approaching the limits of acceptability for yasim. By this I mean that the
model is probably a bit dodgy, not that the yasim solver is limited.
OK -- thanks. I have now fixed up all the other XML files in the base
package that use "max" and "wrap". Those affected are all in
Aircraft/Instruments/. In these files I have also corrected the
indentation in some places, and corrected the frequency controls in
nav3.xml (which does not seem to be in use), and corrected a few obvious
hotspot position bugs. Where the radios used wrapping to toggle the
ident button between 0 and 1, I have changed this to use
"property-toggle" instead.
[ In support of the TSR2, SeaHawk and A-10 ]
I've set up some panels, based on the c310 vfr and mini panels. The
vfr panels have a lot of additional instruments on them but impose quite a
high frame-rate hit on my system. The mini panels also have some additional
instruments but seem to work without noticable penalty here. I've set these
panels as the defaults for these aircraft but I'm not sure it's a good idea
to have the vfr panels by default due to the performance hit. Using them as
default will should give some feedback though;)
To go with the new panels are a number of rough and ready instruments I
hacked, mostly out of one of the rpm gauges, but I've adapted the throttle
quadrent (jet-throttle-quadrant) to funstion for throttle, flaps and reheat.
All the gauge faces were based on an existing ffgfs instrument texture, so
there's no problem with copyright there. All the other bits that I've done
may be distributed under the same conditions as fgfs.
you simply click with the left mouse button to advance to 'both';
after that, if you click again, the start engages until you let go of
the mouse button, at which point the knob snaps back to 'both'.
- makes instrument knobs turn at a realistic rate
- removes redundant <min> and <max> specifications*
- corrects the indentation to reflect nesting depth
- corrects some descriptive names
* E.g. if the gyro compass heading is 365, there's no point clamping the
value to 360 before drawing it. Just using the given value is more
likely to be right - or, if it's wrong, at least we won't hide the bug.
button) modes. Due to a typo in altimeter.xml, one direction of
adjustment with the left mouse button was giving fast changes.
Simple patch attached.
- Julian
twice the design size (character height) of the old one.
Advantages:
- displays . and : correctly with less space around, and digits
with more space around (using Andy's improvements to plib)
- small text becomes much more legible (-> clock, AP-altitude)
- the font contains pretty much every character that can be
displayed on a seven segment display, so it might be more
useful for future instruments.
It's a little funky to use right now because
the FRQ and timer buttons should be momentary action.
As it stands you need to do 2 clicks to send on/off.
If anybody can think of a workaround, we could use one.
For now the ADF and BFO buttons just toggle the
annunciators. For ANT mode, I just need to wire up the
ADF needle.
Two clicks on FRQ flip flops the selected and standby
freqs.
Two clicks of FLT/ET will change the standby display
to timer mode and another two will flip between
FLT and ET. If you click and the annunciator flashes
briefly but the display does not change, you need
to click FRQ -one time- to get the button in phase.
ET mode has a count down mode, this is where it really gets tricky.
On the real thing, you hold the SET/RST button for 2 seconds.
Here you must click one time, wait for the display to flash then
click one more time. Now you can set the time to count down.
Right clicking the dial will set minutes, middle click (I know,
I'll make it a keyboard modifier later) sets hours. As usual
the left side decreases and right side increases.
Once you have the desired time set, click the SET/RST button
twice in rapid succession. Two rapid clicks will reset the
elapsed timer when it's counting down, but also while you are
setting it (when display is flashing).
When the count down timer reaches zero, it starts counting up again.
It -should- flash for 15 seconds and set off a warning tone, but
for now it doesn't.
The unit is also equipped with an on/off/volume knob. Whne the
unit is powered down the timers are reset.
TODO:
Add labeling
Wire up ADF needle
Prettier face