Board index FlightGear Development Spaceflight

Space Shuttle - Development

Discussion about development and usage of spacecraft

Re: Space Shuttle - Development

Postby GinGin » Wed Jul 01, 2020 11:50 am

Not too much time those days, but I finished the HUD adjustment

Image


And almost finished with APU layout

Image


I have tested the spring loaded declutter logic with Tie Bus switch, and it works nicely.
I used a factor of 0.5 to keep the min and max to 0 ( ala. off) and 1 (aka. on) with the middle neutral position at 0.5.

Like that, no impact on the other files linked to tie-switch property

Code: Select all
 <!-- Main Bus Tie A "Switch"-->
    <animation>
        <type>knob</type>
        <object-name>tie0-switch</object-name>
        <property>/fdm/jsbsim/systems/electrical/bus/tie-switch-pos</property>
        <factor>-25</factor>
        <offset-deg>20</offset-deg>
        <center>
            <x-m>-12.1826</x-m>
            <y-m>  1.2364 </y-m>
            <z-m> -0.6508 </z-m>
        </center>
        <axis>
            <x>1</x>
            <y>.3</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/electrical/bus/tie-switch-pos</property>
                <factor>0.5</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
            <binding>
                <command>nasal</command>
                <script>
          var switch_pos = getprop("/fdm/jsbsim/systems/electrical/bus/tie-switch-pos");
          if (switch_pos == 1)
         {
         setprop("/fdm/jsbsim/systems/electrical/bus/tie-switch", 1);
         settimer ( func {setprop("/fdm/jsbsim/systems/electrical/bus/tie-switch-pos", 0.5);}, 0.5);
         }
            else if (switch_pos == 0)
            {
         setprop("/fdm/jsbsim/systems/electrical/bus/tie-switch", 0);
         settimer ( func {setprop("/fdm/jsbsim/systems/electrical/bus/tie-switch-pos", 0.5);}, 0.5);
         }
              </script>
            </binding>
        </action>
        <hovered>
            <binding>
                <command>set-tooltip</command>
                <tooltip-id>tie0-switch</tooltip-id>
                <label>Main Bus Tie A: %s</label>
                <property>/fdm/jsbsim/systems/electrical/bus/tie-switch</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'N', 'On'];
                    return modes[arg[0]];
                </script>
            </binding>
        </hovered>
    </animation>



Red one below
Cyan one are all the spring loaded switches with the same logic to be applied
Plus the special logic for AC switches that require the AC controllers to be closed to be activated

Image
GinGin
 
Posts: 1040
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Development

Postby wlbragg » Thu Jul 02, 2020 2:07 am

I would just need for now a cws addition in model ( I think)
It is the AC overload ( yellow light ) next to ac voltage
That would complete the modelization of ac sensors that will automatically trip inverters in case of overload or overvolt conditions

I took a look at the CWS lights again and decided to darken the grid background and then use that average color and shade to fill in the background on all the warning light textures. It will look OK and requires very little time and effort.
As far as the AC Overload warning, it is already modeled and in place, I just need the property condition to activate it. It is currently only activated with a CWS test.
This is associated code right now, all there is is the procedural light activated by cw-test.
Code: Select all
    <!-- AC Overload "CW Yellow Light" -->
    <model>
      <name>proc_light_cw-light-ac-overload</name>
      <path>Effects/procedural_light_cw-light-ac-overload.xml</path>
      <offsets>
          <x-m>-12.485</x-m>
          <y-m>  0.106</y-m>
          <z-m> -0.421</z-m>
      </offsets>
      <condition>
          <and>
            <!--or>
              <equals>
                <property>/fdm/jsbsim/systems/cws/ac-overload</property>
                <value>1</value>
              </equals-->
              <equals>
                <property>/fdm/jsbsim/systems/cws/cw-test</property>
                <value>1</value>
              </equals>
            <!--/or-->
            <greater-than>
                <property>/sim/rendering/shaders/model</property>
                <value>1</value>
            </greater-than>
          </and>
      </condition>
    </model>
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5591
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Space Shuttle - Development

