diff --git a/mavion/ctlfun.py b/mavion/ctlfun.py new file mode 100644 index 0000000000000000000000000000000000000000..2f78993e41a3741ed38160c72ac94071ef91e1b8 --- /dev/null +++ b/mavion/ctlfun.py @@ -0,0 +1,20 @@ + +import numpy as np + +def pulse(t, t0, tf): + u = 0 if (t<t0 or t>=tf) else 1 + return u + +def step(t, t0) : + u = 0 if t<t0 else 1 + return u + +def ramp(t, t0) : + u = 0 if t<t0 else (t - t0) + return u + +time = np.arange(0, 20, 0.01) + +p = pulse(time, 1, 2) + +print(p) diff --git a/mavion/mavion.yaml b/mavion/mavion.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a1abdd630a3c168970b367c4ea81c9924815df11 --- /dev/null +++ b/mavion/mavion.yaml @@ -0,0 +1,24 @@ +--- +NAME : "MAVION" + +G : 9.81 +RHO : 1.225 +MASS : 0.438 +CHORD : 0.21 +WINGSPAN : 0.42 +THICKNESS : 0.02 +P_P1_CG : [0.15, -0.5, 0] +P_P2_CG : [0.15, 0.5, 0] +P_A1_CG : [0.00, -0.5, 0] +P_A2_CG : [0.00, 0.5, 0] +INERTIA : [0.0036, 0.0036, 0.0072] +INERTIA_PROP_X : 3.46e-6 +INERTIA_PROP_N : 0.0 +WET_SURFACE : 0.0441 +DRY_SURFACE : 0.0 +PHI_n : 0.0 +PROP_RADIUS : 0.105 +ELEVON_MEFFICIENCY : [0, 0.66, 0] +ELEVON_FEFFICIENCY : [0, 0.33,0] +PROP_KP : 7.84e-06 +PROP_KM : 2.400e-7 diff --git a/mavion/pygmavion.py b/mavion/pygmavion.py new file mode 100644 index 0000000000000000000000000000000000000000..bf07d9fcc9c21d3e372ce45b34de3923f18e43e6 --- /dev/null +++ b/mavion/pygmavion.py @@ -0,0 +1,34 @@ +# import the pygame module, so you can use it +import pygame + +# define a main function +def main(): + + # initialize the pygame module + pygame.init() + # load and set the logo + logo = pygame.image.load("logo32x32.png") + pygame.display.set_icon(logo) + pygame.display.set_caption("minimal program") + + # create a surface on screen that has the size of 240 x 180 + screen = pygame.display.set_mode((240,180)) + + # define a variable to control the main loop + running = True + + # main loop + while running: + # event handling, gets all event from the event queue + for event in pygame.event.get(): + # only do something if the event is of type QUIT + if event.type == pygame.QUIT: + # change the value to False, to exit the main loop + running = False + + +# run the main function only if this module is executed as the main script +# (if you import this as a module then nothing is executed) +if __name__=="__main__": + # call the main function + main() \ No newline at end of file