- Collect data for pressure readings from the senor as a function of altitude of the plane and make a graph of this function.
- Test the product code during flight to see if the servo rotate at given different levels.
Procedure:
Our plane climbed from ground to
9000 feet. During the flight, we collected pressure and altitude
from the program, and altitude from the altimeter of the plane for
every 500 feet. When the plane went down, we used our product code to
control the servo to rotate at certain altitude and checked if it
functions.
Data section:
Table of data from ReadAltitude function (from 1500ft to 9000ft)
- Pressure(pa)altitude(ft)960251478.98636947001859.03592933752243.41572920502632.23762907253025.61801894003423.6781880753826.54418867504234.34789854254647.22657841005065.32359827755488.7887814505917.77842801256352.4565788006792.99431774757239.57142761507692.37605748258151.6057735008617.46778721759090.18027
Table of data collected from plane
- Pressure(pa)altitude(ft)959531500941302000923512500907563000890333500875234000858494500842805000827025500812306000786456500781297000767007500751458000737928500724049000
Analysis:
When we combine the data collected
from the function and plane, the data collect from function is
overlap with the data from plane. This char indicates that the
function from the library matches the real data very well. Thus, the
ReadAltitude function from library is dependable.
(see figure 3 in post "chart")
(see figure 3 in post "chart")
Also, we noticed that the data in this
chart look like a linear function, but the theoretical function from
library is an exponential function:
Altituded(ft) = 145402*(1-(
Pressure(pa) / 101325)^0.1903)
The reason we get a linear function is
that the range of altitude in the chart is too small. When we changed
the range to from 0 to 100000ft, we get a exponential function
finally. As we can see, the collected data is a part of this
function, and it looks like a linear function in this part:
(see figure 4 in post "chart")
We tested the product code to control
the rotation of servo for serval times, but it did not rotate until
the product code was corrected. Finally, the servo rotated as
predicted at the last time when the plane went down through the
altitude of 2000ft.
Before the product code was corrected,
the servo did not work because the program calibrated the initail
pressure every time the board is restarted or the code is uploaded.
The variable, gaugePressure, which is the difference between initail
and current pressure, was used to control the servo. However, if the
initial pressure is calibrated during the flight, the wrong
gaugePressure would be used to control the servo and lead to failure.
At the last time, the code was changed to control the servo by using
directly the reading from pressure sensor, and the servo worked as
predicted.
This problem implied that initial
pressure is not a necessary variable for servo control, and
calibration of initial pressure might be get rid of.
Conclusion:
In this test, we achieved our goals
successfully. We found out that the reading from the plane matches
the theorical function very well and controlled the servo working as
predicted by solving a little bug. Also, we noticed that the
calibration might not be necessary in servo control. At last, thank
Jason for his adept flying skills to make this test possible.
No comments:
Post a Comment