<?xml version="1.0"?>

<PropertyList>

    <name>PA-18 Amphibious Landing</name>

    <description>
This tutorial starts from Daniel K. Inouye International Airport (PHNL) and finishes at the seaplane airfield located in Oahu's Keehi Lagoon, Honolulu, Hawaii in clear, still, weather.

By now you should be proficient in the preflight checklist, startup proceedures, determining the appropriate taxiing route to the desired runway, takeoff, flying a pattern and landing.

You will start lined up on runway 22R, takeoff on heading 223, climb at 600 feet per minute leveling off at 1000 ft., turn left 180 degree onto final heading 043 and landing on water runway 4W at PHNL.

Water runway 4W/22W is parallel and immediately adjacent to land based runway 4R/22L.

Pay attention to the heading bug on landing it will approximate the mooring position.
    </description>

    <audio-dir>Tutorials/amphibious</audio-dir>
    <timeofday>morning</timeofday>

    <presets>
        <airport-id></airport-id>
        <on-ground>1</on-ground>
        <altitude-ft>-9999</altitude-ft>
        <latitude-deg type="double">21.32982026</latitude-deg>
        <longitude-deg type="double">-157.907044</longitude-deg>
        <heading-deg type="double">223</heading-deg>
        <airspeed-kt>0</airspeed-kt>
        <glideslope-deg>0</glideslope-deg>
        <offset-azimuth-deg>0</offset-azimuth-deg>
        <offset-distance-nm>0</offset-distance-nm>
        <airport-requested>true</airport-requested>
        <runway-requested>true</runway-requested>
        <parking-requested>true</parking-requested>
    </presets>

    <targets>
        <mooring>
            <!-- Mooring location -->
            <latitude-deg>21.31670172</latitude-deg>
            <longitude-deg>-157.9124451</longitude-deg>
        </mooring>
    </targets>

    <step>
        <message>If damage is off, you may turn it on now for more realism.</message>
        <nasal>
            <script>
                electrical.reset_battery_and_circuit_breakers();
            </script>
        </nasal>
        <set>
            <property>/instrumentation/adf/frequencies/selected-khz</property>
            <value>242</value> <!-- EWABE NDB -->
        </set>
        <set>
            <property>/it-stec55x/input/hdg</property>
            <value>223</value>
        </set>
        <set>
            <property>/environment/weather-scenario</property>
            <value>Fair weather</value>
        </set>
        <set>
            <property>instrumentation/altimeter/setting-inhg</property>
            <value>29.92</value>
        </set>
        <set>
            <property>/sim/model/j3cub/brake-parking</property>
            <value>1</value>
        </set>
        <set>
            <property>/controls/switches/master-bat</property>
            <value>1</value>
        </set>
        <set>
            <property>/controls/switches/master-alt</property>
            <value>1</value>
        </set>
        <set>
            <property>/controls/switches/master-avionics</property>
            <value>true</value>
        </set>
        <set>
            <property>/controls/flight/flaps</property>
            <value>0.0</value>
        </set>
        <set>
            <property>/controls/flight/elevator-trim</property>
            <value>-0.17</value>
        </set>
        <set>
            <property>/controls/switches/magnetos</property>
            <value>3</value>
        </set>
        <set>
            <property>/controls/engines/current-engine/throttle</property>
            <value>0.2</value>
        </set>
        <set>
            <property>/controls/engines/engine/primer</property>
            <value>4</value>
        </set>
        <set>
            <property>/controls/lighting/taxi-light</property>
            <value>false</value>
        </set>
        <set>
            <property>/controls/lighting/landing-light</property>
            <value>false</value>
        </set>
        <set>
            <property>/controls/anti-ice/pitot-heat</property>
            <value>false</value>
        </set>
        <set>
            <property>/controls/lighting/nav-lights</property>
            <value>false</value>
        </set>
        <set>
            <property>/controls/lighting/beacon-light</property>
            <value>false</value>
        </set>
        <set>
            <property>/controls/lighting/strobe-lights</property>
            <value>false</value>
        </set>
        <set>
            <property>/sim/model/door-positions/rightDoor/position-norm</property>
            <value>0</value>
        </set>
        <set>
            <property>/sim/model/j3cub/securing/chock</property>
            <value>false</value>
        </set>
        <set>
            <property>/sim/model/j3cub/securing/tiedownL-visible</property>
            <value>false</value>
        </set>
        <set>
            <property>/sim/model/j3cub/securing/tiedownR-visible</property>
            <value>false</value>
        </set>
        <set>
            <property>/sim/model/j3cub/securing/tiedownT-visible</property>
            <value>false</value>
        </set>
        <set>
            <property>/sim/model/j3cub/securing/pitot-cover-visible</property>
            <value>false</value>
        </set>
        <set>
            <property>sim/model/j3cub/engine_flag_0</property>
            <value>0</value>
        </set>
        <set>
            <property>sim/model/j3cub/engine_flag_1</property>
            <value>0</value>
        </set>
        <set>
            <property>sim/model/j3cub/engine_flag_2</property>
            <value>1</value>
        </set>
        <set>
            <property>/controls/engines/active-engine</property>
            <value>2</value>
        </set>
        <set>
            <property>sim/model/j3cub/bushkit_flag_0</property>
            <value>0</value>
        </set>
        <set>
            <property>sim/model/j3cub/bushkit_flag_1</property>
            <value>0</value>
        </set>
        <set>
            <property>sim/model/j3cub/bushkit_flag_2</property>
            <value>0</value>
        </set>
        <set>
            <property>sim/model/j3cub/bushkit_flag_3</property>
            <value>1</value>
        </set>
        <set>
            <property>sim/model/j3cub/bushkit_flag_4</property>
            <value>0</value>
        </set>
        <set>
            <property>sim/model/j3cub/bushkit_flag_5</property>
            <value>0</value>
        </set>
        <set>
            <property>fdm/jsbsim/bushkit</property>
            <value>3</value>
        </set>
        <set>
            <property>sim/model/variant</property>
            <value>3</value>
        </set>
        <set>
            <property>sim/model/j3cub/pa-18</property>
            <value>1</value>
        </set>
        <set>
            <property>/controls/switches/master-gear</property>
            <value>true</value>
        </set>
        <set>
            <property>/controls/gear/water-rudder</property>
            <value>false</value>
        </set>
        <set>
            <property>/sim/current-view/view-number-raw</property>
            <value>9</value>
        </set>
    </step>

    <step>
        <message>You are lined up ready for takeoff</message>       

        <nasal>
            <script>
                setprop("/controls/switches/master-bat", 1);
                setprop("/controls/engines/current-engine/mixture", 1.0);
                setprop("/controls/switches/starter", 1);
            </script>
        </nasal>
        <wait>15</wait>
    </step>

    <step>
        <message>Release the parking brakes and takeoff</message>
        <set>
            <property>/controls/switches/starter</property>
            <value>false</value>
        </set>

        <error>
            <message>Release the parking brake.</message>
            <condition>
                <equals>
                    <property>/sim/model/j3cub/brake-parking</property>
                    <value>1</value>
                </equals>
            </condition>
        </error>
    </step>

    <step>
        <message>Takeoff course of 223, smoothly apply full power, control direction using rudder or differential braking.</message>

        <error>
            <message>Turn avionics system power switch on.</message>
            <condition>
                <equals>
                    <property>/controls/switches/master-avionics</property>
                    <value>0</value>
                </equals>
            </condition>
        </error>
        <error>
            <message>Your gear must be down to take off Shift+[g].</message>
            <condition>
                <equals>
                    <property>/controls/gear/gear-down</property>
                    <value>0</value>
                </equals>
            </condition>
        </error>
        <error>
            <message>Apply full throttle for takeoff.</message>
            <condition>
                <less-than>
                    <property>/controls/engines/current-engine/throttle</property>
                    <value>0.95</value>
                </less-than>
            </condition>
        </error>

        <exit>
            <condition>
                <greater-than>
                    <property>/velocities/airspeed-kt</property>
                    <value>5.0</value>
                </greater-than>
            </condition>
        </exit>
    </step>

    <step>
        <message>Let the aircraft lift off at 65 knots, climb straight out on heading 223, 600 feet per minute.</message>

        <exit>
            <condition>
                <and>
                    <greater-than>
                        <property>/instrumentation/vertical-speed-indicator/indicated-speed-fpm</property>
                        <value>300</value>
                    </greater-than>
                    <less-than>
                        <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                        <value>238</value>
                    </less-than>
                    <greater-than>
                        <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                        <value>208</value>
                    </greater-than>
                </and>
            </condition>
        </exit>
    </step>

    <step>
        <message>Continue your climb on heading 223 at 600 feet per minute to 1000 feet.</message>

        <error>
            <message>You are heading too far left, turn right slightly to heading 223.</message>
            <condition>
                <less-than>
                    <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                    <value>208</value>
                </less-than>
            </condition>
        </error>
        <error>
            <message>You are heading too far right, turn left slightly to heading 223.</message>
            <condition>
                <greater-than>
                    <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                    <value>238</value>
                </greater-than>
            </condition>
        </error>
        <error>
            <message>Turn avionics system power switch on.</message>
            <condition>
                <equals>
                    <property>/controls/switches/master-avionics</property>
                    <value>0</value>
                </equals>
            </condition>
        </error>
        <error>
            <message>Raise your landing gear now [g].</message>
            <condition>
                <equals>
                    <property>/controls/gear/gear-down</property>
                    <value>1</value>
                </equals>
            </condition>
        </error>

        <exit>
            <condition>
                <and>
                    <greater-than>
                        <property>/instrumentation/altimeter/indicated-altitude-ft</property>
                        <value>900</value>
                    </greater-than>
                    <less-than>
                        <property>/instrumentation/altimeter/indicated-altitude-ft</property>
                        <value>1100</value>
                    </less-than>
                    <less-than>
                        <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                        <value>238</value>
                    </less-than>
                    <greater-than>
                        <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                        <value>208</value>
                    </greater-than>
                    <equals>
                        <property>/controls/gear/gear-down</property>
                        <value>0</value>
                    </equals>
                </and>
            </condition>
        </exit>
    </step>

    <step>
        <message>Level off between 900 and 1100 feet.</message>

        <error>
            <message>You are too low</message>
            <condition>
                <less-than>
                    <property>/instrumentation/altimeter/indicated-altitude-ft</property>
                    <value>900</value>
                </less-than>
            </condition>
        </error>
        <error>
            <message>You are too high</message>
            <condition>
                <greater-than>
                    <property>/instrumentation/altimeter/indicated-altitude-ft</property>
                    <value>1100</value>
                </greater-than>
            </condition>
        </error>
        <error>
            <message>You are heading too far left, turn right slightly to heading 223.</message>
            <condition>
                <less-than>
                    <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                    <value>208</value>
                </less-than>
            </condition>
        </error>
        <error>
            <message>You are heading too far right, turn left slightly to heading 223.</message>
            <condition>
                <greater-than>
                    <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                    <value>238</value>
                </greater-than>
            </condition>
        </error>

        <exit>
            <condition>
                <and>
                    <greater-than>
                        <property>/instrumentation/altimeter/indicated-altitude-ft</property>
                        <value>900</value>
                    </greater-than>
                    <less-than>
                        <property>/instrumentation/altimeter/indicated-altitude-ft</property>
                        <value>1100</value>
                    </less-than>
                    <less-than>
                        <property>instrumentation/vertical-speed-indicator/indicated-speed-fpm</property>
                        <value>300</value>
                    </less-than>
                    <greater-than>
                        <property>instrumentation/vertical-speed-indicator/indicated-speed-fpm</property>
                        <value>-300</value>
                    </greater-than>
                    <greater-than>
                        <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                        <value>207</value>
                    </greater-than>
                    <less-than>
                        <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                        <value>247</value>
                    </less-than>
                </and>

            </condition>
        </exit>
    </step>
    <step>
        <message>Continue outbound heading 223 at 1000 feet.</message>

        <exit>
            <condition>
                <or>
                    <greater-than>
                        <property>/position/longitude-deg</property>
                        <value>-157.9550502</value>
                    </greater-than>
                    <greater-than>
                        <property>/sim/tutorials/targets/mooring/distance-m</property>
                        <value>5240</value>
                    </greater-than>
                </or>
            </condition>
        </exit>
    </step>

    <step>
        <message>Execute a slow 180 degree left turn onto final heading 043, line up with water runway 4W at PHNL in Keehi Lagoon.</message>

        <set>
            <property>/it-stec55x/input/hdg</property>
            <value>50</value>
        </set>

        <exit>
            <condition>
                <and>
                    <greater-than>
                        <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                        <value>28</value>
                    </greater-than>
                    <less-than>
                        <property>/instrumentation/heading-indicator/indicated-heading-deg</property>
                        <value>58</value>
                    </less-than>
                </and>
            </condition>
        </exit>
    </step>

    <step>
        <message>Execute power and flap regime for landing.</message>

        <error>
            <message>Check throttle.</message>
            <condition>
                <greater-than>
                    <property>/controls/engines/current-engine/throttle</property>
                    <value>0.85</value>
                </greater-than>
            </condition>
        </error>
       <error>
            <message>Set some flaps at appropriate speed.</message>
            <condition>
                <and>
                    <less-than>
                        <property>/controls/flight/flaps</property>
                        <value>0.3</value>
                    </less-than>
                    <less-than>
                        <property>/velocities/airspeed-kt</property>
                        <value>110</value>
                    </less-than>
                </and>
            </condition>
        </error>

        <exit>
            <condition>
                <and>
                    <less-than>
                        <property>/controls/engines/current-engine/throttle</property>
                        <value>0.9</value>
                    </less-than>
                    <greater-than>
                        <property>/controls/flight/flaps</property>
                        <value>0</value>
                    </greater-than>
                    <less-than>
                       <property>/velocities/groundspeed-kt</property>
                       <value>70</value>
                    </less-than>
                </and>
            </condition>
        </exit>
    </step>

    <step>
        <message>Check gear advisory.</message>

        <error>
            <message>Turn avionics system power switch on.</message>
            <condition>
                <equals>
                    <property>/controls/switches/master-avionics</property>
                    <value>0</value>
                </equals>
            </condition>
        </error>
        <error>
            <message>Raise pontoon landing gear [g].</message>
            <condition>
                <and>
                    <less-than>
                       <property>/velocities/groundspeed-kt</property>
                       <value>70</value>
                    </less-than>
                    <equals>
                        <property>/controls/gear/gear-down</property>
                        <value>1</value>
                    </equals>
                </and>
            </condition>
        </error>
        <exit>
            <condition>
                <equals>
                    <property>/controls/gear/gear-down</property>
                    <value>0</value>
                </equals>
            </condition>
        </exit>
    </step>

    <step>
        <message>Execute landing.</message>

        <error>
            <message>Check throttle.</message>
            <condition>
                <greater-than>
                    <property>/controls/engines/current-engine/throttle</property>
                    <value>0.65</value>
                </greater-than>
            </condition>
        </error>
        <error>
            <message>Continue approach then gently touch down in the water.</message>
            <condition>
                <equals>
                    <property>/fdm/jsbsim/hydro/active-norm</property>
                    <value>0</value>
                </equals>
            </condition>
        </error>

        <exit>
            <condition>
                <equals>
                    <property>/fdm/jsbsim/hydro/active-norm</property>
                    <value>1</value>
                </equals>
            </condition>
        </exit>
    </step>

    <step>
        <message>Lower water rudders for better control Shift+[r].</message>

        <error>
            <message>Lower water rudders Shift+[r].</message>
            <condition>
                <equals>
                    <property>/controls/gear/water-rudder</property>
                    <value>0</value>
                </equals>
            </condition>
        </error>
        <error>
            <message>Settle back into the water.</message>
            <condition>
                <equals>
                    <property>/fdm/jsbsim/hydro/active-norm</property>
                    <value>0</value>
                </equals>
            </condition>
        </error>

        <exit>
            <and>
                <condition>
                    <less-than>
                        <property>/velocities/groundspeed-kt</property>
                        <value>20.0</value>
                    </less-than>
                </condition>
                <condition>
                    <equals>
                        <property>/controls/gear/water-rudder</property>
                        <value>1</value>
                    </equals>
                </condition>
                <condition>
                    <equals>
                        <property>/fdm/jsbsim/hydro/active-norm</property>
                        <value>1</value>
                    </equals>
                </condition>
            </and>
        </exit>
    </step>

    <step>
        <message>Taxi off of runway following your heading bug towards the mooring location.</message>

        <nasal>
            <script>
                setprop("/it-stec55x/input/hdg", getprop("/sim/tutorials/targets/mooring/heading-deg"));
            </script>
        </nasal>

        <error>
            <message>You're off course. To reach the mooring location turn to the left following your heading bug.</message>
            <nasal>
                <script>
                    setprop("/it-stec55x/input/hdg", getprop("/sim/tutorials/targets/mooring/heading-deg"));
                </script>
            </nasal>
            <condition>
                <less-than>
                    <property>/sim/tutorials/targets/mooring/direction-deg</property>
                    <value>-20</value>
                </less-than>
            </condition>
        </error>
        <error>
            <message>You're off course. To reach the mooring location turn to the right following your heading bug.</message>
            <nasal>
                <script>
                    setprop("/it-stec55x/input/hdg", getprop("/sim/tutorials/targets/mooring/heading-deg"));
                </script>
            </nasal>
            <condition>
                <greater-than>
                    <property>/sim/tutorials/targets/mooring/direction-deg</property>
                    <value>20</value>
                </greater-than>
            </condition>
        </error>

        <exit>
            <condition>
                <and>
                    <less-than>
                        <property>/sim/tutorials/targets/mooring/direction-deg</property>
                        <value>20</value>
                    </less-than>
                    <greater-than>
                        <property>/sim/tutorials/targets/mooring/direction-deg</property>
                        <value>-20</value>
                    </greater-than>
                </and>
            </condition>
        </exit>
    </step>

    <step>
        <message>Continue taxiing towards mooring location following your heading bug.</message>

        <exit>
            <condition>
                <less-than>
                    <property>/sim/tutorials/targets/mooring/distance-m</property>
                    <value>120.0</value>
                </less-than>
            </condition>
        </exit>
    </step>

    <step>
        <message>Prepare to set mooring anchor by immediately turning into the wind by following the heading bug, shut off the engine and open the Mooring Parameters menu.</message>

        <nasal>
            <script>
                setprop("/it-stec55x/input/hdg", getprop("/environment/wind-from-heading-deg"));
            </script>
        </nasal>

        <error>
            <message>Face into the wind (follow the heading bug) and shut off your engine.</message>
            <nasal>
                <script>
                    setprop("/it-stec55x/input/hdg", getprop("/environment/wind-from-heading-deg"));
                </script>
            </nasal>
            <condition>
                <equals>
                    <property>/engines/active-engine/running</property>
                    <value>1</value>
                </equals>
            </condition>
        </error>

        <exit>
            <condition>
                <equals>
                    <property>/engines/active-engine/running</property>
                    <value>0</value>
                </equals>
            </condition>
        </exit>
    </step>

    <step>
        <message>Get ready to drop the mooring anchor.</message>

        <nasal>
            <script>
                setprop("/it-stec55x/input/hdg", getprop("/environment/wind-from-heading-deg"));
            </script>
        </nasal>

        <error>
            <message>Face into the wind following your heading bug or using info from the Mooring Parameters menu, [Set] the mooring anchor under Mooring Parameters.</message>
            <condition>
                <equals>
                    <property>/controls/mooring/anchor</property>
                    <value>0</value>
                </equals>
            </condition>
        </error>
        <error>
            <message>Can't anchor with with forward speed greater than 7.</message>
            <condition>
                <greater-than>
                    <property>/fdm/jsbsim/hydro/vbx-fps</property>
                    <value>7</value>
                </greater-than>
            </condition>
        </error>
        <error>
            <message>If needed start engine briefly to gain momentum.</message>
            <condition>
                <less-than>
                    <property>/fdm/jsbsim/hydro/vbx-fps</property>
                    <value>3</value>
                </less-than>
            </condition>
        </error>
        <error>
            <message>Kill engine and face into the wind using momentum.</message>
            <nasal>
                <script>
                    setprop("/it-stec55x/input/hdg", getprop("/environment/wind-from-heading-deg"));
                </script>
            </nasal>
            <condition>
                <equals>
                    <property>/engines/active-engine/running</property>
                    <value>1</value>
                </equals>
            </condition>
        </error>
        <error>
            <message>Wind speed is too great to set mooring anchor.</message>
            <condition>
                <greater-than>
                    <property>/environment/windsock/wind-speed-kt</property>
                    <value>40</value>
                </greater-than>
            </condition>
        </error>

        <exit>
            <condition>
                <or>
                    <greater-than>
                        <property>/environment/windsock/wind-speed-kt</property>
                        <value>40</value>
                    </greater-than>
                    <equals>
                        <property>/controls/mooring/anchor</property>
                        <value>1</value>
                    </equals>
                </or>
            </condition>
        </exit>
    </step>

    <step>
        <message>Congratulations on successfully executing a ground take off, following a pattern to a water landing and then setting the mooring anchor.</message>
    </step>

</PropertyList>
