Ron Jensen wrote:
> On Sat, 2008-03-01 at 20:37 -0700, dave perry wrote:
>
>> I just noticed that the recent electrical updates to the kt170.xml
>> submitted by Ron Jenson make the kt70 bright white if the instrument
>> lights are turned on in the pa24-250 and the pa28-161. This is because
>> the material animation factor should be between 0 and 1 and this change
>> makes it equal to the output voltage from the buss (usually either 14 or
>> 28 volts in most light AC).
>> <factor-prop>systems/electrical/outputs/instrument-lights</factor-prop>
>> This saturates the material red, green, blue values.
>>
<snip>
>>
>> Ron, is there a reason this needed to be changed for the kt70?
>>
>
> Hi Dave,
>
> The change was to make the KT-70 only work when the electrical system
> was turned on. The old setting of /controls/lighting/panel-norm was
> wrong, and needed to be changed to something based on the electical
> system.
>
In all the electrical systems I have done, bus_volts is always the
voltage that results when a switch connects the item to a bus. That way
I can model the impact of the loads when the bus is supplied only by the
battery. That is, if the pilot sits on the ramp with all the lights on
and the radios on, etc., then the battery will slowly discharge and the
voltage on the bus will slowly drop. If I need to have a normalized
value for a material animation, I normalize it in nasal and do a setprop
for the normalized value. Before your change, that was
setprop("/controls/lighting/panel-norm", bus_volts * 0.071428571 *
(1.0 - factor));
where the term (1.0-factor) implements the dimmer. That was so I would
not have to change the kt70.xml file. All the other panel objects
illuminated by the instrument lights have their material factor
controlled by
setprop("/sim/model/material/instruments/factor", bus_volts *
0.071428571 * (1.0 - factor));
Notice that, either way, this means that the instrument lights will also
slowly get dimmer as the loads discharges the battery. The number
0.071428571 is 1/14 and normalizes for the maximum voltage.
> The electrical systems I use normalize the property
> systems/electrical/outputs/instrument-lights.
>
By normalizing the /system/electrical/output/... property, the battery
discharge is no longer going to dim the instrument lights.
> I didn't realize you were using the KT70 or I would have verifed it
> worked on your planes, too.
>
> I don't like the property /sim/model/material/instruments/factor. I
> feel its in the wrong place, and isn't well named, and using both
> systems/electrical/outputs/instrument-lights and
> sim/model/material/instruments/factor is redundant.
>
It is not redundant if you are trying to model a battery that can
discharge which is the nature of real batteries. The fact that we need
to normalize is an artifact of the material animation implementation,
not a property of the electrical system. Using two properties here lets
the battery, switches, load impact, and dimmers all be realistically
taken into account. The artifact created by our implementation of
material animation is then accommodated by the
sim/model/material/instruments/factor. Normalizing
/system/electrical/outputs/instrument-lights to a number between 0 and 1
means is is no longer an electrical output. It is in fact a model
material factor.
> A grep thru CVS show there are only 5 aircraft
> using /sim/model/material/instruments/factor now.
>
> Most aircraft are using some variant of
> systems/electrical/outputs/instrument-lights. I'd like to use that as a
> normalized value to allow instruments to just work regardless of the
> system voltage modelled.
>
> What should be the standard for instrument lighting properties?
>
> Ron
>
Ron,
I am not sure what the standard should be. I just went through the
Instruments-3d sub folders and (if I counted correctly) 24 of them use
sim/model/material/instruments/factor
while 10 use
systems/electrical/outputs/instrument-lights
to change the emission material properties. The remainder do not adjust
the material properties.
I gave my reasons for having a factor that represents the voltage
separate from the normalized factor for the emission material property.
I just looked at pa24-electrical.nas and I believe I can model the
desired switch, dimmer, and battery discharge dimming using either
approach. But I find it distasteful to assign a material factor between
0 and 1 to a property in
/systems/electrical/output/... .
What do the rest of the team think? Am I just being pedantic?
- Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel