import matplotlib.pyplot as plt
# Insert your logo into the generated images folder and re-write the directory below with your image name.
image = plt.imread("..\images\Your_logo_file_name_here.png")
_ = plt.figure(figsize=(20,8))
img = plt.imshow(image)
_ = plt.axis('off')
Below is the Required code, please run this code to allow other code to function
# GRAPH_DATA_IMPORT
import sys
import pickle as pk
import warnings
# Hides warnings
warnings.filterwarnings('ignore')
# Creates a link to where the code is stored.
sys.path.append("C:\\Users\\aw6g15\\University of Southampton\\Adrian Weishaeupl - Documents\\PhD\\2019\\AutoFLpy\\AutoFLpy\\autoflpy")
from autoflpy.util.flight_log_code import *
#Path to the compressed data.
data_file_path = "C:\\Users\\aw6g15\\University of Southampton\\Adrian Weishaeupl - Documents\\PhD\\2019\\AutoFLpy\\AutoFLpy\\autoflpy\\user_files\\excel_file_path\\20190110_Flight01.pkl"
# Uncompressing the data.
values_list = pk.load(open(data_file_path, "rb"))
print("Data imported")
The METARs for EGHE were:
type: routine report, cycle 16 (automatic report) (manually corrected report)
time: Thu Jan 10 15:50:00 2019
wind: NW to NNE at 4 knots
visibility: greater than 10000 meters
sky: a few clouds at 800 feet
broken clouds at 2000 feet
METAR: COR EGHE 101550Z 02004KT 320V030 9999 FEW008 BKN020
type: routine report, cycle 15 (automatic report)
time: Thu Jan 10 15:20:00 2019
temperature: 9.0 C
dew point: 5.0 C
wind: NNE at 3 knots
visibility: greater than 10000 meters
pressure: 1032.0 mb
sky: broken clouds at 2200 feet
METAR: EGHE 101520Z 03003KT 9999 BKN022 09/05 Q1032
This METAR data was from:https://www.ogimet.com/display_metars2.php?lang=en&lugar=EGHE&tipo=ALL&ord=REV&nil=SI&fmt=html&ano=2019&mes=01&day=10&hora=15&anof=2019&mesf=01&dayf=10&horaf=15&minf=59&send=send
The Initial Pre-Flight, Launch and Post-Flight checklists were actioned.
The flight Duration was recorded as / can be found at: 5.0, this data was recorded by Adrian Weishaeupl.
The Initial Pre-Flight was actioned by Adrian Weishaeupl starting at 2019-01-10 15:31:44 and ending at 2019-01-10 15:32:58. The notes recorded on this checklist were: THIS IS A TEST. The Battery voltages of each battery are/ can be found at: 25.2.
The Launch was actioned by Adrian Weishaeupl starting at 2019-01-10 15:33:05 and ending at 2019-01-10 15:33:46. The notes recorded on this checklist were: TEST.
The Post-Flight was actioned by Adrian Weishaeupl starting at 2019-01-10 15:33:48 and ending at 2019-01-10 15:34:23. The notes recorded on this checklist were: TEST.
The checklist version used was v0.1.
Below are the Graphs of the data recorded from the flight. For more information on how to manipulate these graphs and customise them, please visit https://autoflpy.readthedocs.io/en/latest/examples.html.
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "altitude", "gps"], ["x", "time", "gps"]], values_list, x_limits, y_limits)
Altitude - from the GPS data set. This is an altitude above ground level and is using the GNSS.
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "hdop", "gps"]], [["y", "number of satellites", "gps"], ["x", "time", "gps"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)
HDop - horizontal dilution of precision. HDOP is a factor in determining the relative accuracy of a horizontal position. The smaller the DOP number, the better the geometry.
Number of Satellites - The number of satellites whose signal is being received. The type of satellite network being used depends on you sensor.
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "airspeed", "arsp"], ["x", "time", "arsp"]], [["y", "groundspeed", "gps"], ["x", "time", "gps"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)
Airspeed - the type of airspeed (IAS, TAS, CAS, EAS) depends on the sensor you are using.
Groundspeed - from the GPS data set. This is the speed travelled along the ground and is derived from GNSS measurements.
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "latitude", "gps"], ["x", "longitude", "gps"]], values_list, x_limits, y_limits)
Position data - from the GPS data set.
This is a completely fictitious, illustrative virtual flight and this example should in no way be seen as a suggestion of the suitability of the location for flight operations. All flights in UK airspace should be conducted in the framework set out by the Civil Aviation Authority.
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "current", "bat"], ["x", "time", "bat"]], [["y", "voltage", "bat"], ["x", "time", "bat"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)
Battery voltage - as read by the power sensor.
Current - as read by the power sensor.
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "current", "bat"], ["x", "time", "bat"]], [["y", "throttle ch3", "rcin"], ["x", "time", "rcin"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)
The following variables are represented in micro seconds (us). This is a Pulse Width Modulation (PWM) signal which is a way of representing an analogue signal digitally. It is used in many applications such as servo motors.
NOTE: Channels may not be mapped in the same way as done here. To change the channel mapping and names, access the Name_converter_list.txt file and change the following names.
Example:
RCIN, C5, flap_CH5, us
to
RCIN, C5, throttle_CH5, us
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["x", "time", "rcin"], ["y", "flap ch5", "rcin"], ["y", "ch6", "rcin"]], values_list, x_limits, y_limits)
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["x", "time", "rcin"], ["y", "throttle ch3", "rcin"]], values_list, x_limits, y_limits)
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["x", "time", "rcin"], ["y", "aileron ch1", "rcin"], ["y", "elevator ch2", "rcin"], ["y", "rudder ch3", "rcin"]], values_list, x_limits, y_limits)
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "airspeed", "arsp"], ["x", "time", "arsp"]], [["y", "altitude", "baro"], ["x", "time", "baro"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)
Altitude - from the barometer data set. This is the altitude derived from the air pressure and is relative to the arming altitude.
Airspeed - the type of airspeed (IAS, TAS, CAS, EAS) depends on the sensor you are using.
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "temp", "arsp"], ["x", "time", "arsp"]], values_list, x_limits, y_limits)
Temperature - measured by the airspeed sensor.
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "pitch", "ctun"], ["x", "time", "ctun"]], values_list, x_limits, y_limits)
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "roll", "ctun"], ["x", "time", "ctun"]], values_list, x_limits, y_limits)
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "aoa", "aoa"], ["x", "time", "aoa"]], values_list, x_limits, y_limits)
AOA - Angle Of Attack. This is the angle between the incoming air and the aircraft's horizontal plane. It is a calculated measurement.
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "ssa", "aoa"], ["x", "time", "aoa"]], values_list, x_limits, y_limits)
SSA - Side Slip Angle. The angle between the incoming air and the aircraft's vertical plane. It is a calculated measurement.
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["x", "time", "vibe"], ["y", "vibex", "vibe"], ["y", "vibey", "vibe"], ["y", "vibez", "vibe"]], values_list, x_limits, y_limits)
The arduino data section serves to show the user how to add additional, non-flight computer related data to the report. In this example, the data is recorded by an arduino.
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["x", "time", "arduinomicro"], ["y", "temp0", "arduinomicro"], ["y", "temp1", "arduinomicro"], ["y", "temp2", "arduinomicro"], ["y", "temp3", "arduinomicro"], ["y", "temp4", "arduinomicro"], ["y", "temp5", "arduinomicro"]], values_list, x_limits, y_limits)
The above graph shows some mock data of 6 additional temperature sensors plotted. These were recorded by an external arduino.
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "battvoltage", "arduinomicro"], ["x", "time", "arduinomicro"]], [["y", "battcharging", "arduinomicro"], ["x", "time", "arduinomicro"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)
The above data shows additional mock battery data recorded by an arduino. In this case, battvoltage represents the voltage of the external battery and battcharging is a binary representation of whether or not the battery is currently being charged.
The following section represents data about the autopilot's operation. The data can be understood through the following example:
desired_roll - the roll that the autopilot is instructing the aircraft to do.
roll - the roll that the aircraft is actually doing.
This data is useful for troubleshooting flight computer problems.
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "desired roll", "att"]], [["y", "roll", "att"], ["x", "time", "att"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "desired pitch", "att"]], [["y", "pitch", "att"], ["x", "time", "att"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)
x_limits=["x_min", "x_max"]
y_limits_left=["y_min", "y_max"]
y_limits_right=["y_min", "y_max"]
legend_location=1
multiaxis_graph_plotter([["y", "desired yaw", "att"]], [["y", "yaw", "att"], ["x", "time", "att"]], values_list, x_limits, y_limits_left, y_limits_right, legend_location)