Flair
Framework Libre Air
|
Class creating references from a joystick. More...
#include <JoyReference.h>
Public Member Functions | |
JoyReference (const gui::LayoutPosition *position, std::string name) | |
Constructor. More... | |
~JoyReference () | |
Destructor. More... | |
void | SetRollAxis (float value) |
Set roll axis value. More... | |
void | SetPitchAxis (float value) |
Set pitch axis value. More... | |
void | SetYawAxis (float value) |
Set yaw axis value. More... | |
void | SetAltitudeAxis (float value) |
Set thrust axis value. More... | |
core::AhrsData * | GetReferenceOrientation (void) const |
Get orientation reference. More... | |
float | ZRef (void) const |
Get z reference. More... | |
float | DzRef (void) const |
Get z derivative reference. More... | |
float | RollTrim (void) const |
Get roll trim. More... | |
float | PitchTrim (void) const |
Get pitch trim. More... | |
void | SetYawRef (float value) |
Set yaw reference. More... | |
void | SetYawRef (core::Quaternion const &value) |
Set yaw reference. More... | |
void | SetZRef (float value) |
Set z reference. More... | |
void | RollTrimUp (void) |
Trim up roll. More... | |
void | RollTrimDown (void) |
Trim down roll. More... | |
void | PitchTrimUp (void) |
Trim up pitch. More... | |
void | PitchTrimDown (void) |
Trim down pitch. More... | |
void | Update (core::Time time) |
Update references. More... | |
Public Member Functions inherited from flair::core::IODevice | |
IODevice (const Object *parent, std::string name) | |
Constructor. More... | |
virtual | ~IODevice () |
Destructor. More... | |
void | AddDeviceToLog (const IODevice *device) |
Add an IODevice to the logs. More... | |
void | AddDataToLog (const io_data *data) |
Add an io_data to the log. More... | |
void | OutputToShMem (bool enabled) |
Send the output to a shared memory. More... | |
virtual DataType const & | GetInputDataType () const |
virtual DataType const & | GetOutputDataType () const |
Public Member Functions inherited from flair::core::Object | |
Object (const Object *parent=NULL, std::string name="", std::string type="") | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
std::string | ObjectName (void) const |
Name. More... | |
std::string | ObjectType (void) const |
Type. More... | |
const Object * | Parent (void) const |
Parent. More... | |
std::vector< const Object * > * | TypeChilds (void) const |
Childs of the same type. More... | |
std::vector< const Object * > * | Childs (void) const |
Childs. More... | |
void | Information (const char *function, int line, const char *format,...) const |
Formatted information. More... | |
void | Warning (const char *function, const char *format,...) const |
Formatted warning. More... | |
void | Error (const char *function, const char *format,...) const |
Formatted error. More... | |
bool | ErrorOccured (bool recursive=true) const |
Has an errror occured? More... | |
Additional Inherited Members | |
Public Types inherited from flair::core::Object | |
enum | color_t { Auto = 0, Red = 31, Green = 32, Orange = 33 } |
Public Attributes inherited from flair::core::IODevice | |
Time | lastUpdate |
Protected Member Functions inherited from flair::core::IODevice | |
void | ProcessUpdate (io_data *data) |
Process the childs of type IODevice, and log if needed. More... | |
Class creating references from a joystick.
flair::filter::JoyReference::JoyReference | ( | const gui::LayoutPosition * | position, |
std::string | name | ||
) |
Constructor.
Construct a JoyReference at given position.
The JoyReference will automatically be child of position->getLayout() Layout. After calling this function, position will be deleted as it is no longer usefull.
JoyReference compute reference in quaternion, wz, altitude and altitude speed.
position | position |
name | name |
flair::filter::JoyReference::~JoyReference | ( | ) |
Destructor.
void flair::filter::JoyReference::SetRollAxis | ( | float | value | ) |
Set roll axis value.
value | value |
void flair::filter::JoyReference::SetPitchAxis | ( | float | value | ) |
Set pitch axis value.
value | value |
void flair::filter::JoyReference::SetYawAxis | ( | float | value | ) |
Set yaw axis value.
value | value |
void flair::filter::JoyReference::SetAltitudeAxis | ( | float | value | ) |
Set thrust axis value.
value | value |
core::AhrsData* flair::filter::JoyReference::GetReferenceOrientation | ( | void | ) | const |
Get orientation reference.
float flair::filter::JoyReference::ZRef | ( | void | ) | const |
Get z reference.
float flair::filter::JoyReference::DzRef | ( | void | ) | const |
Get z derivative reference.
float flair::filter::JoyReference::RollTrim | ( | void | ) | const |
Get roll trim.
float flair::filter::JoyReference::PitchTrim | ( | void | ) | const |
Get pitch trim.
void flair::filter::JoyReference::SetYawRef | ( | float | value | ) |
Set yaw reference.
Yaw part of the output quaternion is obtained by integrating the wz desired angular speed.
This method reset the yaw.
value | value |
void flair::filter::JoyReference::SetYawRef | ( | core::Quaternion const & | value | ) |
Set yaw reference.
Yaw part of the output quaternion is obtained by integrating the wz desired angular speed.
This method reset the yaw.
value | value, only the yaw part of the quaternion is used |
void flair::filter::JoyReference::SetZRef | ( | float | value | ) |
Set z reference.
Altitude of the output is obtained by integrating the vz desired altitude speed.
This method reset z.
value | value |
void flair::filter::JoyReference::RollTrimUp | ( | void | ) |
Trim up roll.
Roll trim value is increased by one
void flair::filter::JoyReference::RollTrimDown | ( | void | ) |
Trim down roll.
Roll trim value is decreased by one
void flair::filter::JoyReference::PitchTrimUp | ( | void | ) |
Trim up pitch.
Pitch trim value is increased by one
void flair::filter::JoyReference::PitchTrimDown | ( | void | ) |
Trim down pitch.
Pitch trim value is decreased by one
void flair::filter::JoyReference::Update | ( | core::Time | time | ) |
Update references.
Calls UpdateFrom with values entered manually.
time | time |