Firmware
Public Member Functions | List of all members
StraightLine Class Reference
Inheritance diagram for StraightLine:
ModuleParams ListNode< ModuleParams *>

Public Member Functions

 StraightLine (ModuleParams *parent, const float &deltatime, const matrix::Vector3f &pos)
 
void setLineFromTo (const matrix::Vector3f &origin, const matrix::Vector3f &target)
 
void setSpeed (const float &speed)
 
void setSpeedAtTarget (const float &speed_at_target)
 
void setAcceleration (const float &acc)
 
void setDeceleration (const float &dec)
 
void setAllDefaults ()
 Set all parameters to their default value depending on the direction of the line.
 
float getMaxAcc ()
 Get the maximum possible acceleration depending on the direction of the line Respects horizontal and vertical limits.
 
float getMaxVel ()
 Get the maximum possible velocity depending on the direction of the line Respects horizontal and vertical limits.
 
void generateSetpoints (matrix::Vector3f &position_setpoint, matrix::Vector3f &velocity_setpoint)
 Generate setpoints on a straight line according to parameters. More...
 
- Public Member Functions inherited from ModuleParams
 ModuleParams (ModuleParams *parent)
 
void setParent (ModuleParams *parent)
 Sets the parent module. More...
 
 ModuleParams (const ModuleParams &)=delete
 
ModuleParamsoperator= (const ModuleParams &)=delete
 
 ModuleParams (ModuleParams &&)=delete
 
ModuleParamsoperator= (ModuleParams &&)=delete
 
- Public Member Functions inherited from ListNode< ModuleParams *>
void setSibling (ModuleParams * sibling)
 
const ModuleParamsgetSibling () const
 

Additional Inherited Members

- Protected Member Functions inherited from ModuleParams
virtual void updateParams ()
 Call this method whenever the module gets a parameter change notification. More...
 
virtual void updateParamsImpl ()
 The implementation for this is generated with the macro DEFINE_PARAMETERS()
 
- Protected Attributes inherited from ListNode< ModuleParams *>
ModuleParams_sibling
 

Member Function Documentation

§ generateSetpoints()

void StraightLine::generateSetpoints ( matrix::Vector3f &  position_setpoint,
matrix::Vector3f &  velocity_setpoint 
)

Generate setpoints on a straight line according to parameters.

Parameters
position_setpoint3D vector with the previous position setpoint
velocity_setpoint3D vector with the previous velocity setpoint

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