Postby GinGin » Sat Jul 04, 2020 11:51 am

@Wayne: very nice for the CWS panel, thanks.

Ok, I see for the overload light. I will feed it with a condition in cws.xml for ac overload.
The nasal command And script within model is really powerful for advanced switches logic.

I am also working on extending the number of Sm alert available through the cws.nas
I had another look in the malfunction book which deals with failure in Orbit, and it is very detailed on the symbology and conditions for failure logic ( and small differences between limited bfs Sm and pass Sm). Quite interesting .
I just need to be back behind the computer to test that :)

Could you animate the 8 hydraulic heaters bottom switches please Wayne ?

Image
GinGin
 
Posts: 1040
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Development

Postby wlbragg » Sat Jul 04, 2020 3:15 pm

Sure, I'll push the texture changes for the CWS at the same time. It's not much of a change but it makes the contrast between the text strips and the background less noticeable than it is currently.

EDIT:

@GinGin, they are already animated and assigned properties in Models/cockpit-detailed.xml
lines 3021 - 3713
Code: Select all
    <!-- ******************************************************************* -->
    <!-- Panel A12                                                           -->
    <!-- ******************************************************************* -->

    <!-- Gas Generator Fuel Pump Heater 1 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>gg-bed-heater1</object-name>
        <property>/fdm/jsbsim/systems/apu/apu/gg-bed-heater-status</property>
        <factor>35</factor>
        <offset-deg>10</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.6668</y-m>
            <z-m> -0.7261</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu/gg-bed-heater-status</property>
                <factor>1</factor>
                <min>-1</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>gg-bed-heater1</tooltip-id>
                <label>Gas Gen/Fuel Pump Heat 1: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu/gg-bed-heater-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'Auto A', 'Auto B'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Gas Generator Fuel Pump Heater 2 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>gg-bed-heater2</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[1]/gg-bed-heater-status</property>
        <factor>35</factor>
        <offset-deg>10</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.6269</y-m>
            <z-m> -0.7261</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[1]/gg-bed-heater-status</property>
                <factor>1</factor>
                <min>-1</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>gg-bed-heater2</tooltip-id>
                <label>Gas Gen/Fuel Pump Heat 2: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[1]/gg-bed-heater-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'Auto A', 'Auto B'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Gas Generator Fuel Pump Heater 3 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>gg-bed-heater3</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[2]/gg-bed-heater-status</property>
        <factor>35</factor>
        <offset-deg>10</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.5887</y-m>
            <z-m> -0.7261</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[2]/gg-bed-heater-status</property>
                <factor>1</factor>
                <min>-1</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>gg-bed-heater3</tooltip-id>
                <label>Gas Gen/Fuel Pump Heat 3: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[2]/gg-bed-heater-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'Auto A', 'Auto B'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Lube Oil Line Heater 1 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>lube-line-heater1</object-name>
        <property>/fdm/jsbsim/systems/apu/apu/lube-line-heater-status</property>
        <factor>35</factor>
        <offset-deg>10</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.5887</y-m>
            <z-m> -0.7261</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu/lube-line-heater-status</property>
                <factor>1</factor>
                <min>-1</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>lube-line-heater1</tooltip-id>
                <label>Lube Oil Line Heat 1: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu/lube-line-heater-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'Auto A', 'Auto B'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Lube Oil Line Heater 2 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>lube-line-heater2</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[1]/lube-line-heater-status</property>
        <factor>35</factor>
        <offset-deg>10</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.5218</y-m>
            <z-m> -0.7261</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[1]/lube-line-heater-status</property>
                <factor>1</factor>
                <min>-1</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>lube-line-heater2</tooltip-id>
                <label>Lube Oil Line Heat 2: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[1]/lube-line-heater-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'Auto A', 'Auto B'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Lube Oil Line Heater 3 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>lube-line-heater3</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[2]/lube-line-heater-status</property>
        <factor>35</factor>
        <offset-deg>10</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.4917</y-m>
            <z-m> -0.7261</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[2]/lube-line-heater-status</property>
                <factor>1</factor>
                <min>-1</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>lube-line-heater3</tooltip-id>
                <label>Lube Oil Line Heat 3: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[2]/lube-line-heater-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'Auto A', 'Auto B'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Tank/Fuel Line H2O Heater 1A "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>tank-heater1a</object-name>
        <property>/fdm/jsbsim/systems/apu/apu/tank-heater-A-status</property>
        <factor>90</factor>
        <offset-deg>-40</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.6668</y-m>
            <z-m> -0.789 </z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu/tank-heater-A-status</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>tank-heater1a</tooltip-id>
                <label>Tank/Fuel Line Heat 1A: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu/tank-heater-A-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'On'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Tank/Fuel Line H2O Heater 1B "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>tank-heater1b</object-name>
        <property>/fdm/jsbsim/systems/apu/apu/tank-heater-B-status</property>
        <factor>90</factor>
        <offset-deg>-40</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.6291</y-m>
            <z-m> -0.789 </z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu/tank-heater-B-status</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>tank-heater1b</tooltip-id>
                <label>Tank/Fuel Line Heat 1B: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu/tank-heater-B-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'On'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Tank/Fuel Line H2O Heater 2A "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>tank-heater2a</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[1]/tank-heater-A-status</property>
        <factor>90</factor>
        <offset-deg>-40</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.5887</y-m>
            <z-m> -0.789 </z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[1]/tank-heater-A-status</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>tank-heater2a</tooltip-id>
                <label>Tank/Fuel Line Heat 2A: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[1]/tank-heater-A-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'On'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Tank/Fuel Line H2O Heater 2B "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>tank-heater2b</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[1]/tank-heater-B-status</property>
        <factor>90</factor>
        <offset-deg>-40</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.5541</y-m>
            <z-m> -0.789 </z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[1]/tank-heater-B-status</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>tank-heater2b</tooltip-id>
                <label>Tank/Fuel Line Heat 2B: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[1]/tank-heater-B-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'On'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Tank/Fuel Line H2O Heater 3A "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>tank-heater3a</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[2]/tank-heater-A-status</property>
        <factor>90</factor>
        <offset-deg>-40</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.5227</y-m>
            <z-m> -0.789 </z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[2]/tank-heater-A-status</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>tank-heater3a</tooltip-id>
                <label>Tank/Fuel Line Heat 3A: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[2]/tank-heater-A-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'On'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Tank/Fuel Line H2O Heater 3B "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>tank-heater3b</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[2]/tank-heater-B-status</property>
        <factor>90</factor>
        <offset-deg>-40</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.4917</y-m>
            <z-m> -0.789 </z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[2]/tank-heater-B-status</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>tank-heater3b</tooltip-id>
                <label>Tank/Fuel Line Heat 3B: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[2]/tank-heater-B-status</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['Off', 'On'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Hyd Circulation Pump Power 1 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>hyd-circ-pump-pwr-sel1</object-name>
        <property>/fdm/jsbsim/systems/apu/apu/hyd-circ-pump-pwr-sel</property>
        <factor>65</factor>
        <offset-deg>-30</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.3878</y-m>
            <z-m> -0.8536</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu/hyd-circ-pump-pwr-sel</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>hyd-circ-pump-pwr-sel1</tooltip-id>
                <label>Hyd Circulation Pump Power 1: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu/hyd-circ-pump-pwr-sel</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['MNB', 'MNA'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Hyd Circulation Pump Power 2 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>hyd-circ-pump-pwr-sel2</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[1]/hyd-circ-pump-pwr-sel</property>
        <factor>65</factor>
        <offset-deg>-30</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.3567</y-m>
            <z-m> -0.8536</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[1]/hyd-circ-pump-pwr-sel</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>hyd-circ-pump-pwr-sel2</tooltip-id>
                <label>Hyd Circulation Pump Power 2: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[1]/hyd-circ-pump-pwr-sel</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['MNB', 'MNA'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>

    <!-- Hyd Circulation Pump Power 3 "Switch" -->
    <animation>
        <type>knob</type>
        <object-name>hyd-circ-pump-pwr-sel3</object-name>
        <property>/fdm/jsbsim/systems/apu/apu[2]/hyd-circ-pump-pwr-sel</property>
        <factor>65</factor>
        <offset-deg>-30</offset-deg>
        <center>
            <x-m>-10.5879</x-m>
            <y-m>  0.3279</y-m>
            <z-m> -0.8536</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
        <action>
            <binding>
                <command>property-adjust</command>
                <property>/fdm/jsbsim/systems/apu/apu[2]/hyd-circ-pump-pwr-sel</property>
                <factor>1</factor>
                <min>0</min>
                <max>1</max>
                <wrap>false</wrap>
            </binding>
            <binding>
                <command>nasal</command>
                <script>SpaceShuttle.click("avionics")</script>
            </binding>
        </action>
        <hovered>
          <binding>
                <command>set-tooltip</command>
                <tooltip-id>hyd-circ-pump-pwr-sel3</tooltip-id>
                <label>Hyd Circulation Pump Power 3: %s</label>
                <property>/fdm/jsbsim/systems/apu/apu[2]/hyd-circ-pump-pwr-sel</property>
                <mapping>nasal</mapping>
                <script>
                    var modes = ['MNB', 'MNA'];
                    return modes[arg[0]];
                </script>
          </binding>
        </hovered>
    </animation>
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5591
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Space Shuttle - Development

Postby GinGin » Thu Jul 09, 2020 7:47 am

@Wayne: I was speaking of the 8 switches not highlighted in yellow in the picture.
They are not yet modelled I think, those below Hydraulic heaters .


Is there a way to render a font bold ( maybe with font weight ) without editing the font itself ( like a liberation monobold)
I would like to try to render the SSU font bold in the new font system .


I also discovered some very useful informations in the malfunction book.

There are some proper sum up of what is exactly on each main bus electrical wise. That spacecraft was really a nuclear plant :)
Very interesting for fine tuning where each element belongs bus wise , especially heaters with weird redundancy across the three bus
I would like now to find a proper sum up of every circuit breaker to have the exact amps hence power of future modelised system.
GinGin
 
Posts: 1040
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Development

Postby Thorsten » Thu Jul 09, 2020 9:59 am

Is there a way to render a font bold ( maybe with font weight ) without editing the font itself ( like a liberation monobold)
I would like to try to render the SSU font bold in the new font system .


No - a bold font is actually a separately designed vector map of all characters, independent of the original one, so for all practical purposes internally it is a different font, only the selector logic usually lets you believe there's a connection because fonts with the same design are offered as bold or italic.

But there's no simple switch to make it bold.

In canvas you can achieve something like highlighting by duplicating the display of a string and moving them a few points apart - but that's complicated to implement and has issues when you look closely.
Thorsten
 
Posts: 11638
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Development

Postby wlbragg » Thu Jul 09, 2020 5:53 pm

I was speaking of the 8 switches not highlighted in yellow in the picture.

Duu! :oops: I get it, yellow (ctrl+c) = active. Sorry!
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5591
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Space Shuttle - Development

Postby GinGin » Fri Jul 10, 2020 7:26 am

wlbragg wrote in Thu Jul 09, 2020 5:53 pm:
I was speaking of the 8 switches not highlighted in yellow in the picture.

Duu! :oops: I get it, yellow (ctrl+c) = active. Sorry!



No worries Wayne :)

@Thorsten : Ok, I see better how it works , thanks.
I will try to edit it through the font software then it
GinGin
 
Posts: 1040
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Development

Postby GinGin » Sat Jul 11, 2020 4:24 am

I found another interesting book l Reference data.
It displays mainly all the fault messages .
As the failure system is very deep, It can be interesting to add more messages.
I will try it first with elec failure messsages as I am finishing ac switches and logic .

The main difference between bfs sm and pass sm fault ( ops 2 only) is message layout.

I was wondering if it would be easy in the cws.nas to add a condition like that within one of the fault functions :


If ops = 2 and a gpc has sm, then fault message equal that 
Else if ops != 2 and a gpc has bfs, fault message equal this
GinGin
 
Posts: 1040
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: Space Shuttle - Development

Postby Thorsten » Sat Jul 11, 2020 6:03 am

We don't do per GPC fault messages though (which is why GPC faults aren't properly messaged...) - that's really ugly to do because it increases the load of the fault detection routine by a large factor (rather than checking whether a fault occurred, we'd need to check in addition whether a GPC is on, powered, functional. what software it holds,...).

