{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Plane Landing Example\n", "\n", "This example demonstrates how to use flight-mech to compute the landing characteristics of a plane." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Python imports\n", "import os\n", "import sys\n", "sys.path.append(\"..\")\n", "\n", "# Additional imports\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "# Flight-Mech imports\n", "from flight_mech.plane import Plane" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Plane definition\n", "\n", "Let us use in this case the Cessna Citation III defined in the database." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Load the plane\n", "plane = Plane(\"cessna_citation_III\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Landing characteristics\n", "\n", "We can now define a runway by its altitude and friction coefficient, set the plane in landing configuration and compute the landing distance and velocities." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "weight [N] 54936.0\n", "landing speed [m.s-1] 45.33584221198617\n", "landing distance [m] 976.4188122310702\n" ] } ], "source": [ "# Define the friction coefficient of the landing strip\n", "mu = 0.1\n", "\n", "# Define the landing altitude\n", "z = 0\n", "\n", "# Update some coefficients to set the landing configuration\n", "plane.C_D_0 = plane.C_D_0 * 1.1\n", "plane.m_fuel = 0\n", "plane.C_L_max = 2.5\n", "plane.update_variables(force=True)\n", "\n", "# Print the results\n", "print(\"weight [N]\", plane.P)\n", "print(\"landing speed [m.s-1]\", plane.compute_landing_speed(z))\n", "print(\"landing distance [m]\", plane.compute_landing_distance(z, mu, C_L=0))" ] } ], "metadata": { "kernelspec": { "display_name": "venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.4" } }, "nbformat": 4, "nbformat_minor": 2 }