Plane Range Example#
This example demonstrates how to use flight-mech to compute the range of a plane in various conditions.
Imports#
[1]:
# Python imports
import os
import sys
sys.path.append("..")
# Additional imports
import numpy as np
import matplotlib.pyplot as plt
# Flight-Mech imports
from flight_mech.plane import Plane
Plane definition#
Let us use in this case the Cessna Citation III defined in the database.
[2]:
# Load the plane
plane = Plane("cessna_citation_III")
Range computation#
We can now define an altitude and compute the range for a fixed altitude and at a fixed pre-defined velocity.
[3]:
# Define the altitude
z = 6700 # m
# Print the results
print("max range at 6700m [m]", plane.compute_max_range_at_fixed_altitude(z))
speed = plane.compute_reference_speed(z)
print("v [m.s-1]", speed)
print("max range at fixed speed [m]",
plane.compute_range_at_fixed_speed(speed, f=plane.f_max))
max range at 6700m [m] 5826348.502702705
v [m.s-1] 121.49114223719054
max range at fixed speed [m] 5739785.452624167