We do different fault messages for PASS and BFS though, so the detection routines have three options

a) announce PASS only
b) announce BFS only
c) announce PASS and BFS

and that means there's two strings in properties, as PASS and BFS string, and that means you can announce the same fault with a different message on PASS and BFS (I'm not entirely sure that's all you're looking for, but it might come close).
Thorsten
 
Posts: 11638
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Development

Postby Hooray » Sat Jul 11, 2020 5:17 pm

Thorsten wrote in Thu Jul 09, 2020 9:59 am:
Is there a way to render a font bold ( maybe with font weight ) without editing the font itself ( like a liberation monobold)
I would like to try to render the SSU font bold in the new font system .

No - a bold font is actually a separately designed vector map of all characters, independent of the original one, so for all practical purposes internally it is a different font, only the selector logic usually lets you believe there's a connection because fonts with the same design are offered as bold or italic.

But there's no simple switch to make it bold.

In canvas you can achieve something like highlighting by duplicating the display of a string and moving them a few points apart - but that's complicated to implement and has issues when you look closely.


Note that SVG files that bypass the custom Nasal parser in svg.nas can be shown using Canvas::Image instead - that way, they will be rendered as static raster images, so you are sacrificing some flexibility obviously, but you can use much more SVG markup than is supported by svg.nas, which is to say you can use conventional SVG/XML markup to create formatted fonts - the corresponding SVG node will be loaded, and rendered, asynchronously by OSG using a ReaderWriter plugin that depends on librsvg-dev (on Linux) - the plugin loads the file dynamically, so you don't need to patch/rebuild fgfs at all, all that is needed is installing the corresponding dependency (librsvg2-dev via apt-get on Linux).

