summaryrefslogtreecommitdiff
path: root/evaluator/drag.py
blob: 73a26fced265d2cf1fab35184d002c499d0a1e20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import random

def get_drag(aircraft, drag):
    # Transform semi-span integer into list
    semi_span = [x for x in range(0, aircraft.wing.semi_span)]

    # Drag increases after 80% of the semi_span
    cutoff = round(0.8 * aircraft.wing.span)

    # Drag increases by 25% after 80% of the semi_span
    F_x = [drag for x in semi_span[0:cutoff]]
    F_x.extend([1.25 * drag for x in semi_span[cutoff:]])
    return F_x


def get_drag_total(aircraft):
    """Get total drag force acting on the aircraft."""
    return random.random() * 100
Copyright 2019--2024 Marius PETER