MCPcopy Create free account

hub / github.com/brianwade1/quadcopter_with_PID_controller / functions

Functions24 in github.com/brianwade1/quadcopter_with_PID_controller

↓ 12 callersFunctionc
cosine of angle in radians
Quadcopter.py:12
↓ 9 callersFunctions
sine of angle in radians
Quadcopter.py:17
↓ 6 callersFunctioninitialize_results
(res_array, num)
Quadcopter_main.py:77
↓ 2 callersMethodbody2inertial_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 callersMethodcontrol_update
(self, pos_error, vel_error)
PID_Controller.py:19
↓ 2 callersFunctiont
tangent of angle in radians
Quadcopter.py:22
↓ 2 callersMethodthetadot2omega
rotate body angular velocity (Euler_dot) to inertial angular velocity (omega)
Quadcopter.py:142
↓ 1 callersMethodcalc_ang_error
Returns the error between actual angle and reference angle
Quadcopter.py:99
↓ 1 callersMethodcalc_ang_vel_error
Returns the error between angular velocity position and reference angular velocity
Quadcopter.py:104
↓ 1 callersMethodcalc_pos_error
Returns the error between actual position and reference position
Quadcopter.py:89
↓ 1 callersMethodcalc_vel_error
Returns the error between actual velocity and reference velocity
Quadcopter.py:94
↓ 1 callersMethoddes2speeds
finds speeds of motors to achieve a desired thrust and torque
Quadcopter.py:190
↓ 1 callersMethodfind_body_torque
(self)
Quadcopter.py:226
↓ 1 callersMethodfind_lin_acc
Find linear acceleration in m/s
Quadcopter.py:172
↓ 1 callersMethodfind_omegadot
Find the angular acceleration in the inertial frame in rad/s
Quadcopter.py:164
↓ 1 callersMethodinertial2body_rotation
Euler rotations from inertial to body frame (Transpose of body-to-internal rotation)
Quadcopter.py:132
↓ 1 callersMethodomegadot2Edot
rotate inertial angular velocity (omega) to body angular velocity (Euler_dot)
Quadcopter.py:153
↓ 1 callersMethodstep
(self)
Quadcopter.py:234
↓ 1 callersFunctiontotal_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 callersFunctionwrite_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
Functionerror_plot
Plots to the magnitude of the position error vector (m)
Quadcopter_main.py:192
Functionsimple_plot
Plots the laterial position, vertical position, and Euler angles over time. This is a quick plot for trouble shooting
Quadcopter_main.py:200