This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * @return - The sign of a number. | |
| */ | |
| template <typename T> int Sign(T val) { | |
| return (T(0) < val) - (val < T(0)); | |
| } | |
| class Throttle { | |
| public: | |
| using thrust = int; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unordered_map> | |
| #include <string> | |
| #include <cassert> | |
| #include <chrono> | |
| using milliseconds = std::chrono::milliseconds; | |
| using seconds = std::chrono::seconds; | |
| struct Vector3 { | |
| int x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %D = load('filename here.mat'); | |
| %data = D.data_TRT; | |
| rng default | |
| t = linspace(0, 60, 1000); | |
| a = 5; | |
| gamma = 0.1; | |
| w = 100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| from mpl_toolkits.mplot3d import Axes3D | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| im_level = Image.open('C:/Users/Martin/Desktop/map_generator/level_1.png', 'r') | |
| im_height = Image.open('C:/Users/Martin/Desktop/map_generator/height_map.png', 'r') | |
| im_height_r = im_height.convert('RGBA') | |
| im_level_r = im_level.convert('RGBA') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input = false; | |
| data = load('/MATLAB Drive/Examples/run_2_noinput.mat').run_2; | |
| if (input) | |
| data = load('/MATLAB Drive/Examples/ramp_1_60.mat').ramp_1_60; | |
| %data = load('/MATLAB Drive/Examples/stairs_p_45.mat').stairs_p_45; | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data = load('/MATLAB Drive/Examples/ramp_2_60.mat').ramp_2_60; | |
| h = 0.01; % time step | |
| offset = 1; % time offset in data array | |
| t = data(1, offset:end); % time | |
| x_1 = data(2, offset:end); % pitch | |
| u_1 = data(6, offset:end); % pitch input | |
| x_2 = gradient(x_1, t); % pitch velocity | |
| c_known = [-10.6657 0.0045 0.0609 2.8575 1.2201]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input = true; | |
| data = load('/MATLAB Drive/data/no_input_lift_to_maxdeg60_60_2.mat').IO_data; | |
| if (input) | |
| data = load('/MATLAB Drive/data/04_06_08_00_stair_60_2.mat').IO_data; | |
| end | |
| t = data(1, :); | |
| h = t(5) - t(4); % time step |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ---------------- | |
| GateEvent.dco | |
| (Type int) | |
| (Type bool) | |
| (Event GateEvent | |
| (int id (Default -1)) | |
| (int event_type (Default -1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input = true; | |
| data = load('/MATLAB Drive/Examples/run_2_noinput.mat').run_2; | |
| if (input) | |
| data = load('/MATLAB Drive/Examples/ramp_1_60.mat').ramp_1_60; | |
| %data = load('/MATLAB Drive/Examples/stairs_p_45.mat').stairs_p_45; | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input = true; | |
| data = load('/MATLAB Drive/Examples/run_2_noinput.mat').run_2; | |
| if (input) | |
| %data = load('/MATLAB Drive/Examples/ramp_1_60.mat').ramp_1_60; | |
| data = load('/MATLAB Drive/Examples/stairs_p_45.mat').stairs_p_45; | |
| end |
OlderNewer