This means, that something like the following should "just work":

https://developer.mozilla.org/en-US/doc ... ont-weight
Code: Select all
<svg viewBox="0 0 200 30" xmlns="http://www.w3.org/2000/svg">
  <text y="20" font-weight="normal">Normal text</text>
  <text x="100" y="20" font-weight="bold">Bold text</text>
</svg>


Like I said previously, you will typically want to deal with such markup separately by using a separate SVG/XML file, and because of the flexibility that you are sacrificing by treating the SVG as a raster image, you will probably want to add it underneath a separate Canvas.Group, so that you can easily transform the node procedurally.

The other side effect is much better performance (files being loaded asynchronously and not causing any Nasal/property tree overhead at all), while also supporting much more SVG markup.

So, all SVG files added via Canvas.Image are rasterized/rendered by librsvg/cairo respectively, which also means that osgText is bypassed, too - which is also good to know due to long-standing osgText issues.

Background here: SVG parser performance (from Cessna C182T)


PS: The other option is to revisit supporting effects/shaders per Canvas (element) and procedurally convert fonts via a dedicated effect/shader: http://wiki.flightgear.org/Canvas_Devel ... 2F_Shaders
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11835
Joined: Tue Mar 25, 2008 8:40 am

Re: Space Shuttle - Development

Postby wlbragg » Sat Jul 11, 2020 5:55 pm

