1
0
Fork 0

Merge branch 'work' of D:\Git_New\fgdata

This commit is contained in:
Vivian Meazza 2012-09-19 20:50:55 +01:00
commit f885987f93
12 changed files with 1181 additions and 211 deletions

View file

@ -0,0 +1,444 @@
<PropertyList>
<checklist>
<title>Before Starting Engine</title>
<item>
<name>Preflight Inspection</name>
<value>COMPLETE</value>
</item>
<item>
<name>Passenger</name>
<value>COMPLETE</value>
</item>
<item>
<name>Seats, Seat Belts, Shoulder Harnesses</name>
<value>ADJUST and LOCK</value>
</item>
<item>
<name>Brakes</name>
<value>TEST and SET (shift-B)</value>
</item>
<item>
<name>Avionics Power Switch</name>
<value>OFF</value>
</item>
<item>
<name>Circuit Breakers</name>
<value>CHECK IN</value>
</item>
<item>
<name>Electrical Equipment, Autopilot</name>
<value>OFF</value>
</item>
<item>
<name>Fuel Selector Valve</name>
<value>BOTH</value>
</item>
</checklist>
<checklist>
<title>Starting Engine</title>
<item>
<name>Prime</name>
<value>As Required - 2-6 strokes</value>
</item>
<item>
<name>Carburetor Heat</name>
<value>COLD</value>
</item>
<item>
<name>Throttle</name>
<value>OPEN 1/8 INCH</value>
</item>
<item>
<name>Mixture</name>
<value>RICH</value>
</item>
<item>
<name>Propellor Area</name>
<value>CLEAR</value>
</item>
<item>
<name>Master Switch</name>
<value>ON</value>
</item>
<item>
<name>Magnetos</name>
<value>BOTH</value>
<value>(press } three times)</value>
</item>
<item>
<name>Ignition Switch</name>
<value>ON</value>
<value>(press s, release when engine starts)</value>
</item>
<item>
<name>Oil Pressure</name>
<value>CHECK</value>
</item>
<item>
<name>Avionics Power Switch</name>
<value>ON</value>
</item>
<item>
<name>Navigation Lights and Flashing Beacon</name>
<value>ON as required</value>
</item>
<item>
<name>Radios</name>
<value>ON</value>
</item>
</checklist>
<checklist>
<title>Before Takeoff</title>
<item>
<name>Parking Brake</name>
<value>SET (shift-B)</value>
</item>
<item>
<name>Seats, Seat Belts, Shoulder Harnesses</name>
<value>CHECK SECURE</value>
</item>
<item>
<name>Cabin Doors</name>
<value>CLOSED and LOCKED</value>
</item>
<item>
<name>Flight Controls</name>
<value>FREE and CORRECT</value>
</item>
<item>
<name>Flight Instruments</name>
<value>CHECK and SET</value>
</item>
<item>
<name>Fuel Quantity</name>
<value>CHECK</value>
</item>
<item>
<name>Mixture</name>
<value>RICH</value>
</item>
<item>
<name>Fuel Selector Valve</name>
<value>RECHECK BOTH</value>
</item>
<item>
<name>Elevator Trim</name>
<value>SET for takeoff</value>
</item>
<item>
<name>Throttle</name>
<value>1700 RPM</value>
</item>
<item>
<name>Magnetos</name>
<value>CHECK RPM DROP</value>
<value>(125 rpm max)</value>
</item>
<item>
<name>Carburetor Heat</name>
<value>CHECK for RPM drop</value>
</item>
<item>
<name>Suction Gauge</name>
<value>CHECK</value>
</item>
<item>
<name>Engine Instruments and Ammeter</name>
<value>CHECK</value>
</item>
<item>
<name>Throttle</name>
<value>1000RPM or LESS</value>
</item>
<item>
<name>Throttle Friction Lock</name>
<value>ADJUST</value>
</item>
<item>
<name>Strobe Lights</name>
<value>AS DESIRED</value>
</item>
<item>
<name>Radios and Avionics</name>
<value>SET</value>
</item>
<item>
<name>Autopilot</name>
<value>OFF</value>
</item>
<item>
<name>Wing Flaps</name>
<value>SET for takeoff</value>
</item>
<item>
<name>Brakes</name>
<value>RELEASE</value>
</item>
</checklist>
<checklist>
<title>Normal Takeoff</title>
<item>
<name>Wing Flaps</name>
<value>0 - 10 degrees</value>
</item>
<item>
<name>Carburetor Heat</name>
<value>COLD</value>
</item>
<item>
<name>Throttle</name>
<value>FULL OPEN</value>
</item>
<item>
<name>Elevator Control</name>
<value>LIFT NOSE WHEEL</value>
<value>(at 55 KIAS)</value>
</item>
</checklist>
<checklist>
<title>Short Field Takeoff</title>
<item>
<name>Wing Flaps</name>
<value>10 degrees</value>
</item>
<item>
<name>Carburetor Heat</name>
<value>COLD</value>
</item>
<item>
<name>Brakes</name>
<value>APPLY</value>
</item>
<item>
<name>Throttle</name>
<value>FULL OPEN</value>
</item>
<item>
<name>Mixture</name>
<value>RICH</value>
<value>(above 3000ft, LEAN to obtain maximum RPM)</value>
</item>
<item>
<name>Brakes</name>
<value>RELEASE</value>
</item>
<item>
<name>Elevator Control</name>
<value>SLIGHTLY TAIL LOW</value>
</item>
<item>
<name>Climb Speed</name>
<value>56 KIAS</value>
</item>
</checklist>
<checklist>
<title>Enroute Climb</title>
<item>
<name>Airspeed</name>
<value>70-85 KIAS</value>
</item>
<item>
<name>Throttle</name>
<value>FULL OPEN</value>
</item>
<item>
<name>Mixture</name>
<value>RICH</value>
<value>(above 3000ft, LEAN to obtain maximum RPM)</value>
</item>
</checklist>
<checklist>
<title>Cruise</title>
<item>
<name>Power</name>
<value>2100-2700 RPM</value>
<value>(no more than 75% recommended)</value>
</item>
<item>
<name>Elevator Trim</name>
<value>ADJUST</value>
</item>
<item>
<name>Mixture</name>
<value>LEAN</value>
</item>
</checklist>
<checklist>
<title>Descent</title>
<item>
<name>Fuel Selector Valve</name>
<value>BOTH</value>
</item>
<item>
<name>Power</name>
<value>AS DESIRED</value>
</item>
<item>
<name>Mixture</name>
<value>ADJUST for smooth operation</value>
<value>(full rich for idle power)</value>
</item>
<item>
<name>Carburetor Heat</name>
<value>FULL HEAT AS REQUIRED</value>
<value>(to prevent carburetor icing)</value>
</item>
</checklist>
<checklist>
<title>Before Landing</title>
<item>
<name>Seats, Seat Belt, Shoulder Harnesses</name>
<value>SECURE</value>
</item>
<item>
<name>Fuel Selector Valve</name>
<value>BOTH</value>
</item>
<item>
<name>Mixture</name>
<value>RICH</value>
</item>
<item>
<name>Carburetor Heat</name>
<value>FULL HEAT</value>
<value>(apply full heat before reducing power)</value>
</item>
<item>
<name>Autopilot</name>
<value>OFF</value>
</item>
</checklist>
<checklist>
<title>Normal Landing</title>
<item>
<name>Airspeed</name>
<value>65-75 KIAS (flaps UP)</value>
</item>
<item>
<name>Wing Flaps</name>
<value>AS DESIRED</value>
<value>(0 - 10 degrees below 110KIAS</value>
<value>10 - 30 degrees below 85KIAS</value>
</item>
<item>
<name>Airspeed</name>
<value>60-70 KIAS (flaps DOWN)</value>
</item>
<item>
<name>Touchdown</name>
<value>MAIN WHEELS FIRST</value>
</item>
<item>
<name>Landing Roll</name>
<value>LOWER NOSE WHEEL GENTLY</value>
</item>
<item>
<name>Braking</name>
<value>MINIMUM REQUIRED</value>
</item>
</checklist>
<checklist>
<title>Short Field Landing</title>
<item>
<name>Airspeed</name>
<value>65-75 KIAS (flaps UP)</value>
</item>
<item>
<name>Wing Flaps</name>
<value>FULL DOWN (30 degrees)</value>
</item>
<item>
<name>Airspeed</name>
<value>61 KIAS (until flare)</value>
</item>
<item>
<name>Power</name>
<value>REDUCE to idle after clearing obstacle</value>
</item>
<item>
<name>Touchdown</name>
<value>MAIN WHEELS FIRST</value>
</item>
<item>
<name>Braking</name>
<value>APPLY HEAVILY</value>
</item>
<item>
<name>Wing Flaps</name>
<value>RETRACT</value>
</item>
</checklist>
<checklist>
<title>Aborted Landing</title>
<item>
<name>Throttle</name>
<value>FULL OPEN</value>
</item>
<item>
<name>Carburetor Heat</name>
<value>COLD</value>
</item>
<item>
<name>Wing Flaps</name>
<value>20 degrees (immediately)</value>
</item>
<item>
<name>Climb Speed</name>
<value>55 KIAS</value>
</item>
<item>
<name>Wing Flaps</name>
<value>10 degrees (until obstacles are cleared)</value>
<value>RETRACT (after reaching safe altitude and 60 KIAS)</value>
</item>
</checklist>
<checklist>
<title>After Landing</title>
<item>
<name>Carburetor Heat</name>
<value>COLD</value>
</item>
<item>
<name>Wing Flaps</name>
<value>UP</value>
</item>
</checklist>
<checklist>
<title>Securing Airplane</title>
<item>
<name>Parking Brake</name>
<value>SET</value>
</item>
<item>
<name>Avionics, Power, Electrical, Autopilot</name>
<value>OFF</value>
</item>
<item>
<name>Mixture</name>
<value>PULLED FULL OUT</value>
</item>
<item>
<name>Ignition Switch</name>
<value>OFF</value>
</item>
<item>
<name>Control Lock</name>
<value>INSTALL</value>
</item>
</checklist>
</PropertyList>

View file

@ -13,33 +13,11 @@
<desc>Increase/decrease panel lighting</desc>
</key>
<line/>
<line>_________Engine Start Checklist_________</line>
<line>Mixture: Rich</line>
<line>Throttle: Open 1/8"</line>
<line>Parking Brake: Applied (Shift-B)</line>
<line>Prop Area: Clear</line>
<line>Magnetos: Both ( } three times )</line>
<line>Ignition: Start (s)</line>
<line>Throttle: 800-1000rpm</line>
<line>For checklists, see under Help->Aircraft Checklists</line>
<line/>
<line>_________Pre-Takeoff Checklist_________</line>
<line>Parking Brake: Applied (Shift-B)</line>
<line>Flight Controls: Free and Correct</line>
<line>Elevator Trim: Takeoff</line>
<line>Mixture: Rich</line>
<line>Throttle: 1700rpm</line>
<line>Suction gauge: Check</line>
<line>Engine Instruments: Check</line>
<line>Ammeter: Check</line>
<line>Magnetos: Check (125rpm max drop, 50rpm max diff</line>
<line>Throttle: Closed (check idle)</line>
<line>Throttle: 800-1000rpm</line>
<line>Mixture: As required</line>
<line/>
<line>_________Procedures_________</line>
<line>Takeoff: no flaps, full throttle, rotate at 55 KIAS</line>
<line>Climbout: no flaps, full throttle, 80 KIAS</line>
<line>Cruise: Throttle 65%, Mixture rich of peak,</line>
<line>Cruise: Throttle 65%, Mixture rich of peak</line>
<line>Landing: full flaps, 65 KIAS</line>
<line/>
<line>_________V Speeds_________</line>

View file

@ -97,6 +97,8 @@ Started October 23 2001 by John Check, fgpanels@rockfish.net
<help include="c172-help.xml"/>
<checklists include="c172-checklists.xml"/>
<tutorials include="Tutorials/c172-tutorials.xml"/>
<dimensions>

View file

@ -20,6 +20,9 @@
Button 13/14 (left hand quadrant buttons): Flaps Up/Down
Buttons 15/16 (middle quadrant buttons): Gear Up/Down
Buttons 17/18 (right quandrant buttons): Spoilers Up/Down
Button 19 (Throttle < 0): Reverse Thrust
Button 20 (Prop < 0): Propellor Beta
Button 21 (Mixture <0) : Cut-off
Buttons 23/24/25 (right hand selector switch): View direction Sensitivity
-->
@ -32,7 +35,7 @@
<name>Pro Flight Cessna Yoke</name>
<axis n="0">
<name>Yoke left/right</name>
<name>Yoke lepft/right</name>
<desc>Aileron</desc>
<binding>
<command>property-scale</command>
@ -379,6 +382,191 @@
</binding>
</mod-up>
</button>
<button n="19"> <!-- Power < 0 -->
<name>Throttle pushed below 0</name>
<desc>Thrust reverser/beta</desc>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[0]/reverser</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[1]/reverser</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[2]/reverser</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[3]/reverser</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/engine[0]/reverse-thrust</property>
<value>1</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/engine[1]/reverse-thrust</property>
<value>1</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/engine[2]/reverse-thrust</property>
<value>1</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/engine[3]/reverse-thrust</property>
<value>1</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[0]/reverser</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[1]/reverser</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[2]/reverser</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[3]/reverser</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/engine[0]/reverse-thrust</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/engine[1]/reverse-thrust</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/engine[2]/reverse-thrust</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/engine[3]/reverse-thrust</property>
<value>0</value>
</binding>
</mod-up>
</button>
<button n="20"> <!-- Propeller < 0 -->
<name>Propeller pushed below 0</name>
<desc>Feather Prop</desc>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[0]/propeller-feather</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[1]/propeller-feather</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[2]/propeller-feather</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[3]/propeller-feather</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[0]/propeller-feather</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[1]/propeller-feather</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[2]/propeller-feather</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[3]/propeller-feather</property>
<value>false</value>
</binding>
</mod-up>
</button>
<button n="21"> <!-- Mixture < 0 -->
<name>Mixture pushed below 0</name>
<desc>Engine cut-off</desc>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[0]/cutoff</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[1]/cutoff</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[2]/cutoff</property>
<value>true</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[3]/cutoff</property>
<value>true</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[0]/cutoff</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[1]/cutoff</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[2]/cutoff</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>/controls/engines/engine[3]/cutoff</property>
<value>false</value>
</binding>
</mod-up>
</button>
<button n="22">
<name>Yoke mode switch left</name>
<desc>Coolie hat sensitivity low</desc>

182
Nasal/canvas/map.nas Normal file
View file

@ -0,0 +1,182 @@
# Runway
#
var Runway = {
# Create Runway from hash
#
# @param rwy Hash containing runway data as returned from
# airportinfo().runways[ <runway designator> ]
new: func(rwy)
{
return {
parents: [Runway],
rwy: rwy
};
},
# Get a point on the runway with the given offset
#
# @param pos Position along the center line
# @param off Offset perpendicular to the center line
pointOffCenterline: func(pos, off = 0)
{
var coord = geo.Coord.new();
coord.set_latlon(me.rwy.lat, me.rwy.lon);
coord.apply_course_distance(me.rwy.heading, pos - 0.5 * me.rwy.length);
if( off )
coord.apply_course_distance(me.rwy.heading + 90, off);
return ["N" ~ coord.lat(), "E" ~ coord.lon()];
}
};
# AirportMap
#
var AirportMap = {
# Create AirportMap from hash
#
# @param apt Hash containing airport data as returned from airportinfo()
new: func(apt)
{
return {
parents: [AirportMap],
_apt: apt
};
},
# Build the graphical representation of the represented airport
#
# @param layer_runways canvas.Group to attach airport map to
build: func(layer_runways)
{
var rws_done = {};
me.grp_apt = layer_runways.createChild("group", "apt-" ~ me._apt.id);
foreach(var rw; keys(me._apt.runways))
{
var is_heli = substr(rw, 0, 1) == "H";
var rw_dir = is_heli ? nil : int(substr(rw, 0, 2));
var rw_rec = "";
var thresh_rec = 0;
if( rw_dir != nil )
{
rw_rec = sprintf("%02d", math.mod(rw_dir - 18, 36));
if( size(rw) == 3 )
{
var map_rec = {
"R": "L",
"L": "R",
"C": "C"
};
rw_rec ~= map_rec[substr(rw, 2)];
}
if( rws_done[rw_rec] != nil )
continue;
var rw_rec = me._apt.runways[rw_rec];
if( rw_rec != nil )
thresh_rec = rw_rec.threshold;
}
rws_done[rw] = 1;
rw = me._apt.runways[rw];
var icon_rw =
me.grp_apt.createChild("path", "runway-" ~ rw.id)
.setStrokeLineWidth(0.5)
.setColor(1.0,1.0,1.0)
.setColorFill(0.2, 0.2, 0.2);
var rwy = Runway.new(rw);
var beg_thr = rwy.pointOffCenterline(rw.threshold);
var beg_thr1 = rwy.pointOffCenterline(rw.threshold, 0.5 * rw.width);
var beg_thr2 = rwy.pointOffCenterline(rw.threshold, -0.5 * rw.width);
var beg1 = rwy.pointOffCenterline(0, 0.5 * rw.width);
var beg2 = rwy.pointOffCenterline(0, -0.5 * rw.width);
var end_thr = rwy.pointOffCenterline(rw.length - thresh_rec);
var end_thr1 = rwy.pointOffCenterline(rw.length - thresh_rec, 0.5 * rw.width);
var end_thr2 = rwy.pointOffCenterline(rw.length - thresh_rec, -0.5 * rw.width);
var end1 = rwy.pointOffCenterline(rw.length, 0.5 * rw.width);
var end2 = rwy.pointOffCenterline(rw.length, -0.5 * rw.width);
icon_rw.setDataGeo
(
[ canvas.Path.VG_MOVE_TO,
canvas.Path.VG_LINE_TO,
canvas.Path.VG_LINE_TO,
canvas.Path.VG_LINE_TO,
canvas.Path.VG_CLOSE_PATH ],
[ beg1[0], beg1[1],
beg2[0], beg2[1],
end2[0], end2[1],
end1[0], end1[1] ]
);
if( rw.length / rw.width > 3 and !is_heli )
{
# only runways which are much longer than wide are
# real runways, otherwise it's probably a heliport.
var icon_cl =
me.grp_apt.createChild("path", "centerline")
.setStrokeLineWidth(0.5)
.setColor(1,1,1)
.setStrokeDashArray([15, 10]);
icon_cl.setDataGeo
(
[ canvas.Path.VG_MOVE_TO,
canvas.Path.VG_LINE_TO ],
[ beg_thr[0], beg_thr[1],
end_thr[0], end_thr[1] ]
);
var icon_thr =
me.grp_apt.createChild("path", "threshold")
.setStrokeLineWidth(1.5)
.setColor(1,1,1);
icon_thr.setDataGeo
(
[ canvas.Path.VG_MOVE_TO,
canvas.Path.VG_LINE_TO,
canvas.Path.VG_MOVE_TO,
canvas.Path.VG_LINE_TO ],
[ beg_thr1[0], beg_thr1[1],
beg_thr2[0], beg_thr2[1],
end_thr1[0], end_thr1[1],
end_thr2[0], end_thr2[1] ]
);
}
}
foreach(var park; me._apt.parking())
{
var icon_park =
me.grp_apt.createChild("text", "parking-" ~ park.name)
.setDrawMode( canvas.Text.ALIGNMENT
+ canvas.Text.TEXT )
.setText(park.name)
.setFont("LiberationFonts/LiberationMono-Bold.ttf")
.setGeoPosition(park.lat, park.lon)
.setFontSize(15, 1.3);
}
var icon_tower =
me.grp_apt.createChild("path", "tower")
.setStrokeLineWidth(1)
.setScale(1.5)
.setColor(0.2,0.2,1.0)
.moveTo(-3, 0)
.vert(-10)
.line(-3, -10)
.horiz(12)
.line(-3, 10)
.vert(10);
var pos = me._apt.tower();
icon_tower.setGeoPosition(pos.lat, pos.lon);
}
};

View file

@ -146,6 +146,7 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
# enable/disable menu entries
menuEnable("fuel-and-payload", fdm == "yasim" or fdm == "jsb");
menuEnable("aircraft-checklists", props.globals.getNode("/sim/checklists") != nil);
var isAutopilotMenuEnabled = func {
foreach( var apdp; autopilotDisableProps ) {
if( props.globals.getNode( apdp ) != nil )

View file

@ -109,6 +109,7 @@
<help>Help</help>
<help-browser>Help (opens in browser)</help-browser>
<aircraft-keys>Aircraft Help</aircraft-keys>
<aircraft-checklists>Aircraft Checklists</aircraft-checklists>
<common-keys>Common Aircraft Keys</common-keys>
<basic-keys>Basic Simulator Keys</basic-keys>
<joystick-config>Joystick Configuration</joystick-config>

View file

@ -114,6 +114,9 @@
<stretch>true</stretch>
</empty>
<hrule/>
<text>
<halign>center</halign>
<label>Version Information</label>
@ -166,7 +169,67 @@
<format>Revision: %s</format>
<property>/sim/version/revision</property>
</text>
</group>
<empty>
<stretch>true</stretch>
</empty>
<hrule/>
<text>
<halign>center</halign>
<label>Graphics/OpenGL Information</label>
</text>
<group>
<layout>vbox</layout>
<border>10</border>
<halign>center</halign>
<default-padding>2</default-padding>
<text>
<halign>left</halign>
<label>MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</label>
<format>OpenGL Vendor: %s</format>
<property>/sim/rendering/gl-vendor</property>
</text>
<text>
<halign>left</halign>
<label>MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</label>
<format>OpenGL Renderer: %s</format>
<property>/sim/rendering/gl-renderer</property>
</text>
<text>
<halign>left</halign>
<label>MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</label>
<format>OpenGL Version: %s</format>
<property>/sim/rendering/gl-version</property>
</text>
<text>
<halign>left</halign>
<label>MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</label>
<format>GLSL Version: %s</format>
<property>/sim/rendering/gl-shading-language-version</property>
</text>
<text>
<halign>left</halign>
<label>MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</label>
<format>Max Texture Size: %s</format>
<property>/sim/rendering/max-texture-size</property>
</text>
<text>
<halign>left</halign>
<label>MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</label>
<format>Depth Buffer Bits: %s</format>
<property>/sim/rendering/depth-buffer-bits</property>
</text>
</group>
</group>
@ -188,6 +251,35 @@
</binding>
</button>
<button>
<legend>Take screen shot</legend>
<equal>true</equal>
<default>false</default>
<binding>
<command>nasal</command>
<script>fgcommand("screen-capture");</script>
</binding>
</button>
<button>
<legend>Copy to Clipboard</legend>
<equal>true</equal>
<default>false</default>
<binding>
<command>nasal</command>
<script><![CDATA[
var properties = ["gl-vendor","gl-version","gl-renderer", "gl-shading-language-version"];
var data = "";
var path = "/sim/rendering/";
foreach(var p; properties)
data ~= p ~":"~getprop(path~p) ~"\n";
clipboard.setText(data);
gui.popupTip("Copied version information to clipboard!");
]]></script>
</binding>
</button>
<empty><stretch>true</stretch></empty>
</group>

View file

@ -31,10 +31,11 @@
<nasal>
<open>
var airport_id = getprop("/sim/presets/airport-id");
setprop("/sim/gui/dialogs/airports/selected-airport/rwy", "");
setprop("/sim/gui/dialogs/airports/selected-airport/parkpos", "");
setprop("/sim/gui/dialogs/airports/list", "");
var airport_id = getprop("/sim/presets/airport-id");
if (airport_id == nil) { airport_id = "KSFO"; }
var dlg = props.globals.getNode("/sim/gui/dialogs/airports", 1);
@ -77,6 +78,8 @@
setprop("/sim/gui/dialogs/airports/selected-airport/location", sprintf("%.3f / %.3f", info.lon, info.lat));
setprop("/sim/gui/dialogs/airports/selected-airport/lon", info.lon);
setprop("/sim/gui/dialogs/airports/selected-airport/elevation-ft", 3.28 * info.elevation);
setprop("/sim/gui/dialogs/airports/selected-airport/rwy", "");
setprop("/sim/gui/dialogs/airports/selected-airport/parkpos", "");
var longest_runway = 0;
var runway_string = "";
@ -136,6 +139,9 @@
}
}
update_info();
</open>
</nasal>
@ -412,156 +418,6 @@
<load><![CDATA[
var Runway = {
new: func(rwy)
{
return {
parents: [Runway],
rwy: rwy
};
},
pointOffCenterline: func(pos, off = 0)
{
var coord = geo.Coord.new();
coord.set_latlon(me.rwy.lat, me.rwy.lon);
coord.apply_course_distance(me.rwy.heading, pos - 0.5 * me.rwy.length);
if( off )
coord.apply_course_distance(me.rwy.heading + 90, off);
return ["N" ~ coord.lat(), "E" ~ coord.lon()];
}
};
var AirportMap = {
new: func(apt)
{
return {
parents: [AirportMap],
_apt: apt
};
},
build: func(layer_runways)
{
var rws_done = {};
me.grp_apt = layer_runways.createChild("group", "apt-" ~ me._apt.id);
var selected_rwy = getprop("/sim/gui/dialogs/airports/selected-airport/rwy");
foreach(var rw; keys(me._apt.runways))
{
var is_heli = substr(rw, 0, 1) == "H";
var rw_dir = is_heli ? nil : int(substr(rw, 0, 2));
var rw_rec = "";
var thresh_rec = 0;
if( rw_dir != nil )
{
rw_rec = sprintf("%02d", math.mod(rw_dir - 18, 36));
if( size(rw) == 3 )
{
var map_rec = {
"R": "L",
"L": "R",
"C": "C"
};
rw_rec ~= map_rec[substr(rw, 2)];
}
if( rws_done[rw_rec] != nil )
continue;
var rw_rec = me._apt.runways[rw_rec];
if( rw_rec != nil )
thresh_rec = rw_rec.threshold;
}
rws_done[rw] = 1;
rw = me._apt.runways[rw];
var icon_rw =
me.grp_apt.createChild("path", "runway")
.setStrokeLineWidth(0.5)
.setColor(1.0,1.0,1.0)
.setColorFill(0.2, 0.2, 0.2);
var rwy = Runway.new(rw);
var beg_thr = rwy.pointOffCenterline(rw.threshold);
var beg_thr1 = rwy.pointOffCenterline(rw.threshold, 0.5 * rw.width);
var beg_thr2 = rwy.pointOffCenterline(rw.threshold, -0.5 * rw.width);
var beg1 = rwy.pointOffCenterline(0, 0.5 * rw.width);
var beg2 = rwy.pointOffCenterline(0, -0.5 * rw.width);
var end_thr = rwy.pointOffCenterline(rw.length - thresh_rec);
var end_thr1 = rwy.pointOffCenterline(rw.length - thresh_rec, 0.5 * rw.width);
var end_thr2 = rwy.pointOffCenterline(rw.length - thresh_rec, -0.5 * rw.width);
var end1 = rwy.pointOffCenterline(rw.length, 0.5 * rw.width);
var end2 = rwy.pointOffCenterline(rw.length, -0.5 * rw.width);
icon_rw.setDataGeo
(
[ canvas.Path.VG_MOVE_TO,
canvas.Path.VG_LINE_TO,
canvas.Path.VG_LINE_TO,
canvas.Path.VG_LINE_TO,
canvas.Path.VG_CLOSE_PATH ],
[ beg1[0], beg1[1],
beg2[0], beg2[1],
end2[0], end2[1],
end1[0], end1[1] ]
);
if( rw.length / rw.width > 3 and !is_heli )
{
# only runways which are much longer than wide are
# real runways, otherwise it's probably a heliport.
var icon_cl =
me.grp_apt.createChild("path", "centerline")
.setStrokeLineWidth(0.5)
.setColor(1,1,1)
.setStrokeDashArray([15, 10]);
icon_cl.setDataGeo
(
[ canvas.Path.VG_MOVE_TO,
canvas.Path.VG_LINE_TO ],
[ beg_thr[0], beg_thr[1],
end_thr[0], end_thr[1] ]
);
var icon_thr =
me.grp_apt.createChild("path", "threshold")
.setStrokeLineWidth(1.5)
.setColor(1,1,1);
icon_thr.setDataGeo
(
[ canvas.Path.VG_MOVE_TO,
canvas.Path.VG_LINE_TO,
canvas.Path.VG_MOVE_TO,
canvas.Path.VG_LINE_TO ],
[ beg_thr1[0], beg_thr1[1],
beg_thr2[0], beg_thr2[1],
end_thr1[0], end_thr1[1],
end_thr2[0], end_thr2[1] ]
);
}
}
foreach(var park; me._apt.parking())
{
var icon_park =
me.grp_apt.createChild("text")
.setDrawMode( canvas.Text.ALIGNMENT
+ canvas.Text.TEXT )
.setText(park.name)
.setFont("LiberationFonts/LiberationMono-Bold.ttf")
.setGeoPosition(park.lat, park.lon)
.setFontSize(15, 1.3);
}
}
};
var my_canvas = canvas.get(cmdarg());
my_canvas.setColorBackground(0.2, 0.5, 0.2, 0.5);
@ -571,32 +427,23 @@
.setTranslation(300, 200);
var layer_runways = map.createChild("group", "runways");
var icon_tower =
map.createChild("path", "tower")
.setStrokeLineWidth(1)
.setScale(1.5)
.setColor(0.2,0.2,1.0)
.moveTo(-3, 0)
.vert(-10)
.line(-3, -10)
.horiz(12)
.line(-3, 10)
.vert(10);
var updateMap = func() {
var id = getprop("/sim/gui/dialogs/airports/selected-airport/id");
if (id != "") {
var apt = airportinfo(id);
var airport = AirportMap.new(apt);
map.removeAllChildren();
layer_runways = map.createChild("group", "runways");
var airport = canvas.AirportMap.new(apt);
airport.build(layer_runways);
var pos = apt.tower();
icon_tower.setGeoPosition(pos.lat, pos.lon);
map._node.getNode("ref-lat", 1).setDoubleValue(apt.lat);
map._node.getNode("ref-lon", 1).setDoubleValue(apt.lon);
map._node.getNode("hdg", 1).setDoubleValue(0.0);
}
}
}
var ranges = [0.1, 0.25, 0.5, 1, 2.5, 5];
@ -612,7 +459,63 @@
settimer(updateZoom, 0.5, 1);
};
var updateRunwayHighlight = func()
{
var selected_rwy = getprop("/sim/gui/dialogs/airports/selected-airport/rwy");
var selected_apt = getprop("/sim/gui/dialogs/airports/selected-airport/id");
var is_heli = substr(selected_rwy, 0, 1) == "H";
var rw_dir = is_heli ? nil : int(substr(selected_rwy, 0, 2));
var rw_rec = "";
if( rw_dir != nil ) {
rw_rec = sprintf("%02d", math.mod(rw_dir - 18, 36));
if( size(selected_rwy) == 3 ) {
var map_rec = {
"R": "L",
"L": "R",
"C": "C"
};
rw_rec ~= map_rec[substr(selected_rwy, 2)];
}
}
foreach (var apt; layer_runways.getChildren()) {
if (apt.get("id") == "apt-" ~ selected_apt) {
foreach (var rwy; apt.getChildren()) {
if ((rwy.get("id") == "runway-" ~ selected_rwy) or
(rwy.get("id") == "runway-" ~ rw_rec) )
{
rwy.setColor(1.0,0.0,0.0);
} else {
rwy.setColor(1.0,1.0,1.0);
}
}
}
}
}
var updateParkingHighlight = func()
{
var selected_parkpos = getprop("/sim/gui/dialogs/airports/selected-airport/parkpos");
var selected_apt = getprop("/sim/gui/dialogs/airports/selected-airport/id");
foreach (var apt; layer_runways.getChildren()) {
if (apt.get("id") == "apt-" ~ selected_apt) {
foreach (var rwy; apt.getChildren()) {
if (rwy.get("id") == "parking-" ~ selected_parkpos) {
rwy.setColor(1.0,0.0,0.0);
} else {
rwy.setColor(1.0,1.0,1.0);
}
}
}
}
}
var aptlistener = setlistener("/sim/gui/dialogs/airports/selected-airport/id", updateMap);
var rwylistener = setlistener("/sim/gui/dialogs/airports/selected-airport/rwy", updateRunwayHighlight);
var parkposlistener = setlistener("/sim/gui/dialogs/airports/selected-airport/parkpos", updateParkingHighlight);
update_info();
updateZoom();
@ -620,6 +523,8 @@
</load>
<close>
removelistener(aptlistener);
removelistener(rwylistener);
removelistener(parkposlistener);
</close>
</nasal>
</canvas>

186
gui/dialogs/checklist.xml Normal file
View file

@ -0,0 +1,186 @@
<?xml version="1.0"?>
<PropertyList>
<name>checklist</name>
<layout>vbox</layout>
<default-padding>1</default-padding>
<color>
<red type="float">0.41</red>
<green type="float">0.4</green>
<blue type="float">0.42</blue>
<alpha type="float">1.0</alpha>
<alpha type="float">1.0</alpha>
</color>
<nasal>
<open>
var dlgRoot = cmdarg();
var checklists = props.globals.getNode("/sim/checklists", 1).getChildren("checklist");
if (size(checklists) > 0) {
var combo = gui.findElementByName(dlgRoot, "checklist-combo");
var group = gui.findElementByName(dlgRoot, "checklist-table-group");
forindex (var idx; checklists) {
combo.getChild("value", idx, 1).setValue(checklists[idx].getNode("title", 1).getValue());
var c = checklists[idx];
var row = 0;
# Set up a new table, only visible when this checklist is selected.
var table = group.getChild("group", idx, 1);
table.getNode("row", 1).setValue(0);
table.getNode("col", 1).setValue(0);
table.getNode("default-padding", 1).setValue(4);
table.getNode("layout", 1).setValue("table");
table.getNode("valign", 1).setValue("top");
var vis = table.getNode("visible", 1).getNode("equals", 1);
vis.getNode("property", 1).setValue("sim/gui/dialogs/checklist/selected-checklist");
vis.getNode("value", 1).setValue(c.getNode("title").getValue());
var items = c.getChildren("item");
var txtcount = 0;
forindex (var i; items) {
var item = items[i];
var t = table.getChild("text", txtcount, 1);
txtcount += 1;
t.getNode("halign", 1).setValue("left");
t.getNode("row", 1).setValue(row);
t.getNode("col", 1).setValue(0);
t.getNode("label", 1).setValue(item.getNode("name", 1).getValue());
var values = item.getChildren("value");
forindex (var v; values) {
var t = table.getChild("text", txtcount, 1);
txtcount += 1;
t.getNode("halign", 1).setValue("right");
t.getNode("row", 1).setValue(row);
if (v > 0) {
# The second row of values can overlap with the
# first column if required - helps keep the
# checklist dialog as compact as possible
t.getNode("col", 1).setValue(0);
t.getNode("colspan", 1).setValue(2);
} else {
t.getNode("col", 1).setValue(1);
}
t.getNode("label", 1).setValue(values[v].getValue());
row = row + 1;
}
}
}
setprop("sim/gui/dialogs/checklist/selected-checklist",
checklists[0].getNode("title").getValue());
} else {
var group = gui.findElementByName(dlgRoot, "checklist-table-group");
var table = group.getNode("text", 1);
table.getNode("row", 1).setValue(0);
table.getNode("col", 1).setValue(0);
table.getNode("default-padding", 1).setValue(4);
table.getNode("layout", 1).setValue("table");
table.getNode("valign", 1).setValue("top");
table.getNode("halign", 1).setValue("center");
table.getNode("label", 1).setValue("No checklists exist for this aircraft");
}
var setTransparency = func(updateDialog){
var alpha = (getprop("/sim/gui/dialogs/checklist/transparent") or 0);
dlgRoot.getNode("color/alpha").setValue(1-alpha*0.3);
dlgRoot.getNode("color/red").setValue(0.41-alpha*0.2);
dlgRoot.getNode("color/green").setValue(0.4-alpha*0.2);
dlgRoot.getNode("color/blue").setValue(0.42-alpha*0.2);
var n = props.Node.new({ "dialog-name": "checklist" });
if (updateDialog)
{
fgcommand("dialog-close", n);
fgcommand("dialog-show", n);
}
}
setTransparency(0);
</open>
</nasal>
<group>
<layout>hbox</layout>
<empty><stretch>1</stretch></empty>
<text>
<label>Aircraft Checklists</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<text>
<halign>right</halign>
<label>Checklist:</label>
</text>
<combo>
<name>checklist-combo</name>
<property>/sim/gui/dialogs/checklist/selected-checklist</property>
<editable>false</editable>
<pref-width>200</pref-width>
<halign>fill</halign>
<binding>
<command>dialog-apply</command>
<object-name>checklist-combo</object-name>
</binding>
</combo>
<empty><stretch>true</stretch></empty>
<checkbox>
<label>Transparent</label>
<pref-width>100</pref-width>
<property>/sim/gui/dialogs/checklist/transparent</property>
<live>true</live>
<halign>right</halign>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>property-toggle</command>
</binding>
<binding>
<command>nasal</command>
<script>setTransparency(1);</script>
</binding>
</checkbox>
</group>
<hrule/>
<group>
<default-padding>4</default-padding>
<halign>fill</halign>
<layout>table</layout>
<name>checklist-table-group</name>
</group>
</PropertyList>

View file

@ -17,7 +17,7 @@
</empty>
<text>
<label>Environmental Settings</label>
<label>Environment Settings</label>
</text>
<empty>
@ -226,23 +226,6 @@
</empty>
<layout>hbox</layout>
<button>
<legend>OK</legend>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<legend>Apply</legend>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<button>
<legend>Close</legend>
<default>true</default>

View file

@ -712,6 +712,14 @@
</binding>
</item>
<item>
<name>aircraft-checklists</name>
<binding>
<command>dialog-show</command>
<dialog-name>checklist</dialog-name>
</binding>
</item>
<item>
<name>common-keys</name>
<binding>