Search our Website:

           
N32292
Cherokee Warrior
PA28-151

PA28-151/160hp
4 Seat
IFR Equiped

Aircraft:
Aircraft speeds indicated in units of: *
Vso:
Vfe:
Vs1:
Vlo:
Vr:
Vle:
Vx:
Vno:
Vx gear-up:
Vne:
Vy:
Best Glide Speed:
Vy gear-up:
Enroute Climb Speed:
Va:
CAPS Dep. Max Speed:

Aircraft:
Weight and Balance Data*
Max gross weight (lbs):
Aircraft C.G. (in):
Basic empty weight (lbs):
Pilot arm (in):
Useful load (lbs):
Rear passenger arm (in):
Max baggage weight (lbs):
Baggage area 1 arm (in):
Max fuel (gallons):
Baggage area 2 arm (in):
Est. fuel burn rate (gal/h):
Fuel arm (in):

* This is not an official source of aircraft data. The pilot in command is responsible
for obtaining the official aircraft information for flight planning purposes.
0) if ($defaultkeys[0] != $keys[0]) { $keys = $defaultkeys; rewind($fp); } while (is_array($keys) & $keys[count($keys)-1]=="" & count($keys)>1) unset($keys[count($keys)-1]); //clear empty last column(s) if (is_array($keys)) { foreach ($keys as $index=>$key) $keys[$index] = strtolower($key); //make lower case $keys = str_replace(" ","",$keys); //drop any spaces while ($data = fgetcsv ($fp, 1000, ",")) { foreach ($keys as $index => $key) { if (count($data) >= $index+1) $oneline[$key] = $data[$index]; //get value if it's there else $oneline[$key] = ""; //otherwise, insert empty value into key } //insert default values for all expected keys if (count($default_values)>0) foreach ($default_values as $key=>$value) if ($oneline[$key] == "") $oneline[$key] = $default_values[$key]; $use_line = true; if (count($must_exist)>0) foreach ($must_exist as $key) if ($oneline[$key] == "") $use_line = false; if ($use_line) { if ($index_key != "" & in_array($index_key, array_keys($oneline))) $alldata[$oneline[$index_key]] = $oneline; else $alldata[] = $oneline; } } } fclose ($fp); } return $alldata; } //---------------------------- // WRITEKEYEDFILE //Write out any CSV file with keys in first line // WARNING! Keys are determined ONLY from the first record (and default_values). If other records // have extra keys, they will not be written unless they exist in default_values too! // IN: $filename name of file to write to // $records array to write out as CSV // $index_key key to use as "index" (will be first key written for each record) // $default_values array of keys and values which should be used if array value is empty function writekeyedfile($filename, $records, $index_key = "", $default_values = array()) { //make sure root_dir exists if (!file_exists(root_dir)) mkdir (root_dir, 0700); $fp = fopenlock ($filename,"w"); if (count($records)>0) { //Determine keys $foundkeys = array(); foreach ($records as $record) $foundkeys = array_merge($foundkeys,array_keys($record)); //add keys from this record if (count($default_values) > 0) foreach ($default_values as $key=>$value) if (!in_array($key,$foundkeys)) $foundkeys[] = $key; //add default keys foreach ($foundkeys as $index=>$key) if ($key=="" | $key=="0") unset($foundkeys[$index]); //put index_key first $keys = array(); if ($index_key != "") $keys[0] = $index_key; $foundkeys = array_unique($foundkeys); //only unique keys $foundkeys = array_diff($foundkeys,array($index_key)); $keys = array_merge($keys,$foundkeys); //add other keys after index_key //start by writing the keys $itemstring = ""; foreach ($keys as $key) $itemstring = $itemstring . '' . $key . ', '; $itemstring = $itemstring . "\n"; fwrite ($fp, $itemstring); //then do the data foreach ($records as $item) { $itemstring = ""; foreach ($keys as $key) { if (in_array($key,array_keys($item))) { if (strstr($item[$key],',')) //quote if commas are found $itemstring = $itemstring . '"' . $item[$key] . '", '; else $itemstring = $itemstring . '' . $item[$key] . ', '; } else $itemstring = $itemstring . '"' . $default_values[$key] . '", '; } $itemstring = substr($itemstring,0,strlen($itemstring)-2) . "\n"; fwrite ($fp, $itemstring); } } fclose ($fp); } ?>

 


Copyright © 2002 Chris Watkins. All rights reserved.
Send any questions or comments to webmaster@aviation-center.com