1
0
Fork 0
Commit graph

1099 commits

Author SHA1 Message Date
mfranz
7cecba5024 add 'condition' setter, analogous to 'mixture' etc. 2005-04-21 14:39:00 +00:00
mfranz
da9b28ea6e consider new keys: w/W is now +/- warp, while m/M is richer/leaner mixture 2005-04-20 12:19:27 +00:00
ehofman
ec8742bd65 Melchior FRANZ:
Implement simple help system with global and aircraft specific dialogs:

The gui.nas changes have been discussed with Andy. All ac have a help dialog,
but some are empty. (This wouldn't have been necessary, as the system falls
back to the "Common Aircraft Keys" if an aircraft has no help defined, but an
empty dialog is less confusing and encourages to be filled with interesting
information.   :-)    I scanned all aircraft files for interesting performance
data and added some to the dialogs (stall speed, etc.) The Concorde and the
p51d have (over?)complete dialogs and can serve as examples. The format is
documented in $FG_ROOT/Nasa/gui.nas.

There is also a couple of other, minor fixes.

The following files have ugly MSDOS line endings:

  $FG_ROOT/Aircraft/Hunter/hunter{-2tanks,}-set.xml
  $FG_ROOT/Aircraft/A380/A380-set.xml


The Concorde-jsbsim.nas file is a useless copy of the real */nas file, which is
in Nasal/. I'was debugging the Concorde and wondered why changes to this file
had no effect ...
(Fixed Concorde in the help-ac.diff patch: don't use "interpol" keyword as
variable.)
2005-04-19 13:43:44 +00:00
ehofman
ca224d0ea3 Melchior FRANZ:
- lights are by default off (what was I thinking?!?)
- setters return "me" reference by default, for easier code obfuscation:
  foo = aircraft.light.new("/foo").prop().switch(1);    :-)
- a few mebmers renamed; light.set() -> light.switch(); nodes are named *N
  to avoid collisions and to show relations (switch() <-> switchN)
- yet more (too much?) documentation
2005-04-06 08:18:06 +00:00
curt
b2efcab662 Take advantage of a recent nasal change to simplify a boolean condition. 2005-03-30 19:04:53 +00:00
curt
b0862aa5db A small fix to track latest nasal changes. 2005-03-30 17:00:50 +00:00
ehofman
a978a79d16 Melchior FRANZ:
- light class added (for lights and other pulsing/blinking objects)
- fixed and improved documentation
- all property args may be path strings or nodes
- existing nodes aren't overwritten any more
- better naming of class vars (for outside access)

Tested with the bo105 (which I fully ported to use aircraft.nas) and
the fokker70 (which are the only aircraft using the new classes  :-)
2005-03-30 09:53:00 +00:00
ehofman
39c82918cd Melchior has already a nice collection of animation type nasal classes. These will be converted in a Nasal toolbox so everybody can use them without reinventing the wheel. 2005-03-29 11:26:49 +00:00
ehofman
d0f032bf73 Melchior FRANZ:
Re-organisation: <diffuse>, <ambient>, <emission>, <specular> are
now groups with members <red>, <green>, <blue>, <factor>, <offset>,
and their <*-prop> forms. Additionally, there's an option <property-base>
that can be used to set a path that is prepended to all <*-prop> paths.
It defaults to an empty string. Rationale: see model-howto.html.
2005-03-28 09:15:07 +00:00
andy
4718f2f8f0 Fix broken getPath() method 2005-03-27 17:30:51 +00:00
andy
ca0fa1c427 Changes from Melchior to make use of the spiffy new format feature in
the text widget; and a props.getPath() method.
2005-03-26 22:15:26 +00:00
ehofman
7eb3327565 Melchior FRANZ:
Changes:

o new skids (yet again)
o sun shield for the panel
o beautified exhausts
o new door handling:
  "d"      ... toggle selected door (default: pilot door)
  "D"      ... select next door (indicated with popup)
  "Ctrl-d" ... remove selected door if opened (all bo105 doors can easily
               get removed in RL; it is even flown without doors!)
o dropped shadow boxes (once necessary workaround for the disappearing
  shadow problem, and the reason why the bo105 was so tiny in fgrun)
o automatically selects the emblem of the national Red Cross/Red Crescent
  society on startup
