multirotor.physics¶
Module Contents¶
Functions¶
|
|
|
|
|
Calculates the torque acting on the three body axes (roll, pitch, yaw), due |
|
Given forces and torqes, return the rate of change of state. |
Attributes¶
- multirotor.physics.thrustEqn(vi, *prop_params)¶
- multirotor.physics.thrust(prop_speed, airstream_velocity, R, A, rho, a, b, c, eta, theta0, theta1) float¶
- multirotor.physics.torque(position_vector: numpy.ndarray, force: numpy.ndarray, moment_of_inertia: float, prop_angular_acceleration: float, drag_coefficient: float, prop_angular_velocity: float, clockwise: int) numpy.ndarray¶
Calculates the torque acting on the three body axes (roll, pitch, yaw), due to a single propeller.
Parameters¶
- position_vectornp.ndarray
Position vector of force, relative to center of mass. If multiple vectors, should be in shape 3 x n_vectors.
- forcenp.ndarray
Force vector acting at that position (nominally thrust). If multiple vectors, should be in shape 3 x n_vectors.
- moment_of_inertiafloat
Moment of inertia of the body.
- prop_angular_accelerationfloat
Angular acceleration experienced by propeller.
- drag_coefficientfloat
The drag coefficient of propeller.
- prop_angular_velocityfloat
Propeller speed (rad/s)
- clockwiseint
Whether propeller is spinning clockwise or counter clockwise.
Returns¶
- np.ndarray
The torque due to the propeller acting on the center of mass.
- multirotor.physics._apply_forces_torques(forces: numpy.ndarray, torques: numpy.ndarray, x: numpy.ndarray, g: float, mass: float, inertia_matrix: numpy.matrix, inertia_matrix_inverse: numpy.matrix) numpy.ndarray¶
Given forces and torqes, return the rate of change of state.
Parameters¶
- forcesnp.ndarray
Forces acting in the body frame.
- torquesnp.ndarray
Torques acting in the body frame.
- xnp.ndarray
State of the vehicle.
- gfloat
Gravitational acceleration.
- massfloat
Mass of the vehicle.
- inertia_matrixnp.matrix
Inertial matrix.
- inertia_matrix_inversenp.matrix
Inverse of inertial matrix.
Returns¶
- np.ndarray
The rate of change of state d(state)/dt
- multirotor.physics.apply_forces_torques¶