import matplotlib.pyplot as plt
# Insert your logo into the generated images folder and re-write the directory below with your image name.
# This cell might need to be run twice to successfully load the image.
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\\Weishaeupl - Documents\\PhD\\2019\\AutoFLpy\\AutoFLpy\\autoflpy")
from autoflpy.util.plotting import *
from autoflpy.util.metar_processing import *
#Path to the compressed data.
data_file_path = "C:\\Users\\aw6g15\\University of Southampton\\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")
PROJ: proj_create_from_database: Cannot find proj.db
Data imported
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.
marker_list = []
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, marker_list)
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, marker_list, legend_location)
HDop - horizontal dilution of precision. HDop is a factor in determining the relative accuracy of a horizontal position. The smaller the HDop number, the better the data accuracy.
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, marker_list, 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, marker_list)
Location does not have high resolution Stamen terrain map data. Defaulting to OpenStreetMap data.
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, marker_list, 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", "ch3", "rcou"], ["x", "time", "rcou"]], values_list, x_limits, y_limits_left, y_limits_right, marker_list, 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 need to be mapped to your system. To change the channel mapping and names, access the Name_converter_list.txt file and change the following names.
Example:
RCOU, C5, CH5, us
to
RCOU, C5, throttle_CH5, us
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["x", "time", "rcou"], ["y", "ch5", "rcou"], ["y", "ch6", "rcou"]], values_list, x_limits, y_limits, marker_list)
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["x", "time", "rcou"], ["y", "ch3", "rcou"]], values_list, x_limits, y_limits, marker_list)
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["x", "time", "rcou"], ["y", "ch1", "rcou"], ["y", "ch2", "rcou"], ["y", "ch3", "rcou"]], values_list, x_limits, y_limits, marker_list)
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, marker_list, 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, marker_list)
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, marker_list)
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, marker_list)
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, marker_list)
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, marker_list)
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, marker_list)
The CSV 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, marker_list)
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, marker_list, 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=["y_min", "y_max"]
graph_plotter([["y", "desired roll", "att"], ["y", "roll", "att"], ["x", "time", "att"]], values_list, x_limits, y_limits, marker_list)
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "desired pitch", "att"], ["y", "pitch", "att"], ["x", "time", "att"]], values_list, x_limits, y_limits, marker_list)
x_limits=["x_min", "x_max"]
y_limits=["y_min", "y_max"]
graph_plotter([["y", "desired yaw", "att"], ["y", "yaw", "att"], ["x", "time", "att"]], values_list, x_limits, y_limits, marker_list)
take_off_graph(values_list)
Detected take-off time: 34.01 Groundspeed at detected take-off: 24.2 Detected ground run start time: 31.21