Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/brianwade1/quadcopter_with_PID_controller
/ functions
Functions
24 in github.com/brianwade1/quadcopter_with_PID_controller
⨍
Functions
24
◇
Types & classes
2
↓ 12 callers
Function
c
cosine of angle in radians
Quadcopter.py:12
↓ 9 callers
Function
s
sine of angle in radians
Quadcopter.py:17
↓ 6 callers
Function
initialize_results
(res_array, num)
Quadcopter_main.py:77
↓ 2 callers
Method
body2inertial_rotation
Euler rotations from body-frame to global inertial frame angle 0 = roll (x-axis, phi) angle 1 = pitch (y-axis, theta)
Quadcopter.py:110
↓ 2 callers
Method
control_update
(self, pos_error, vel_error)
PID_Controller.py:19
↓ 2 callers
Function
t
tangent of angle in radians
Quadcopter.py:22
↓ 2 callers
Method
thetadot2omega
rotate body angular velocity (Euler_dot) to inertial angular velocity (omega)
Quadcopter.py:142
↓ 1 callers
Method
calc_ang_error
Returns the error between actual angle and reference angle
Quadcopter.py:99
↓ 1 callers
Method
calc_ang_vel_error
Returns the error between angular velocity position and reference angular velocity
Quadcopter.py:104
↓ 1 callers
Method
calc_pos_error
Returns the error between actual position and reference position
Quadcopter.py:89
↓ 1 callers
Method
calc_vel_error
Returns the error between actual velocity and reference velocity
Quadcopter.py:94
↓ 1 callers
Method
des2speeds
finds speeds of motors to achieve a desired thrust and torque
Quadcopter.py:190
↓ 1 callers
Method
find_body_torque
(self)
Quadcopter.py:226
↓ 1 callers
Method
find_lin_acc
Find linear acceleration in m/s
Quadcopter.py:172
↓ 1 callers
Method
find_omegadot
Find the angular acceleration in the inertial frame in rad/s
Quadcopter.py:164
↓ 1 callers
Method
inertial2body_rotation
Euler rotations from inertial to body frame (Transpose of body-to-internal rotation)
Quadcopter.py:132
↓ 1 callers
Method
omegadot2Edot
rotate inertial angular velocity (omega) to body angular velocity (Euler_dot)
Quadcopter.py:153
↓ 1 callers
Method
step
(self)
Quadcopter.py:234
↓ 1 callers
Function
total_plot
This is a full plot of the results. It will plot the 3D flight path, vertical and lateral positions, lateral velocity, motor thrusts, body to
Quadcopter_main.py:237
↓ 1 callers
Function
write_init_ang_vel_to_screen
The program initializes with a random perturbation in angular velocity on the vehicle. This simulates a wind disturbace. This is a disp
Quadcopter_main.py:180
Method
__init__
(self, Kp, Kd, Ki, Ki_sat, dt)
PID_Controller.py:9
Method
__init__
(self, pos, vel, angle, ang_vel, pos_ref, dt)
Quadcopter.py:28
Function
error_plot
Plots to the magnitude of the position error vector (m)
Quadcopter_main.py:192
Function
simple_plot
Plots the laterial position, vertical position, and Euler angles over time. This is a quick plot for trouble shooting
Quadcopter_main.py:200