o 5 variants, that can be switched at runtime, with different emblems,
  colors(!), and extra equipment:
  "c"      ... switch to next variant
  "C"      ... pop-up material dialog, as a demonstration of the new
               "material" animation, well ... and for entertainment
               purposes  :-)


The bo105 was and is a testbed for the "material" animation. It uses one to
change a texture at runtime. This has the advantage, that only the currently
selected texture uses up memory (unlike the textranslate method), and it
saves a lot of disk space because it doesn't duplicate all textures (unlike
the current <texture-path> method. You can change the texture in the browser:

  http://localhost:5501/sim/model/bo105/material/emblem/texture
  (choose one of: emblems/{red-cross,red-crescent-[lr],star-of-life}.rgb

(the built-in property browser doesn't grok it, because I used quite long
path names. Needs to be fixed in the GUI.)

I suggest to add the material.nas file to the global Nasal/ dir, not only
because the bo105 update expects it. The Nasal module creates a dialog for
material editing, which is quite useful for development purposes, for gaining
better understanding of the OpenGL color properties, and finally: it's fun.

   http://members.aon.at/mfranz/material.jpg  [45 kB]

The dialog needs to be initialized with a property dir where material
redirects are placed. It isn't available from the menu, but may be useful
for other aircraft. Also, it's quite small and doesn't get in the way.
If people want it removed, I can still move its contents into bo105.nas.
The bo keyboard binding says:

   material.showDialog("/sim/model/bo105/material/fuselage/", "Bo105");

This is documented on top of the *.nas file.
2005-03-22 13:16:59 +00:00
curt
a9c8aeac7e Moved file to it's own aircraft specific directory so it doesn't waste
resources for everyone.
2005-02-15 18:02:06 +00:00
curt
5b34a96a12 Fix some property names. 2004-12-30 21:11:29 +00:00
curt
a355aa410d More /radios -> /instrumentation property name changes. However, we are still
missing something because the nav1 and nav2 are still inop.
2004-12-04 20:37:04 +00:00
curt
71bfe3a4db Move the kr-87 adf from /radios to /instrumentation 2004-11-19 23:56:47 +00:00
curt
565e8aafba Make the comments match reality. 2004-11-19 23:04:32 +00:00
curt
e0f0a78b09 Initial revision, added a light weight interface on top of the raw hardware
to make bridge the gap with what FlightGear expects.
2004-11-18 04:59:32 +00:00
ehofman
8ee606eea8 Roy Vegard Ovesen:
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.
2004-10-17 17:41:05 +00:00
andy
168e592e03 Probably best to make sure the property is there (even though
"selected" certainly should be)
2004-08-12 18:49:13 +00:00
andy
f2edac1849 Oops, same bug on the next line too. 2004-08-12 18:48:44 +00:00
andy
a20598d0fd Melchior helped to debug this via chat. Turns out to have been a
typo; the SimGear "pass subproperty as first argument" shortcut
doesn't work in Nasal.  This checkin is blind, but should have a high
probability of correctness.
2004-08-12 18:38:02 +00:00
ehofman
ed6f6640af Lee Elliot:
I'd like to suggest that the spoiler settings are set in the same way as the
flaps are now done i.e. via Nasal, so that specific spoiler settings can also
be defined in the aircraft set file.

It was only when I was about to change the keyboard bindings for the slats
control that I remembered that there wasn't already a mapping for them in
keyboard.xml.  I've _not_ added a mapping for slats as this is a bit of a hot
topic atm but as I had already added a Nasal func for the slats in
controls.nas I've left that in there.  It's a trivial bit of code but I don't
know if leaving it in there is a good idea as it's code that shouldn't ever
be called until there's a corresponding keyboard mapping.
2004-06-01 08:13:12 +00:00
andy
8bc72e8e7b Fix typing bug where the autopilot wouldn't turn off. GUI buttons
set their properties as strings, not bools.  So set the properties
once from initialization to ensure their types are correct.
2004-05-15 23:04:17 +00:00
andy
acb17eccc9 Really fun (and surprisingly easy) hack: a fuel and weight
configuration dialog box which automagically adapts itself to
aircraft configuration.  Only the A-4 and Cherokee are set up
currently.
2004-05-15 21:50:51 +00:00
andy
42cd87bbfe The cached tip dialog broke when layout management went in (previous
x/y/width/height values went into the calculation for the next popup,
and things got iteratively worse due to padding issues).  But the
good news is that this whole subsystem is vastly simpler when
implemented with the new interface.
2004-05-12 18:41:29 +00:00
andy
54954eb8de GUI layout management and a few visual/eye-candy modifications. See
DOCS/README.layout in the base package for details, along with the
modified dialog files.
2004-05-12 15:37:17 +00:00
andy
aa2686c0b9 Support a "kill-when-empty" flag on tanks to enable the strict
"engines die when any tank is empty" behavior.  Otherwise, just
deselect the empty tank.  This matches the "both" behavior many
lightplane fuel selectors have.
2004-04-30 14:42:42 +00:00
curt
8ab947db84 Roy Vegard Ovesen:
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.
2004-04-16 22:14:00 +00:00
curt
0dda4feaa0 Roy Vegard Ovesen:
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.
2004-04-16 21:59:51 +00:00
andy
449c7bf7ef Oops. A last minute change broke piston engines. The "phantom" fuel
tanks created by the C++ code look empty, and were causing the fuel
code to detect out of fuel conditions.  Since there is no way to tell
a "FDM" tank from a "C++" tank, I just filter them by capacity.  Very
ugly hack, we need to fix the code to report only the tanks created
by the aircraft/FDM configuration.
2004-03-27 18:26:55 +00:00
andy
e2cf6d90d2 New fuel management code. Only works with YASim currently. It's a benign
no-op under other FDMs.
2004-03-27 04:07:56 +00:00
andy
8858ccd0a9 Better docs for slewProperty() 2004-02-10 18:12:09 +00:00
curt
a180a0d659 Default autopilot tweaks. 2004-02-07 21:48:39 +00:00
curt
76a08b6467 Autopilot overhaul. 2004-01-31 19:55:13 +00:00
andy
a67c4113e8 Temporary implementation of props.getBoolValue() which correctly
interprets the string "false".  Eventually this needs to be an
extension function wrapping SGPropertyNode::getBoolValue().
2004-01-28 03:49:59 +00:00
andy
36db5c5703 Fixes from Melchior FRANZ for the (no longer untested, heh)
adjEngControl() handler.
2004-01-07 02:12:27 +00:00
andy
2fec2ffa09 Hook an initialization function to patch up any missing
/sim/input/selected/engine[n] properties.  Also, new properties get
empty string values (which are boolean true in Nasal, maybe that
should be changed?), so test for numeric truth.
2003-12-29 22:59:00 +00:00
andy
35ec004c5f Nasal bindings for Saitek X45.
Misc. fixes to Nasal command bindings.
2003-12-23 17:31:08 +00:00
andy
b2909de010 New Nasal code, with lots of input binding handlers in controls.nas.
Move the "tip popup" code from view.nas to a new gui.nas module, and
  make it generically useful.
Wire up flap steppings for the 747 as an example of per-aircraft
  flaps.
Realtime-based property slewing, to eliminate dependence of trim and
  view direction rates on frame rate.
2003-12-22 20:05:18 +00:00
andy
6c097f252a Turn off the zoom limit for now. Folks don't like it. 2003-12-09 17:02:00 +00:00
andy
dfb39d9099 Remove some debug code. Misc. cleanups. 2003-12-08 05:45:03 +00:00
andy
3677b96fad Bugfix to globals.fgcommand().
New Node.setValues() method which sets whole property trees from Nasal
data.

A view.nas module, which takes over handling of the X/x zoom keys.  It
clamps the FOV to a dynamically calculated maximum corresponding to
typical human visual accuity, and pops up a pretty dialog informing
you of the new FOV.
2003-12-08 02:09:19 +00:00
andy
5ed2c89605 Add abs() and interpolate() to globals. Move bo105 code to the -set.xml file 2003-12-05 02:38:35 +00:00
ehofman
2c92f74b9f Fix a typo 2003-12-02 17:54:15 +00:00
ehofman
0be80148c3 Add Nasal Vs. 1.5 2003-12-01 14:36:22 +00:00
ehofman
5289481a98 show the additional key bindings only when the bo105 is
used.
2003-11-28 13:48:18 +00:00
ehofman
b24d911412 Don't spoil David's effort to make FlightGear quiet. Just display the special key feature. 2003-11-28 12:34:37 +00:00
ehofman
df52e98fd8 Add a (test) script to open and close the doors of the bo105. 2003-11-28 12:19:49 +00:00