Animated objects (you probably don't care about these names)
Models/cockpit-detailed.xml lines 3724 to 4090

rudder-spd-brake-heat-a
rudder-spd-brake-heat-b
body-flap-heat-a
body-flap-heat-b
elevon-heat-a
elevon-heat-b
aft-fuselage-heat-a
aft-fuselage-heat-b

Properties initialized in SpaceShuttle-common.xml (about lines 649 to 656)
I added them right above the apu sub heading as I wasn't sure where they best belong, i.e., maybe in the apu heading? All set to 0 of type int.

If you change the property names/paths make sure you change them in both the switch animations in cockpit-detailed (lines 3724 to 4090) and in the SpaceShuttle-common.xml file lines (649 to 656)

/fdm/jsbsim/systems/rudder-spd-brake-heat-a-status
/fdm/jsbsim/systems/rudder-spd-brake-heat-b-status
/fdm/jsbsim/systems/body-flap-heat-a-status
/fdm/jsbsim/systems/body-flap-heat-b-status
/fdm/jsbsim/systems/elevon-heat-a-status
/fdm/jsbsim/systems/elevon-heat-b-status
/fdm/jsbsim/systems/aft-fuselage-heat-a-status
/fdm/jsbsim/systems/aft-fuselage-heat-b-status

pushed to dev
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5591
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Space Shuttle - Development

Postby Thorsten » Sat Jul 11, 2020 5:58 pm

This means, that something like the following should "just work":


Have you ever in your life designed a font?

Because I have, and so I know there's no 'simple' operation to turn a normal into a bold or italic font. So if you don't have a boldface part in your original font, I seriously doubt that adding any SVG xml will magically create it from nothing and 'just work' to create that non-existing boldface font.
Thorsten
 
Posts: 11638
Joined: Mon Nov 02, 2009 8:33 am

Re: Space Shuttle - Development

Postby Hooray » Sat Jul 11, 2020 6:04 pm

that's not the point (we don't disagree at all, and yes I actually understand what a font is, and I do understand with your LaTex/Elvish background, you feel that you must be in a superior position to judge that I am wrong) - but the point really was that svg.nas (Nasal, Canvas and osgText) can be bypassed by going through Canvas.Image, and OSG's ReaderWriter machinery - so that librsvg and cairo handle the rasterization/rendering of SVG/XML <text> nodes - thus, we are not disagreeing at all, I just shared/presented an option to have text formatting (bold) by using a different approach.

