#751847 flightgear: Seneca II interior lighting

#751847#5
Date:
2014-06-17 07:42:23 UTC
From:
To:
Hello,

In the cockpit of the Seneca II, the overhead light switch is
insensitive to the mouse and not highlighted by Ctrl+C.  However, one
can turn cockpit lighting on by going to the property browser (in
Debug menu) and setting the property /controls/lighting/panel-norm
to a value larger than 0; in this case the button actually rotates
like a dimmer would, when this button clearly looks like an on-off
switch with no intermediate values possible.

A slightly more serious issue is that, even with
/controls/lighting/panel-norm set to 1 (the maximum), the cockpit
remains entirely dark, i.e. the overhead lights are useless.  It
would be nice if these lights actually allowed seeing the controls
that don't have a backlight, i.e. throttle, RPM, mixture, etc.
Such lighting would make it easier to find the instrument lighting
dimmer in the dark :)

See http://wiki.flightgear.org/Howto:Lightmap for what I mean.

#751847#10
Date:
2014-06-18 21:21:55 UTC
From:
To:
Hello,

The following patch fixes the first problem, i.e. the overhead light
switch becomes sensitive and lights the overhead lights.
--- Aircraft/SenecaII/Models/SenecaII.xml 2012-08-02 10:43:27.000000000 +0200 +++ Aircraft/SenecaII/Models/SenecaII.xml 2014-06-18 22:32:50.550356390 +0200 @@ -2250,6 +2250,19 @@ <z2-m>1.94148</z2-m> </axis> </animation> + <animation> + <type>pick</type> + <object-name>Overhead.CockpitLightSwitch</object-name> + <visible>true</visible> + <action> + <button>0</button> + <repeatable>false</repeatable> + <binding> + <command>property-toggle</command> + <property>controls/lighting/panel-norm</property> + </binding> + </action> + </animation> <animation> <type>noshadow</type>
#751847#17
Date:
2014-06-19 12:54:07 UTC
From:
To:
I have prepared a much more extensive patch that resolves the second
issue, viz. the fact that the cockpit remains dark even with the
overhead lights swicthed on.  I'll post it here in the next 12
hours.

This patch illuminates many non-backlit areas of the cockpit with the
overhead lights: the charts on the copilot's seat, the instrument
panel, the throttle/RPM/mixture levers, coil flap levers, flap lever,
etc.

Parts of this patch might be controversial in that the left-hand
electrical buttons (main battery, magnetos, start button, etc.) and
the instrument and radio light dimmers are no longer back-lit and
no longer controlled by the instrument light; instead they are
dimly lit only by the overhead light.  I believe this to be more
realistic but then again I've never been in an actual Seneca II,
let alone at night :)

I'd like to add a keyboard shortcut to turn the overhead lights on;
I think the key Ctrl+L is a good candidate.  Also to add an entry in
the Seneca menu (F10).  This way, a pilot could enter the cockpit
in the middle of the night, hit Ctrl+L, see the instrument lighting
dimmer on the panel, turn that on and fly the aircraft, all without
resorting to Ctrl+C a single time.  All in all I think this is a
*big* improvement to the cockpit for night flying.

#751847#22
Date:
2014-06-19 19:34:48 UTC
From:
To:
As promised here is the patch.  Additionally to my earlier description,
it sets the key "c" to show and hide the aircraft, like in the
Beechcraft 1900D.

If there is any better place to send such patches please tell me :)

#751847#27
Date:
2014-06-19 21:54:21 UTC
From:
To:
I discovered that the SenecaII uses some instruments that are shared
with other aircraft and not defined in the SenecaII file hierarchy.
These instruments seem to agree that the property controlling the
dimming of instrument lights is /sim/model/material/instruments/factor,
not /controls/lighting/instruments-norm.

This new version of my patch unifies all uses of the lighting properties
for consistency and compatibility with common instruments.  Only the
following properties are used now:

    <model>
      <material>
        <instruments>
          <red type="double">1.0</red>
          <green type="double">0.2</green>
          <blue type="double">0.0</blue>
          <factor type="double">0</factor> <!-- used by instruments common to several aircraft -->
        </instruments>
        <overhead-lighting>
          <red type="double">0.06</red>
          <green type="double">0.003</green>
          <blue type="double">0</blue>
          <factor type="double">0</factor>
        </overhead-lighting>
      </material>

(This version replaces the earlier ones I posted; it is cumulative.)

#751847#34
Date:
2014-07-12 18:57:39 UTC
From:
To:
Here is version 3 of my patch (this replaces and includes version 3).
Changes relative to version 2:

* Revert the part about key "c" to hide the aircraft; instead, simply
  add <allow-toggle-cockpit>true</allow-toggle-cockpit> to make the
  Seneca II behave like all other aircraft.

* Make the NAV1, NAV2, ADF and DME instruments use the radio light
  dimmer (which was previously inoperative) and have the same color;
  white, since NAV1 and NAV2 are not specific to the Seneca II but are
  shared between various aircraft.  Most importantly, the knobs are lit,
  too, and therefore visible at night even without Ctrl+C.

* Models/dme.xml:
  - Do not use a SenecaII-specific copy of the ki266 DME instrument; use
    the shared one instead.
  - Override the lighting to use the property /controls/lighting/radio-norm
    instead of .../instruments-norm.

* Instruments-3d/ki266.{xml,ac}: remove.

With this new version of the patch, the Seneca II becomes really easy to
fly at night: enter the cockpit, do Seneca > Overhead light on/off; now
the two dimmers (instrument and radios) become visible; you can then
ether toggle them (left-click) or adjust them (mouse wheel).  The
instruments are orange, the radios are white.  As in version 2, the
overhead lights also illuminate the throttle, RPM, mixture, flaps and
cowl flaps levers as well as the left-hand electrical switches
(magnetos, battery, lights, etc.).

I think it would be nice if this patch were included upstream in the
upcoming FlightGear 3.2.

#751847#39
Date:
2014-07-20 09:48:35 UTC
From:
To:
Hello Ludovic,

Thanks for working on this. (And kudos for using monotone for that. Did
you import the entire fgdata? Or just that aircraft?)

I must admit that I didn't test your changes, but I can confirm it still
applies upstream (on 3.2.0 and master).

I've just forwarded the patch to the fgfs-devel mailing list with you CC'ed.

Regards

Markus Wanner

#751847#52
Date:
2014-07-26 17:59:19 UTC
From:
To:
Markus Wanner writes:

Just that aircraft; I figured I'd use a branch per aircraft I wanted to
work on.  I named it org.flightgear.aircraft.SenecaII.

Thanks for that; I hope people like my changes.