Monday, September 17, 2012

[Testing] Flight test 9-15-12

Purpose:
    1. Collect data for pressure readings from the senor as a function of altitude of the plane and make a graph of this function.
    2. 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)
96025
1478.98636
94700
1859.03592
93375
2243.41572
92050
2632.23762
90725
3025.61801
89400
3423.6781
88075
3826.54418
86750
4234.34789
85425
4647.22657
84100
5065.32359
82775
5488.7887
81450
5917.77842
80125
6352.4565
78800
6792.99431
77475
7239.57142
76150
7692.37605
74825
8151.6057
73500
8617.46778
72175
9090.18027
            (see figure 1 in post "chart")


Table of data collected from plane

Pressure(pa)
altitude(ft)
95953
1500
94130
2000
92351
2500
90756
3000
89033
3500
87523
4000
85849
4500
84280
5000
82702
5500
81230
6000
78645
6500
78129
7000
76700
7500
75145
8000
73792
8500
72404
9000
              (see figure 2 in post "chart")


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")

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