And yes, like you said, it will not be "created from nothing", it will go through librsvg and cairo - using whatever fonts are available there.

Again, let's not argue, I was merely sharing a different method to render a bold text string via SVG/XML that does not go through svg.nas, nothing else.

No reason to argue/fight at all (and also not interested in doing so ...)

PS: I really don't understand why you are apparently being so argumentative/offended, this was just intended to be shared knowledge - because it wasn't clear to me whether you realized that what I described, is actually an option ?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11835
Joined: Tue Mar 25, 2008 8:40 am

Re: Space Shuttle - Development

Postby Thorsten » Sun Jul 12, 2020 5:23 am

I really don't understand why you are apparently being so argumentative/offended


Because it seems to me you didn't even read the question. GinGin asked

I would like to try to render the SSU font bold in the new font system .


So there's a specific font (SSU) and he wants to render that bold. Unfortunately I know the font (because I looked at it in FontForge at some point) and there's simply no boldface provided. So you can't have it bold without first designing that. Which is what I explained.

Now, you chime in and give a lengthy answer that - as far as I can see - has nothing to do with the core point of the boldface simply not being provided (if you don't have it as vector, you don't have it as raster image either - it's simply not there because no one designed it) but culminates in 'the following should just work' - which gives the wrong impression that you can create a missing boldface font out of nothing and implies that I am wrong in my initial answer.

Which forces me to spend yet more time to reply to this issue and create a lengthier exchange - which wouldn't have happened if you would have read that the question is about a particular font (SSU) which lacks boldface, not about how to do this with any random font in FG (which usually has boldface).
Thorsten
 
Posts: 11638
Joined: Mon Nov 02, 2009 8:33 am

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest