1#ifndef BITSIM_CONTROL_RC_COMMAND_H
2#define BITSIM_CONTROL_RC_COMMAND_H
42 {
return x < lo ? lo : (x > hi ? hi : x); };
43 return {clamp(
throttle, 0.0, 1.0), clamp(
yaw, -1.0, 1.0), clamp(
pitch, -1.0, 1.0),
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
RCCommand failsafe_command() noexcept
What a receiver does when it loses the transmitter: disarm, so the motors stop.
Definition rc_command.h:37
Controllers: PID controllers, line following, a quadrotor flight controller, a fixed wing autopilot,...
Definition control_module.h:18
Definition dc_motor_backend_base.h:9
double real_t
real_t
Definition bitsim_types.h:20
What the sticks of a radio transmitter for a quadrotor say, as a toy drone's transmitter sends them: ...
Definition rc_command.h:20
real_t roll
[-1, 1]: + flies to the right, right side down
Definition rc_command.h:24
real_t yaw
[-1, 1]: + turns to the right
Definition rc_command.h:22
bool armed
the motors spin only when armed
Definition rc_command.h:25
RCCommand clamped() const noexcept
The command with the throttle in [0, 1] and the sticks in [-1, 1].
Definition rc_command.h:39
real_t throttle
[0, 1]: 0 the motors off, 1 full thrust
Definition rc_command.h:21
real_t pitch
[-1, 1]: + flies forward, nose down
Definition rc_command.h:23