APM:Libraries
Public Types | Public Member Functions | Public Attributes | List of all members
SITL::Motor Class Reference

#include <SIM_Motor.h>

Public Types

enum  { SERVO_NORMAL, SERVO_RETRACT }
 

Public Member Functions

 Motor (uint8_t _servo, float _angle, float _yaw_factor, uint8_t _display_order)
 
 Motor (uint8_t _servo, float _angle, float _yaw_factor, uint8_t _display_order, int8_t _roll_servo, float _roll_min, float _roll_max, int8_t _pitch_servo, float _pitch_min, float _pitch_max)
 
void calculate_forces (const Aircraft::sitl_input &input, float thrust_scale, uint8_t motor_offset, Vector3f &rot_accel, Vector3f &body_thrust)
 
uint16_t update_servo (uint16_t demand, uint64_t time_usec, float &last_value)
 

Public Attributes

float angle
 
float yaw_factor
 
uint8_t servo
 
uint8_t display_order
 
int8_t roll_servo = -1
 
float roll_min
 
float roll_max
 
int8_t pitch_servo = -1
 
float pitch_min
 
float pitch_max
 
enum SITL::Motor:: { ... }  servo_type
 
float servo_rate = 0.24
 
uint64_t last_change_usec
 
float last_roll_value
 
float last_pitch_value
 

Detailed Description

Definition at line 28 of file SIM_Motor.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SERVO_NORMAL 
SERVO_RETRACT 

Definition at line 42 of file SIM_Motor.h.

Constructor & Destructor Documentation

◆ Motor() [1/2]

SITL::Motor::Motor ( uint8_t  _servo,
float  _angle,
float  _yaw_factor,
uint8_t  _display_order 
)
inline

Definition at line 47 of file SIM_Motor.h.

◆ Motor() [2/2]

SITL::Motor::Motor ( uint8_t  _servo,
float  _angle,
float  _yaw_factor,
uint8_t  _display_order,
int8_t  _roll_servo,
float  _roll_min,
float  _roll_max,
int8_t  _pitch_servo,
float  _pitch_min,
float  _pitch_max 
)
inline

Definition at line 57 of file SIM_Motor.h.

Here is the call graph for this function:

Member Function Documentation

◆ calculate_forces()

void Motor::calculate_forces ( const Aircraft::sitl_input input,
float  thrust_scale,
uint8_t  motor_offset,
Vector3f rot_accel,
Vector3f body_thrust 
)

Definition at line 25 of file SIM_Motor.cpp.

Referenced by SITL::Frame::calculate_forces(), and Motor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_servo()

uint16_t Motor::update_servo ( uint16_t  demand,
uint64_t  time_usec,
float &  last_value 
)

Definition at line 89 of file SIM_Motor.cpp.

Referenced by calculate_forces(), and Motor().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ angle

float SITL::Motor::angle

Definition at line 30 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ display_order

uint8_t SITL::Motor::display_order

Definition at line 33 of file SIM_Motor.h.

◆ last_change_usec

uint64_t SITL::Motor::last_change_usec

Definition at line 44 of file SIM_Motor.h.

Referenced by calculate_forces(), and update_servo().

◆ last_pitch_value

float SITL::Motor::last_pitch_value

Definition at line 45 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ last_roll_value

float SITL::Motor::last_roll_value

Definition at line 45 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ pitch_max

float SITL::Motor::pitch_max

Definition at line 39 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ pitch_min

float SITL::Motor::pitch_min

Definition at line 39 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ pitch_servo

int8_t SITL::Motor::pitch_servo = -1

Definition at line 38 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ roll_max

float SITL::Motor::roll_max

Definition at line 37 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ roll_min

float SITL::Motor::roll_min

Definition at line 37 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ roll_servo

int8_t SITL::Motor::roll_servo = -1

Definition at line 36 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ servo

uint8_t SITL::Motor::servo

Definition at line 32 of file SIM_Motor.h.

Referenced by calculate_forces().

◆ servo_rate

float SITL::Motor::servo_rate = 0.24

Definition at line 43 of file SIM_Motor.h.

Referenced by SITL::QuadPlane::QuadPlane(), and update_servo().

◆ servo_type

enum { ... } SITL::Motor::servo_type

◆ yaw_factor

float SITL::Motor::yaw_factor

Definition at line 31 of file SIM_Motor.h.

Referenced by calculate_forces().


The documentation for this class was generated from the following files: