AERE 161^J Project 1^J Project report

docx

School

Iowa State University *

*We aren’t endorsed by this school

Course

MISC

Subject

English

Date

Feb 20, 2024

Type

docx

Pages

16

Uploaded by AgentKnowledgeMonkey222

Report
1 AERE 161 Project 1: Project Report Due: March 4, 6:00pm Table of Contents: Description: I have split up my project report by organizing the sections by the problem to keep the reading of the report more fluid. I will go through the theory, solutions and discussion for each and then put the appendix for both at the end for reference. 1. Theory (For Problem 1)……………………..…………………(3,4)
2 2. Solutions (For Problem 1)……………………………………...(5,6) 3. Discussion (For Problem 1)………………………… .................. (7,8) 4. Theory (For Problem 2)……………………………… ............. (9,10) 5. Solutions (For Problem 2)……………………………………... (11) 6. Discussion (For Problem 2)……………………………………..(12) 7. Appendix (For Problem 1)…………………………………... (13,14) 8. Appendix (For Problem 2)…………………………… ............ (15,16) Theory: For Problem 1 Problem 1: fuelW=fuel*6 This equation is used to figure out the weight of the fuel itself based on what the user inputted. We know that the 100LL fuel used in the aircraft weigh 6 lbs. for each gallon, therefore we multiply the user input by 6 due to the fact that the user input is in gallons. rampW=fuelW+pilotweight+copilotwieght+pasone+pastwo+empw eight This equation is used to figure out the ramp weight or in other words, the total weight of the aircraft itself. By adding “fuelW” (found from last equation) to all the other user inputs. These
3 being the weight of the pilot, the copilot, passenger one, passenger two, and the empty weight of the plane which was given as 1,471 lbs. Emom=empweight*85.9 Frmom=(pilotweight+copilotwieght)*85.5 Rmom=(pastwo+pasone)*118.1 Fmom=fuelW*95 𝑚𝑜𝑚𝑒𝑛𝑡 = 𝑤𝑒𝑖𝑔ℎ𝑡(𝑙𝑏𝑠) ∗ 𝑎𝑟𝑚(𝑖𝑛) To start we take the weight of the specific area and multiply that by the moment arm given to us in Table 1. For the empty moment, or “Emom” the table states the arm length for would be 85.9 inches. Therefore, the first equation would be 𝑒𝑚𝑝𝑡𝑦 𝑚𝑜𝑚𝑒𝑛𝑡 = (1,471(𝑙𝑏𝑠)) ∗ (85.9(𝑖𝑛)) we know that the empty weight is a constant value because it was given, but for the other equations they are inputted by the user. Leaving the front moment to be 𝑓𝑟𝑜𝑛𝑡 𝑚𝑜𝑚𝑒𝑛𝑡 = (𝑢𝑠𝑒𝑟𝑖𝑛𝑝𝑢𝑡 𝑓𝑜𝑟 𝑝𝑖𝑙𝑜𝑡 𝑤𝑒𝑖𝑔ℎ𝑡 + 𝑢𝑠𝑒𝑟 𝑖𝑛𝑝𝑢𝑡 𝑓𝑜𝑟 𝑐𝑜𝑝𝑖𝑙𝑜𝑡 𝑤𝑒𝑖𝑔ℎ𝑡) ∗ (85.5)(𝑖𝑛) The 85.5 inches was given to use in Table 1 as the front seats moment arm. Rear moment can be calculated by 𝑟𝑒𝑎𝑟 𝑚𝑜𝑚𝑒𝑛𝑡(𝑙𝑏𝑠 − 𝑖𝑛) = (𝑢𝑠𝑒𝑟 𝑖𝑛𝑝𝑢𝑡 𝑓𝑜𝑟 𝑝𝑎𝑠𝑠𝑒𝑛𝑔𝑒𝑟 𝑜𝑛𝑒 + 𝑝𝑎𝑠𝑠𝑒𝑛𝑔𝑒𝑟 𝑡𝑤𝑜(𝑙𝑏𝑠)) ∗ (118.1(𝑖𝑛)) . The 118.1 inches was given as the rear seat’s moment arm. And finally, for the Fuel moment we are given 95 inches for the fuel tanks moment arm. This would leave us with 𝑓𝑢𝑒𝑙 𝑚𝑜𝑚𝑒𝑛𝑡(𝑙𝑏𝑠 − 𝑖𝑛) = (𝑓𝑢𝑒𝑙 𝑤𝑒𝑖𝑔ℎ𝑡(𝑙𝑏𝑠) ∗ 95(𝑖𝑛)) . Overall the same equation was used at four different moments. totmom=Emom+Frmom+Rmom+Fm om (𝑚𝑜𝑚𝑒𝑛𝑡 1 + 𝑚𝑜𝑚𝑒𝑛𝑡 2 + 𝑚𝑜𝑚𝑒𝑛𝑡 3 + 𝑚𝑜𝑚𝑒𝑛𝑡 4) = 𝑡𝑜𝑡𝑎𝑙 𝑚𝑜𝑚𝑒𝑛𝑡(𝑙𝑏𝑠 − 𝑖𝑛) For this equation we take each moment calculated by the prior equation and add them together to get the total moment for the aircraft. CenterofG=totmom/rampW 𝑚𝑜𝑚𝑒𝑛𝑡 𝑡𝑜𝑡𝑎𝑙 𝑎𝑖𝑟𝑐𝑟𝑎𝑓𝑡 𝑡𝑜𝑡𝑎𝑙 𝑤𝑒𝑖𝑔ℎ𝑡 𝐶𝐺 𝑎𝑖𝑟𝑐𝑟𝑎𝑓𝑡 = This equation was given and we can use the other components from prior equations to solve
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
4 𝑡𝑜𝑡𝑎𝑙 𝑚𝑜𝑚𝑒𝑛𝑡(𝑙𝑏𝑠−𝑖𝑛) this one. Basically, the equation became 𝐶𝑒𝑛𝑡𝑒𝑟 𝑜𝑓 𝑔𝑟𝑎𝑣𝑖𝑡𝑦 = 𝑟𝑎𝑚𝑝 𝑤𝑒𝑖𝑔ℎ𝑡(𝑙𝑏𝑠) This would give us the center of gravity of the aircraft itself. Solutions: For Problem 1 During the project I used a couple different ways to get around user error and setting parameters for either the fuel, the max weight, or the center of gravity. My first example of this is present here: if fuel <= 50 && fuel >= 0 fuel = fuel; else fuel = input( 'input valid fuel amount/n RANGE: 0 to 50' ); end In this example I used an if else statement to get around the issue of the user entering in the wrong amount of fuel. The range given to us in the project was 0 gallons to 50 gallons. This was implemented in the if statement by using “and” ensuring that the gallons had to be between 50
5 and 0. I ran the code and input a number that was out of the given range and then had it prompt me to input another number that was in the correct range. An example of writing the wrong value of fuel. Welcome to the Weight and Balance Calculator This calculator is for a Piper Pa-28-180 Aircraft ------------------------------------------------- Please answer the following questions accurately How much fuel is on board (in US Gallons)? 60 What is the weight of the pilot in (in lbs)? 20 What is the weight of the co-pilot (in lbs)? 20 What is the weight of passenger one?(If no passenger enter 0) 20 What is the weight of passenger two?(If no passenger enter 0) 20 input valid fuel amount/n RANGE: 0 to 50 It offers the user to input another fuel amount. Another problem that I ran into was having the weight of the aircraft go over 2,400 lbs. This was solved with another if statement (as seen below). if rampW>2400 %sets parameters on if the plane is over 2400lbs fprintf( 'The plane will be too heavy to fly, lose some weight!' ); %displays if the plane is overweight return else fprintf( 'The weight of the ramp is %d lbs: \n ' ,rampW); %Displays the weight of the ramp if it is underweight end I knew that we were given a maximum ramp weight, being 2,400 lbs. I used an if statement to get around the problem of the aircraft going over the maximum weight. I set my variable for the weight of the aircraft so if it was greater than 2,400 to display that the plane is too heavy to fly. I also ran into a problem where the rest of the code would still run even if the airplane was overweight. I solved this problem using a return function which would prohibit the rest of the code from running, as there is no point to calculate other equations for the aircraft if it won’t fly. It would display: Welcome to the Weight and Balance Calculator This calculator is for a Piper Pa-28-180 Aircraft ------------------------------------------------- Please answer the following questions accurately How much fuel is on board (in US Gallons)? 1000 What is the weight of the pilot in (in lbs)? 1000 What is the weight of the co-pilot (in lbs)? 1000
6 What is the weight of passenger one?(If no passenger enter 0) 1000 What is the weight of passenger two?(If no passenger enter 0) 1000 input valid fuel amount/n RANGE: 0 to 5050 The plane will be too heavy to fly, lose some weight!>> This gets around my problem of having the weight go over and my code still displaying the other features/calculations. I used a similar way to solve the center of gravity and its limitations. In the project we were given that the center of gravity of the aircraft had to be between 86.8 inches and 95.8 inches. I used this to get around it: if CenterofG >86.8 && CenterofG< 95.8 %sets parameters on the center of gravity(Total loaded moment) between 86.8 and 95.8 inches fprintf( "Everything Checks out! You're ready for takeoff!\n" ) %lets user know that it is in the range else fprintf( "You're NOT ready to fly, the Center of Gravity is OFF!\n" ) %lets user know its out of range return end I made the if statement, so the center of gravity had to be greater than 86.8 inches and less than 95.8 inches. If the statement was proven false, I would display that the center of gravity is off and that you’re not ready to fly. I also, like the other issue of the program still running, added a return function to activate if the center of gravity is outside of the range, which would terminate the function. Discussion: For Problem 1 After I had finished the code, my end goal was to have the same output as seen in class. We were ultimately given all of the equations needed; my worry was on including those equations in the code correctly. Which would be proven by using the same inputs and getting the same outputs as seen in lecture. I input the exact same weight as seen in class and was pleasantly surprised to see that the code had matched. Code: Everything Checks out! You're ready for takeoff! Total Fuel Weight is: 300.00 lbs Total Weight is: 2241.00 lbs. Front Seats moment is: 17100.00 lbs-in Rear seats moment is: 31887.00 lbs-in
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
7 Fuel moment: 28500.00 lbs-in Empty Aircraft moment 126358.90 lbs-in Total moment 203845.90 lbs-in Total moment arm is 90.96 inches The numbers had matched what was seen in class. Before I got this, I had many things that I needed to change. Specifically, how the information was displayed. I originally didn’t have print functions at the end to display all of the different components and calculations of the aircraft. This led to my output not matching what was in class. I knew I had the right numbers but had to add in the print functions. I also ran into a multitude of syntax errors that I used trial and error to get through. - Did this result in the aircraft being able to fly? In the end, the aircraft was able to fly. The parameters that were set, the fuel being in the 0 to 50, the weight being under 2,400 lbs. This meets all the parameters, and the aircraft can indeed fly. - Why is weight and balance important in aviation? Weight and balance have a great impact on the flight of an aircraft. First of all, weight can cause a couple of problems, including the aircraft not being able to take off. Another problem that too much weight could result in would be the airplane taking off and having instability within flight which would result in crashing. Now, balance could also throw off the center of gravity and cause similar instability problems resulting in the plane either not functioning correctly and crashing resulting in injury or death, or the aircraft not being able to take.
8 Theory: For Problem 2 Problem 2: tempC=temp-273.15 𝑇𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒(𝐶) = 𝐾𝑒𝑙𝑣𝑖𝑛 − 273.15 I used this equation in the function to convert the temperature in Kelvin from the given current data to Celsius. dewpoint=tempC-((100-humidity)/5); %calculates the dewpoint by taking the temperature in Celsius %and then doing 100 subtracted by the humidity(given) and dividing it by 5. 100−𝐻𝑢𝑚𝑖𝑑𝑖𝑡𝑦 𝑇 𝑑 = 𝑇 𝐶 − ( 5 ) I used this equation to calculate the dew point, I took the temperature in Celsius from the previous equation and subtracted it by the second half of the equation. The second half was given to an extent, humidity was given in the API that shows the current weather conditions. vaporpressure=(6.11*(10^((7.5*dewpoint)/237.7+dewpoint))); %takes the dewpoint we calculated and used the %equation given, for (Td) I substituted (dewpoint) (7.5∗𝑇 ) 𝑒
9 I knew that this equation was solving for vapor pressure, and I knew that we found 𝑇 𝑑 or the dewpoint in the prior equation. This allowed me to substitute that variable with my dewpoint value to eventually get the vapor pressure. virtualtemp=temp/(1-(vaporpressure)/(pressure*(1-0.622))); 𝑇 𝑇 𝑣 𝑃 𝑚𝑏 I used this given equation to find the virtual temperature. I know I was given the temp through the API, I had the vapor pressure and I had the pressure from the API as well, not it was a matter of plugging in what I know. So I substituted T for the temp and then substituted the ( 1 − 𝑒 ( ) ) for pressure and solved to calculate the virtual temperature. 𝑃 𝑚𝑏 virtualtempR=(9/5*(virtualtemp-273.15)+32)+459.69; 𝑉𝑖𝑟𝑡𝑢𝑎𝑙 𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 𝑖𝑛 𝑅𝑎𝑛𝑘𝑖𝑛𝑒 I used this equation to convert the virtual temperature from the prior equation to a different unit. I wanted to change the virtual temperature from Kelvin to Rankine. This was done by = 1 − ( 𝑒 ) ∗ (1 − 0.622 )
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
10 substituting the known variable 𝑇 𝑣 or the virtual temperature into the equation to get the virtual temperature in Rankine. The other numbers in the equation were constant. pressureinHG=pressure*0.02953 𝑃 𝑖𝑛𝐻𝐺 = 𝑃 𝑚𝑏 ∗ 0.02953 I used this equation to find the pressure in inches of Mercury. I did this by using the conversion equation given. I substituted 𝑃 𝑚𝑏 for pressure (which is given through the API) and solved for the pressure in inches of Mercury. densityaltitude=fieldelv+(145366*(1-((17.326*pressureinHG)/ virtualtempR)^0.235)); 17.326 ∗ 𝑃 𝑖𝑛𝐻𝐺 0.235 𝐷 𝑎𝑙𝑡 = 𝐹𝑖𝑒𝑙𝑑𝐸𝑙𝑒𝑣𝑎𝑡𝑖𝑜𝑛 + (145366 ∗ (1− ( ) )) 𝑇 𝑣𝑟 I used this equation to find the density altitude. As I looked at the variables listed in the equation, I realized that I had all of the variables solved already. The 𝐹𝑖𝑒𝑙𝑑𝐸𝑙𝑒𝑣𝑎𝑡𝑖𝑜𝑛 listed in the equation is given. We also know 𝑃 𝑖𝑛𝐻𝐺 is the value we found in the prior equation, being the pressure in inches of Mercury. The last variable 𝑇 𝑣𝑟 is known as the virtual temperature in Rankine, found in 𝑉𝑖𝑟𝑡𝑢𝑎𝑙 𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 𝑖𝑛 𝑅𝑎𝑛𝑘𝑖𝑛𝑒 . Overall, this will solve for the Density Altitude.
11 Solution: For Problem 2 During the second problem I really didn’t have that many problems, my main issues with the first problem was keeping the user in check, which I didn’t have to worry about in this problem. During problem two my main problems had to do with keeping my variables in check. Since variable names were given, it was easy to look at the equation and know exactly what I was solving for. I can think of one problem that set me back a bit, being the organization of the equations. In the project pdf if had some of the equations out of place than they should’ve been in the code. This made me have to put the equations in order of how I wanted to solve for each variable. The only other problem that can be listed is the increased difficulty of the equations which would lead to more syntax errors, but after using trial and error of the code not working, I was able to pinpoint any problems with the code itself very quickly. I didn’t enter any values because they were all given but I did crosscheck my answers with the NOAA site provided in the project pdf. Output: densityaltitude:- 1270.542644feet The dew point temperature is: -6.84 deg C The vapor pressure is: 3.662930 millibar The virtual temperature is: 273.09 K The virtual tempurature is: 491.59 Rankine The pressure is: 30.27 inHG
12 Discussion: For Problem 2 After finishing problem two I used the same technique as problem one, I took a picture of what the correct output was supposed to be during lecture, as instructed and tried to base my code off of those outputs, the major problem came with knowing if the calculations were in fact correct. The first problem allowed user inputs and the other numbers were constants. This meant I could enter in the exact inputs and strive for the same outputs. This problem however was very different as it used the current weather. So the weather was constantly changing. Knowing this I could use the lecture example as a way to format my output but unfortunately not to check calculations. But I was able to use the NOAA to check my calculations and output which appeared to match: densityaltitude:-1270.542644 feet The dew point temperature is: -6.84 deg C The vapor pressure is: 3.66 millibar The virtual temperature is: 273.09 K The virtual temperature is: 491.59 Rankine The pressure is: 30.27 inHG When I ran the program and had the same format as what was given in class I was pleased and then when I checked the NOAA and had the same answers. - What was the density altitude that you calculated? -1270.542644 feet - Why is density altitude important in aviation? The density altitude is very important in aviation due to the fact that it can have a great affect on the performance of the aircraft itself. If the density altitude were significantly high, it would reduce life, and also reduce the efficiency of the engine and specifically the propellers. It also affects takeoff and landing. All of these things if not known, or measured carefully could lead to major injury if not judged correctly.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
13 Appendix: For Problem 1 Script 1: clear,clc %{ AERE 161, Project 1, Problem 1 Purpose: Check if the plane exceeds the maximum weight as well as check if the center of gravity is within the contraints given so the plane will be able to fly %} fprintf( "Welcome to the Weight and Balance Calculator\n" ) %Greetings for user fprintf( "This calculator is for a Piper Pa-28-180 Aircraft\n" ) fprintf( "-------------------------------------------------\n" ) fprintf( 'Please answer the following questions accurately\n' ) [fuel, pilotweight, copilotweight, pasone, pastwo,empweight]=totweight; % fuelW=fuel*6; %Calculates weight of fuel based on how many gallons are given rampW=fuelW+pilotweight+copilotweight+pasone+pastwo+empweight; %calculates the total weight of the plane if rampW>2400 %sets parameters on if the plane is over 2400lbs fprintf( 'The plane will be too heavy to fly, lose some weight!' ); %displays if the plane is overweight return else fprintf( 'The weight of the ramp is %d lbs: \n ' ,rampW); %Displays the weight of the ramp if it is underweight end Emom=empweight*85.9; %this calculates the empty weight by taking it and multiplying it by the length of the arm given Frmom=(pilotweight+copilotweight)*85.5; %(pilot and copilot multiplied by arm length) Rmom=(pastwo+pasone)*118.1; %pasone and pastwo multiplied by arm length Fmom=fuelW*95; %multiply fuel weight by arm length totmom=Emom+Frmom+Rmom+Fmom; %calculates total moment by adding other moments fprintf( 'The total moment is %6.2f\n\n' ,totmom); %prints the total moment CenterofG=totmom/rampW; %calculates the center of gravity by dividing total moment by ramp weight fprintf( 'The Center of Gravity is %6.2f\n\n' ,CenterofG); %Displays the center of gravity if CenterofG >86.8 && CenterofG< 95.8 %sets parameters on the center of gravity(Total loaded moment) between 86.8 and 95.8 inches fprintf( "Everything Checks out! You're ready for takeoff!\n" ) %lets user know that it is in the range else fprintf( "You're NOT ready to fly, the Center of Gravity is OFF!\n" ) %lets user know its out of range return end
14 fprintf( 'Total Fuel Weight is: %6.2f lbs\n' ,fuelW) %displays total fuel weight fprintf( 'Total Weight is: %6.2f lbs.\n' ,rampW) %displays total weight fprintf( 'Front Seats moment is: %6.2f lbs-in\n' ,Frmom) %displays front seat moment fprintf( 'Rear seats moment is: %6.2f lbs-in\n' ,Rmom) %displays rear seats moment fprintf( 'Fuel moment: %6.2f lbs-in\n' ,Fmom) %Displays fuel moment fprintf( 'Empty Aircraft moment %6.2f lbs-in\n' ,Emom) %displays Empty aircraft moment fprintf( 'Total moment %6.2f lbs-in \n' ,totmom) %displays total moment fprintf( 'Total moment arm is %6.2f inches \n' ,CenterofG) %displays total moment arm. Function 1: function [fuel,pilotweight,copilotweight,pasone,pastwo,empweight]=totweight %UNTITLED3 Summary of this function goes here % Detailed explanation goes here fuel=input( 'How much fuel is on board (in US Gallons)? ' ); pilotweight=input( 'What is the weight of the pilot in (in lbs)? ' ); copilotweight=input( 'What is the weight of the co-pilot (in lbs)? ' ); pasone=input( 'What is the weight of passenger one?(If no passenger enter 0) ' ); pastwo=input( 'What is the weight of passenger two?(If no passenger enter 0) ' ); empweight=1471; if fuel <= 50 && fuel >= 0 fuel = fuel; else fuel = input( 'input valid fuel amount/n RANGE: 0 to 50' ); end end Appendix: For Problem 2 Script 2:
15 clear,clc %Michael Becker, AERE 161, Project 1, Problem 2 %Purpose: To display all aspects of the weather and calculate %vaporpressure %API showing the current weather information key = '7cab1fcaf444883263bc48dd983e6018' ; options = weboptions( 'ContentType' , 'json' ); url=[ 'https://api.openweathermap.org/data/2.5/weather? q=' , 'Ames' , '&APPID=' ,key]; CurrentData = webread(url, options); temp = CurrentData.main.temp; %temp equals current data pressure = CurrentData.main.pressure; %pressure equals current data humidity = CurrentData.main.humidity; %humidity equals current data tempC=kelvin_to_celsius(temp); %calling the function created (converts Kelvin to Celsius) dewpoint=tempC-((100-humidity)/5); %calculates the dewpoint by taking the temperature in Celsius %and then doing 100 subtracted by the humidity(given) and dividing it by 5. vaporpressure=(6.11*(10^((7.5*dewpoint)/(237.7+dewpoint)))); %takes the dewpoint we calculated and used the %equation given, for (Td) I substituted (dewpoint) virtualtemp=temp/(1- (vaporpressure)/(pressure*(1-0.622))); %now that we have the vapor pressure we use the given equation we sub T for %vaporpressure and sub pressure for the other aspect. This solves for the %virtual temperature virtualtempR=(9/5*(virtualtemp-273.15)+32)+459.69; %now that we have virtualtemp we use virtualtemp to sub for (Tv) in order %to calculate the Rankine value fieldelv=955.6; %given value for field elevation pressureinHG=pressure*0.02953; %To find pressure inHG(Millibar to inches) densityaltitude=fieldelv+(145366*(1-((17.326*pressureinHG)/virtualtempR)^0.23 5)); %calculates density altitude fprintf( 'densityaltitude:%ffeet \n' ,densityaltitude) %displays density altitude in feet fprintf( 'The dew point temperature is: %6.2f deg C \n' ,dewpoint); %displays dew point in degrees fprintf( 'The vapor pressure is: %6.2f millibar \n' ,vaporpressure); %displays vapor pressure in millibar fprintf( 'The virtual temperature is: %6.2f K \n' ,virtualtemp); % displays virtual temperature in Kelvin fprintf( 'The virtual temperature is: %6.2f Rankine \n' ,virtualtempR); %displays virtual temperature in Rankine fprintf( 'The pressure is: %6.2f inHG \n' ,pressureinHG); %displays pressure in inches of mercury
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
16 Function 2: function [tempC] = kelvin_to_celsius(temp) tempC=temp- 273.15; end