API Documentation
Loading...
Searching...
No Matches
OrientationSensor Class Reference

Used to report the orientation of a Hardware object within 3D space. More...

#include <OrientationSensor.h>

Inheritance diagram for OrientationSensor:
[legend]
Collaboration diagram for OrientationSensor:
[legend]

Signals

void driftRateUpdatedSignal ()
 
void magnetometerCalibrationUpdatedSignal ()
 
void deploymentModeOptionsUpdatedSignal ()
 
void calibrationChangedSignal ()
 
- Signals inherited from Device
void onUpdated ()
 

Public Member Functions

 OrientationSensor (const Model &model, ProgressInfo *log, QObject *parent=nullptr)
 
virtual Time getGyroCalibrationTime () const
 
virtual MagnetometerState magnetometerState () const
 
virtual GyroState gyroState () const
 
virtual Matrix< fltp08lastOrientation () const
 
virtual bool usingAccelerometer () const
 
virtual bool usingCompass () const
 
virtual bool usingGyro () const
 
virtual bool isGyroUpdating () const
 
virtual bool hasLockedYaw () const
 
virtual bool hasLockedRoll () const
 
const Vector< 3, Angle< fltp08 > > & driftRate () const
 
Vector< 3, Angle< fltp08 > > driftValue () const
 
Vector< 3, Angle< fltp08 > > userSpecifiedOffsets () const
 
Vector< 3, Angle< fltp08 > > deviceOffsets () const
 
virtual bool isLocked () const
 
virtual TranslatedString calibrationMessage () const
 
void checkForSetMagneticDeclination ()
 
void setUserSpecifiedOffsets (const Vector< 3, Angle< fltp08 > > &user_specified_offsets)
 
void setDeviceOffsets (Vector< 3, Angle< fltp08 > > device_offsets)
 
virtual bool requestAccelerationBiasLimit (fltp04 bias_limit)
 
virtual bool requestUsingAccelerometer (bool using_accelerometer)
 
virtual Ray< 3, fltp08calibratedMagnetometerVector () const
 
virtual Ray< 3, fltp08rawMagnetometerVector () const
 
virtual Angle< fltp08compassAngle () const
 
virtual bool requestUsingCompass (bool using_compass)
 
virtual bool requestUsingGyro (bool using_gyro, bool reset_state)
 
virtual bool requestGyroCalibration ()
 
virtual void lockRoll (bool lock_roll, Angle< fltp08 > roll=Constant< Angle< fltp08 > >::NaN, Angle< fltp08 > yaw=Constant< Angle< fltp08 > >::NaN)
 
virtual void lockYaw (bool lock_yaw, Angle< fltp08 > lock_heading=Constant< Angle< fltp08 > >::NaN)
 
virtual bool supportsFixed () const
 
virtual bool supportsModes () const
 
virtual bool supportsRodded () const
 
virtual void setDriftRate (const Vector< 3, Angle< fltp08 > > &drift_rate)
 
virtual void setCalibrator (IMUCalibrator *imu_calibrator)
 
virtual MagneticCalibrationDatamagnetometerCalibrationObject ()
 
virtual bool requestMagnetometerCalibration (bool)
 
virtual bool requestApplyMagnetometerCalibration ()
 
virtual bool needsMagnetometerCalibration () const
 
virtual bool hasCalibratedDrift () const
 
Vector< 3, Angle< fltp08 > > gravityAccelerationToAngle (const Vector< 3, fltp08 > &acceleration_vector)
 
Vector< 3, Angle< fltp08 > > quaternionToAngle (const Vector< 4, fltp08 > &quaternion) const
 
void setFromGravityAcceleration (const Vector< 3, fltp08 > &acceleration_vector)
 
virtual void setFromQuaternion (const Vector< 4, fltp08 > &quaternion)
 
void setCalibrationOffset (const Matrix< fltp08 > &offset)
 
void createCalibrationOffset (const Matrix< fltp08 > &map_from, const Matrix< fltp08 > &map_to)
 
void setFromAngles (const Vector< 3, Angle< fltp08 > > &angles)
 
fltp04 calibrationPercent () const
 
virtual void clearCurrentDrift ()
 
IMUCalibratorcalibrator () const
 
virtual Ray< 3, fltp08referenceDirection () const
 
virtual UUID calibrationID () const
 
- Public Member Functions inherited from Device
 Device (const Model &model, ProgressInfo *log, QObject *parent=nullptr)
 
virtual void setLog (ProgressInfo *log)
 
virtual void update (DesignObjectLookup *lookup, Time time) override
 
virtual void update ()
 
virtual TimeSpan updateInterval () const
 
virtual void endUpdates ()
 
ProgressInfodeviceLog () const
 
void setWarningCallback (const std::function< void(const Exception &warning, ProgressInfo *log)> &warning_callback)
 
void startAutoUpdate (DesignObjectLookup *lookup=nullptr)
 
void stopAutoUpdate (DesignObjectLookup *lookup=nullptr)
 
- Public Member Functions inherited from Model
 Model ()
 
 Model (DesignObjectBase *base)
 
 Model (uint04 index, DesignObjectBase *base)
 
 Model (const DesignObject &obj)
 
bool isSelected () const
 
bool isApplicationOwned () const
 
bool isVisible () const
 
bool isTreeVisible () const
 
bool hasFocus () const
 
bool exportIgnored () const
 
TranslatedString displayName () const
 
TranslatedString displayNamePath (const String &seperator=":") const
 
template<class t_type >
void setModelProperty (ModelProperty property, const t_type &value)
 
template<class t_type >
void updateModelProperty (ModelProperty property, const t_type &type, const void *lock_ptr=nullptr)
 
template<class t_type >
t_type getModelProperty (ModelProperty property) const
 
bool isModelProperty (ModelProperty property, const String &value) const
 
bool isModelProperty (ModelProperty property, const char *value) const
 
bool doesModelPropertyContain (ModelProperty property, const String &value, bool ignore_case) const
 
bool doesModelPropertyContain (ModelProperty property, const char *value, bool ignore_case) const
 
void restoreModel ()
 
void eraseModel ()
 
void deleteModel (bool delete_children, bool remove_from_parent=true)
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > explodeModel ()
 
bool canExplode () const
 
bool isOfType (const String &type) const
 
bool isOfType (const char *type) const
 
Model createChild ()
 
Model createChild (uint04 child_slot)
 
void createChildren (uint04 child_size)
 
Model createSceneModel () const
 
Model createSceneLayer () const
 
Model getSceneModel (UUID id) const
 
Model getSceneLayer (UUID id) const
 
void addChild (Model &child)
 
void addChild (uint04 child_index)
 
void swapChildren (uint04 a, uint04 b)
 
void setParentMatrixFlags (BitFlag flags)
 
void setParentMatrixFlag (ParentMatrixFlags flag, bool value)
 
BitFlag parentMatrixFlags () const
 
Model getParent () const
 
uint04 getParentIndex () const
 
RGBColor customModelColor (ModelColorMode mode) const
 
void updateTransform (const Matrix< fltp08 > &transform, const void *lock=nullptr)
 
void setTransform (const Matrix< fltp08 > &transform)
 
String getModelIcon () const
 
Effect createChildEffect ()
 
Geometry createChildGeometry ()
 
void setGeometryChild (uint04 geo_index)
 
void setGeometryChild (const Geometry &geo)
 
void updateVisible (bool is_visible)
 
void updateVisibleRecursive (bool is_visible)
 
Buffer< GeometryTypedescendentGeometryTypes () const
 
bool hasGeometryDescendent () const
 
bool hasMeshDescendent () const
 
bool hasLinearDescendent () const
 
bool hasPointsDescendent () const
 
void hasDescendents (bool &has_point, bool &has_line, bool &has_mesh) const
 
MaterialMode getMaterialMode (PrimitiveProperty property) const
 
void setMaterialMode (MaterialMode vertex, MaterialMode outline, MaterialMode solid)
 
void setMaterialMode (PrimitiveProperty property, MaterialMode option)
 
Material createChildMaterial (bool copy_child=false)
 
Material createChildMaterial (PrimitiveProperty property, bool copy_child=false)
 
void clearMaterialDescendents ()
 
void overrideMaterialDescendents (PrimitiveProperty property, MaterialMode override_desc)
 
void overrideMaterialDescendents (MaterialMode vertex, MaterialMode outline, MaterialMode solid)
 
void setMaterial (PrimitiveProperty property, uint04 material_index)
 
void setMaterial (uint04 material_index)
 
void setMaterial (PrimitiveProperty property, const Material &material)
 
void setMaterial (const Material &material)
 
void colorByChannel (Material &mat, const String &channel, fltp08 avg=Constant< fltp08 >::NaN) const
 
void checkBounds ()
 
Effect createSceneEffect () const
 
void setIsLayer (bool is_layer)
 
bool isLayer () const
 
bool hasLayer () const
 
bool hasDirectLayer () const
 
Model getLayer () const
 
uint04 getDirectLayerIndex () const
 
Vertex< 3, fltp08globalCenterOfRotation () const
 
bool isLocked () const
 
bool canInteract () const
 
bool hasSelectedDescendent () const
 
void updateModifiedTime (Time time=Time::SystemTime())
 
void updateAscTime (const Time &time, bool include_self)
 
void updateDescTime (const Time &time, bool include_self)
 
void setLayer (Model layer)
 
void clearLayer ()
 
uint04 getChildIndex () const
 
uint04 getChildLayerIndex () const
 
void setChildIndex (uint04 child, uint04 id)
 
Model getChild (uint04 child) const
 
uint04 getChildIndex (uint04 child) const
 
bool hasChild (uint04 child_index) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getChildren () const
 
Buffer< UUIDgetChildrenIDs () const
 
Buffer< uint04getChildIndices () const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getChildrenByType (const String &type) const
 
template<class t_type >
Buffer< t_type > getTypeChildren (const String &type) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getChildrenByType (const Buffer< String > &type) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getChildrenByName (const String &name) const
 
template<class t_type >
Buffer< t_type > getTypeDescendents (const String &type) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getDescendentsByType (const String &type, uint04 max_count=Constant< uint04 >::Max) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getDescendentsByName (const String &name, uint04 max_count=Constant< uint04 >::Max) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getDescendentsByNameAndType (const String &name, const String &type, uint04 max_count=Constant< uint04 >::Max) const
 
uint04 childCount () const
 
uint04 getNumOfEffects () const
 
bool hasEffect (uint04 index=0) const
 
Effect getSceneEffect (UUID id) const
 
Geometry getGeometry () const
 
Geometry getSceneGeometry (uint04 index) const
 
Geometry getSceneGeometry (UUID id) const
 
Buffer< Geometry, uint04, ObjectAllocator< DESIGN_PRIM > > getSceneGeometries () const
 
Buffer< std::pair< Model, Geometry >, uint04, ObjectAllocator< DESIGN_PRIM > > getClippingGeometry () const
 
Buffer< Geometry, uint04, ObjectAllocator< DESIGN_PRIM > > getGeometryDescendents (bool remove_redundant=true, uint04 max_count=Constant< uint04 >::Max) const
 
void removeGeometry ()
 
bool hasMaterial () const
 
bool hasMaterial (PrimitiveProperty property) const
 
Material getMaterial (PrimitiveProperty property) const
 
Material getSceneMaterial (uint04 index) const
 
Material getRootMaterial (PrimitiveProperty property) const
 
Material getSceneMaterial (UUID id) const
 
bool hasLayerRootMaterial (PrimitiveProperty property) const
 
Buffer< Material, uint04, ObjectAllocator< DESIGN_PRIM > > getMaterialChildren () const
 
Buffer< Material, uint04, ObjectAllocator< DESIGN_PRIM > > getMaterialDescendents (bool local_only=false) const
 
Buffer< Material, uint04, ObjectAllocator< DESIGN_PRIM > > getMaterialDescendents (PrimitiveProperty property) const
 
Buffer< Material, uint04, ObjectAllocator< DESIGN_PRIM > > getMaterialDescendentsByName (const String &name, uint04 max_count=Constant< uint04 >::Max) const
 
Buffer< Material, uint04, ObjectAllocator< DESIGN_PRIM > > getSceneMaterials () const
 
void removeMaterial (const Material &material)
 
void removeMaterial (PrimitiveProperty property)
 
Buffer< Effect, uint04, ObjectAllocator< false > > getEffectChildren () const
 
Buffer< Effect, uint04, ObjectAllocator< false > > getEffectDescendents () const
 
Buffer< Effect, uint04, ObjectAllocator< false > > getSceneEffects () const
 
Effect getEffect (uint04 index=0) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getSceneModels (bool include_deleted=false, bool local_only=false) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getSceneModelsByType (const String &type, uint04 max_count=Constant< uint04 >::Max, bool include_deleted=false) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getSceneModelsByName (const String &name, uint04 max_count=Constant< uint04 >::Max, bool include_deleted=false) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getSceneLayers (bool include_deleted=false) const
 
Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > getDescendents (bool include_deleted=false, bool local_only=false) const
 
void clearChildren ()
 
void removeChild (const Model &model)
 
uint04 visibleVertexCount () const
 
uint04 vertexCount () const
 
Model getFamilyMember (uint04 index) const
 
Model findDescendentByName (const String &name) const
 
Model findDescendentByType (const String &type) const
 
bool hasDescendent (const Model &model) const
 
bool hasDescendent (const UUID &id) const
 
void setWindingMode (WindingMode mode)
 
Matrix< fltp08getCompleteTransform () const
 
Matrix< fltp08getParentTransform () const
 
Bounds< 3, fltp08getBounds () const
 
Bounds< 3, fltp08globalBounds () const
 
Bounds< 3, fltp08globalSelectionBounds () const
 
Bounds< 3, fltp08getBoundsOfVisible () const
 
Bounds< 3, fltp08getSelectionBounds () const
 
Vector< 3, fltp08size () const
 
void setSize (const Vector< 3, fltp08 > &size)
 
Matrix< fltp08applyTransformToParent (const Matrix< fltp08 > &parent_mat) const
 
Time getDescModifiedTime (bool include_self) const
 
Time getAscModifiedTime (bool include_self, bool include_layer=true) const
 
Vertex< 3, fltp08centerAlignModel ()
 
void calculateIndexNeighborList ()
 
void updateFrom (const Model &model, bool check_resources)
 
Dictionary< UUID, DesignObjectcopyFrom (const Model &model, bool deep_copy, bool copy_ids=false, bool recursive=true)
 
Dictionary< UUID, DesignObjectcopyMaterialProperties (const Model &model)
 
void calculateSmoothTextures (Vector< 3, fltp08 > origin, fltp08 scale)
 
void setNormalMode (NormalMode mode, Angle< fltp08 > smoothing_angle, ProgressInfo *log)
 
void setOrientation (const Vector< 3, Angle< sint04 > > &new_orientation, const void *lock=nullptr)
 
void setOrientation (const Vector< 3, Angle< fltp08 > > &new_orientation, const void *lock=nullptr)
 
void calculateNormals (NormalMode mode, Angle< fltp08 > smoothing_angle)
 
void removeDuplicateVertices (fltp08 epsilon, void *lock, ProgressInfo *log=nullptr)
 
bool isDeleted () const
 
bool hasHoles (PrimitiveProperty property) const
 
void calculateTangentSpace (bool calc_tan, bool calc_bitan)
 
void addPerVertexColorFromMaterialConstant (UVType constant_index)
 
bool isScene () const
 
void validate (bool validate_children=true) const
 
void invalidateBounds ()
 
void invalidateVisibleBounds ()
 
void invalidateGlobalBoundsAsc ()
 
void invalidateGlobalBoundsDesc ()
 
void invalidateTransformCache ()
 
fltp08 calculateVolume (const Matrix< fltp08 > &transform=Constant< Matrix< fltp08 > >::NaN) const
 
fltp08 calculateSurfaceArea (const Matrix< fltp08 > &transform=Constant< Matrix< fltp08 > >::NaN) const
 
Vector< 2, fltp08calculateVolumeAndSurfaceArea (const Matrix< fltp08 > &transform=Constant< Matrix< fltp08 > >::NaN, const void *lock=nullptr) const
 
fltp08 calculateLength (const Matrix< fltp08 > &transform=Constant< Matrix< fltp08 > >::NaN) const
 
Vector< 3, fltp08calculateAverageDirection (const Matrix< fltp08 > &parent_transform=Constant< Matrix< fltp08 > >::NaN) const
 
Vector< 2, fltp08calculateHVLength (const Matrix< fltp08 > &parent_transform=Constant< Matrix< fltp08 > >::NaN) const
 
uint04 getGeometryIndex () const
 
uint04 getMaterialIndex (PrimitiveProperty property) const
 
uint04 getEffectIndex (uint04 child_index=0) const
 
Vector< 32, bool > inheritedFlags () const
 
void updateInheritedFlagsCache (bool force_update_all=false, bool update_personal_flags=false)
 
Vector< 32, bool > inheritedPersonalFlagsNoCache () const
 
Vector< 32, bool > personalInheritedFlags () const
 
Vector< 32, bool > inheritedFlagsNoCache (bool complete_cache_ignore) const
 
Model getRootMaterialModel (PrimitiveProperty property)
 
BitFlag descendedFlags () const
 
void updateDescendedFlagsCache (bool force_update_all=false)
 
BitFlag descendedPersonalFlagsNoCache () const
 
BitFlag personalDescendedFlags () const
 
BitFlag descendedFlagsNoCache (bool complete_cache_ignore) const
 
 operator bool () const
 
Geometry createSceneGeometry () const
 
Material createSceneMaterial () const
 
- Public Member Functions inherited from DesignObject
 DesignObject ()=default
 
 DesignObject (DesignObjectBase *base)
 
 DesignObject (uint04 index, DesignObjectBase *base)
 
void setDesignType (DesignObjectType mode, bool is_type)
 
bool isDesignType (DesignObjectType mode) const
 
bool isDesignType (uint04 mode) const
 
bool validateDesignObject () const
 
JSONNode activeFilters () const
 
void setActiveFilters (const JSONNode &node)
 
template<class t_type >
void setProperty (DesignProperty property, const t_type &value)
 
template<>
void setProperty (DesignProperty property, const UUID &value)
 
template<>
void setProperty (DesignProperty property, const String &value)
 
File file () const
 
template<class t_type >
void updateProperty (DesignProperty property, const t_type &value, const void *lock=nullptr)
 
template<class t_type >
t_type getProperty (DesignProperty property) const
 
template<class t_type >
bool hasProperty (DesignProperty property) const
 
bool isProperty (DesignProperty property, const String &value) const
 
bool isProperty (DesignProperty property, const char *value) const
 
bool doesPropertyBeginWith (DesignProperty property, const String &value, bool ignore_case) const
 
bool doesPropertyBeginWith (DesignProperty property, const char *value, bool ignore_case) const
 
bool doesPropertyContain (DesignProperty property, const String &value, bool ignore_case) const
 
bool doesPropertyContain (DesignProperty property, const char *value, bool ignore_case) const
 
template<class t_type >
t_type getInheritedProperty (DesignProperty property) const
 
String getIcon () const
 
uint04 getDesignParentIndex () const
 
Time getModifiedTime () const
 
void updateDesignModifiedTime (Time time=Time::SystemTime())
 
void updateCreatedTime ()
 
void copyFrom (const DesignObject &object)
 
void actionDeletedIndex (uint04 index, uint04 size)
 
void addIndex (uint04 index, uint04 size)
 
void scale (Vector< 3, fltp08 > scale, Vertex< 3, fltp08 > center_of_scale=Constant< Vertex< 3, fltp08 > >::NaN)
 
void offset (const Vector< 3, fltp08 > &offset)
 
bool hasMetaData (const String &index) const
 
const JSONNodemetaData (const String &index) const
 
const JSONNodemetaData () const
 
void setMetaData (const JSONNode &node)
 
void setMetaData (const String &index, const JSONNode &node)
 
void setMetaData (const String &index, const String &data)
 
void setMetaData (const String &index, const bool &data)
 
void setMetaData (const String &index, const fltp08 &data)
 
void setMetaData (const String &index, const uint04 &data)
 
void clearMetaData (const String &index)
 
void updateMetaData (const String &index, const String &data, const void *lock_ptr=nullptr)
 
void updateMetaData (const String &index, const fltp08 &data, const void *lock_ptr=nullptr)
 
void updateMetaData (const String &index, const bool &data, const void *lock_ptr=nullptr)
 
void removeMetaData (const String &index, const void *lock_ptr=nullptr)
 
void appendData (const String &data, bool compressed)
 
uint04 index () const
 
uint04 designIndex () const
 
const DynamicPointer< Table > & propertyTable () const
 
DynamicPointer< Table > & propertyTable ()
 
bool operator== (const DesignObject &model) const
 
bool operator!= (const DesignObject &model) const
 
bool operator< (const DesignObject &model) const
 
bool operator> (const DesignObject &model) const
 
 operator bool () const
 
DesignObjectBasebase () const
 
UUID uuid () const
 
void updateDesignTransform (const Matrix< fltp08 > &transform, const void *lock=nullptr)
 
void setDesignVisible (bool is_visible)
 
void updateDesignVisible (bool is_visible, const void *lock=nullptr)
 
Matrix< fltp08getTransform () const
 
bool isValid () const
 
Scene getScene () const
 
- Public Member Functions inherited from DesignObjectUpdateTarget

Static Public Member Functions

static Matrix< fltp08, 3, 3 > calculateDeviation (TimeSpan time, const Vector< 4, fltp08 > &start, const Vector< 4, fltp08 > &end)
 
static Angle< fltp08calculateNorthFacing (const Matrix< fltp08, 3, 3 > &offset_mat)
 
static Matrix< fltp08, 3, 3 > offsetCalibration (TimeSpan time_since_calibration, const Matrix< fltp08, 3, 3 > &current_orientation, const Matrix< fltp08, 3, 3 > &dev_matrix)
 
- Static Public Member Functions inherited from Device
static void SetDefaultDeviceLookup (DesignObjectLookup *lookup)
 
- Static Public Member Functions inherited from Model
static Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > ReduceToRoots (const Buffer< Model, uint04, ObjectAllocator< DESIGN_PRIM > > &children, const std::function< bool(const Model &, const Set< Model > &)> &filter)
 
- Static Public Member Functions inherited from DesignObject
static constexpr const char * FilePathDesignNameVariable ()
 

Protected Member Functions

virtual Vector< 3, Angle< fltp08 > > lastOrientationAngle () const
 
- Protected Member Functions inherited from Device
virtual void showWarning (const TranslatedString &warning) const
 
virtual void showWarning (const Exception &warning) const
 
- Protected Member Functions inherited from Model
Model getRootMaterialModel (PrimitiveProperty property, const Model &value_to_return, bool allow_layer) const
 
Vertex< 3, fltp08_center ()
 
Bounds< 3, fltp08_bounds (bool use_selection_bounds, bool get_global) const
 
void setChildEffectSize (uint04 child_size)
 
void setChildSize (uint04 child_size)
 
void setGeometryIndex (uint04 geo_index)
 
void setMaterialIndex (PrimitiveProperty property, uint04 material_index)
 
void setMaterialIndex (uint04 material_index)
 
void setEffectIndex (uint04 material_index, uint04 sub_index=0)
 
void setPersonalInheritedFlags (const Vector< 32, bool > &flags)
 
void setPersonalInheritedFlag (InheritedFlags flag, bool value)
 
void _copyFrom (const Model &model, bool deep_copy, bool copy_ids, bool recursive_copy, Dictionary< UUID, DesignObject > &copy_to_index, bool is_root_copy)
 
uint04 childToParentReference () const
 
uint04 parentToChildReference () const
 
DesignObjectBasechildBase () const
 
DesignObjectBaseparentBase () const
 
- Protected Member Functions inherited from DesignObject
void onNameChange (const String &new_name)
 

Protected Attributes

Ray< 3, fltp08m_calibrated_magnetomer_vector = Constant<Ray<3, fltp08>>::NaN
 
Ray< 3, fltp08m_raw_magnetometer_vector = Constant<Ray<3, fltp08>>::NaN
 
Vector< 3, Angle< fltp08 > > m_tilt_angle
 
Vector< 3, Angle< fltp08 > > m_device_specified_offsets
 
Vector< 3, Angle< fltp08 > > m_user_specified_offsets
 
Matrix< fltp08m_calibration_offset
 
Vector< 3, Angle< fltp08 > > m_angle_drift_rate
 
Time m_angle_drift_start_time
 
Time m_calibration_time
 
fltp04 m_calibration_percent
 
Angle< fltp08m_roll_lock
 
Angle< fltp08m_yaw_lock
 
Angle< fltp08m_roll_lock_reference_yaw
 
IMUCalibratorm_imu_calibrator = nullptr
 
UUID m_calibration_id
 
GyroState m_gyro_state
 
MagnetometerState m_magnetometer_state
 
AccelerometerState m_acceleromter_state
 
bool m_using_gyro = false
 
bool m_using_compass = false
 
bool m_using_accelerometer = false
 
bool m_is_gyro_updating = false
 
bool m_is_locked = false
 
bool m_has_calibrated_drift = false
 
bool m_gyro_calibration_requested = false
 
- Protected Attributes inherited from Device
ProgressInfom_log
 
std::function< void(const Exception &warning, ProgressInfo *log)> m_warning_callback
 
- Protected Attributes inherited from DesignObject
UUID m_uuid = Constant<UUID>::NaN
 
uint04 m_index = Constant<uint04>::NaN
 
uint04 m_design_index = Constant<uint04>::NaN
 
DesignObjectBasem_base = nullptr
 

Additional Inherited Members

- Public Types inherited from Model
enum class  MaterialMode { e_by_parent , e_by_layer , e_custom , e_hidden }
 
enum  ParentMatrixFlags : uint01 {
  e_ignore_offset = 0 , e_ignore_scale = 1 , e_ignore_rotation = 2 , e_ignore_scale_distortion = 3 ,
  e_use_only_for_offset = 4 , e_orient_to_camera = 5 , e_follow_camera = 6 , e_scale_to_camera = 7
}
 
enum  InheritedFlags : uint01 {
  e_inherited_is_visible = 0 , e_inherited_has_no_focus = 1 , e_inherited_is_tree_visible = 2 , e_inherited_not_selected = 3 ,
  e_inherited_is_manager_visible = 4 , e_inherited_can_delete = 5 , e_inherited_does_not_follow_camera = 6 , e_inherited_does_not_orient_to_camera = 7 ,
  e_inherited_does_not_scale_to_camera = 8 , e_inherited_not_deleted = 9 , e_inherited_not_application_owned = 10 , e_inherited_exportable = 11
}
 
enum  DescendedFlags { e_descendent_selected = 0 , e_descendent_focussed = 1 , e_descendent_deletion_blocked = 2 }
 
enum  ModelProperty {
  e_type , e_fixed_bounding_box , e_visible_box , e_calculation_ignored ,
  e_can_select_children , e_complete_transform , e_material_mode_solid , e_material_mode_outline ,
  e_material_mode_vertices , e_parent_matrix_flags , e_global_bounds , e_global_selection_bounds ,
  e_model_color , e_inherited_flags , e_personal_inherited_flags , e_export_ignored ,
  e_descended_flags , e_personal_descended_flags , e_application_constructed , e_application_constructed_parent_base ,
  e_model_property_size
}
 
enum class  ModelColorMode { e_direct , e_by_selectable_children , e_by_material_root , e_by_layer }
 
- Public Types inherited from DesignObject
enum  DesignObjectType {
  e_model = 0x00000001 , e_geometry = 0x00000002 , e_material = 0x00000004 , e_bone = 0x00000008 ,
  e_effect = 0x00000010 , e_layer = 0x00000020 , e_scene = 0x00000040 , e_camera = 0x00000080 ,
  e_selection = 0x00000100
}
 
enum  DesignProperty {
  e_guid , e_design_types , e_transform , e_bounding_box ,
  e_selection_box , e_name , e_description , e_editable_description ,
  e_creation_time , e_modified_time , e_asc_modified_time , e_desc_modified_time ,
  e_bounds_modified_time , e_author , e_creation_software , e_3D_visible ,
  e_tree_visible , e_icon , e_is_selected , e_is_focused ,
  e_allow_interactions , e_file , e_search_terms , e_category ,
  e_deletion_allowed , e_is_deleted , e_is_application_locked , e_is_application_owned ,
  e_bounds_ignored , e_selection_ignored , e_meta_data , e_untranslated_string_data ,
  e_translated_string_data , e_uncompressed_data , e_compressed_data , e_manager_visible ,
  e_library_id , e_is_frozen , e_applied_filters , e_design_property_size
}
 
- Static Protected Attributes inherited from Device
static DesignObjectLookups_default_lookup = nullptr
 

Detailed Description

Used to report the orientation of a Hardware object within 3D space.


Class: OrientationSensor

\ingroup Hardware Magnetometer Orientation Gyro Accelerometer

Constructor & Destructor Documentation

◆ OrientationSensor()

OrientationSensor ( const Model & model,
ProgressInfo * log,
QObject * parent = nullptr )

Member Function Documentation

◆ calculateDeviation()

static Matrix< fltp08, 3, 3 > calculateDeviation ( TimeSpan time,
const Vector< 4, fltp08 > & start,
const Vector< 4, fltp08 > & end )
staticnodiscard

◆ calculateNorthFacing()

Angle< fltp08 > calculateNorthFacing ( const Matrix< fltp08, 3, 3 > & offset_mat)
staticnodiscard

◆ calibratedMagnetometerVector()

virtual Ray< 3, fltp08 > calibratedMagnetometerVector ( ) const
inlinevirtual

◆ calibrationChangedSignal

void calibrationChangedSignal ( )
signal

◆ calibrationID()

virtual UUID calibrationID ( ) const
inlinenodiscardvirtual

◆ calibrationMessage()

TranslatedString calibrationMessage ( ) const
nodiscardvirtual

◆ calibrationPercent()

fltp04 calibrationPercent ( ) const

◆ calibrator()

IMUCalibrator * calibrator ( ) const
inline

◆ checkForSetMagneticDeclination()

void checkForSetMagneticDeclination ( )

◆ clearCurrentDrift()

void clearCurrentDrift ( )
virtual

◆ compassAngle()

virtual Angle< fltp08 > compassAngle ( ) const
inlinevirtual

◆ createCalibrationOffset()

void createCalibrationOffset ( const Matrix< fltp08 > & map_from,
const Matrix< fltp08 > & map_to )

◆ deploymentModeOptionsUpdatedSignal

void deploymentModeOptionsUpdatedSignal ( )
signal

◆ deviceOffsets()

Vector< 3, Angle< fltp08 > > deviceOffsets ( ) const
inlinenodiscard

◆ driftRate()

const Vector< 3, Angle< fltp08 > > & driftRate ( ) const
inlinenodiscard

◆ driftRateUpdatedSignal

void driftRateUpdatedSignal ( )
signal

◆ driftValue()

Vector< 3, Angle< fltp08 > > driftValue ( ) const
nodiscard

◆ getGyroCalibrationTime()

Time getGyroCalibrationTime ( ) const
nodiscardvirtual

◆ gravityAccelerationToAngle()

Vector< 3, Angle< fltp08 > > gravityAccelerationToAngle ( const Vector< 3, fltp08 > & acceleration_vector)

◆ gyroState()

GyroState gyroState ( ) const
nodiscardvirtual

◆ hasCalibratedDrift()

virtual bool hasCalibratedDrift ( ) const
inlinevirtual

◆ hasLockedRoll()

bool hasLockedRoll ( ) const
nodiscardvirtual

◆ hasLockedYaw()

bool hasLockedYaw ( ) const
nodiscardvirtual

◆ isGyroUpdating()

virtual bool isGyroUpdating ( ) const
inlinenodiscardvirtual

◆ isLocked()

virtual bool isLocked ( ) const
inlinenodiscardvirtual

◆ lastOrientation()

Matrix< fltp08 > lastOrientation ( ) const
nodiscardvirtual

◆ lastOrientationAngle()

Vector< 3, Angle< fltp08 > > lastOrientationAngle ( ) const
nodiscardprotectedvirtual

◆ lockRoll()

void lockRoll ( bool lock_roll,
Angle< fltp08 > roll = Constant<Angle<fltp08>>::NaN,
Angle< fltp08 > yaw = Constant<Angle<fltp08>>::NaN )
virtual

◆ lockYaw()

void lockYaw ( bool lock_yaw,
Angle< fltp08 > lock_heading = Constant<Angle<fltp08>>::NaN )
virtual

◆ magnetometerCalibrationObject()

virtual MagneticCalibrationData * magnetometerCalibrationObject ( )
inlinevirtual

◆ magnetometerCalibrationUpdatedSignal

void magnetometerCalibrationUpdatedSignal ( )
signal

◆ magnetometerState()

virtual MagnetometerState magnetometerState ( ) const
inlinenodiscardvirtual

◆ needsMagnetometerCalibration()

virtual bool needsMagnetometerCalibration ( ) const
inlinevirtual

◆ offsetCalibration()

Matrix< fltp08, 3, 3 > offsetCalibration ( TimeSpan time_since_calibration,
const Matrix< fltp08, 3, 3 > & current_orientation,
const Matrix< fltp08, 3, 3 > & dev_matrix )
staticnodiscard

◆ quaternionToAngle()

Vector< 3, Angle< fltp08 > > quaternionToAngle ( const Vector< 4, fltp08 > & quaternion) const

◆ rawMagnetometerVector()

virtual Ray< 3, fltp08 > rawMagnetometerVector ( ) const
inlinevirtual

◆ referenceDirection()

virtual Ray< 3, fltp08 > referenceDirection ( ) const
inlinenodiscardvirtual

◆ requestAccelerationBiasLimit()

virtual bool requestAccelerationBiasLimit ( fltp04 bias_limit)
inlinevirtual

◆ requestApplyMagnetometerCalibration()

virtual bool requestApplyMagnetometerCalibration ( )
inlinevirtual

◆ requestGyroCalibration()

virtual bool requestGyroCalibration ( )
inlinevirtual

Reimplemented in MadgwikOrientationSensor.

◆ requestMagnetometerCalibration()

virtual bool requestMagnetometerCalibration ( bool )
inlinevirtual

◆ requestUsingAccelerometer()

bool requestUsingAccelerometer ( bool using_accelerometer)
virtual

◆ requestUsingCompass()

bool requestUsingCompass ( bool using_compass)
virtual

◆ requestUsingGyro()

bool requestUsingGyro ( bool using_gyro,
bool reset_state )
virtual

◆ setCalibrationOffset()

void setCalibrationOffset ( const Matrix< fltp08 > & offset)

◆ setCalibrator()

void setCalibrator ( IMUCalibrator * imu_calibrator)
virtual

◆ setDeviceOffsets()

void setDeviceOffsets ( Vector< 3, Angle< fltp08 > > device_offsets)
inline

◆ setDriftRate()

void setDriftRate ( const Vector< 3, Angle< fltp08 > > & drift_rate)
virtual

◆ setFromAngles()

void setFromAngles ( const Vector< 3, Angle< fltp08 > > & angles)

◆ setFromGravityAcceleration()

void setFromGravityAcceleration ( const Vector< 3, fltp08 > & acceleration_vector)

◆ setFromQuaternion()

void setFromQuaternion ( const Vector< 4, fltp08 > & quaternion)
virtual

◆ setUserSpecifiedOffsets()

void setUserSpecifiedOffsets ( const Vector< 3, Angle< fltp08 > > & user_specified_offsets)
inline

◆ supportsFixed()

virtual bool supportsFixed ( ) const
inlinevirtual

Reimplemented in MadgwikOrientationSensor.

◆ supportsModes()

virtual bool supportsModes ( ) const
inlinevirtual

◆ supportsRodded()

virtual bool supportsRodded ( ) const
inlinevirtual

Reimplemented in MadgwikOrientationSensor.

◆ userSpecifiedOffsets()

Vector< 3, Angle< fltp08 > > userSpecifiedOffsets ( ) const
inlinenodiscard

◆ usingAccelerometer()

virtual bool usingAccelerometer ( ) const
inlinenodiscardvirtual

◆ usingCompass()

virtual bool usingCompass ( ) const
inlinenodiscardvirtual

◆ usingGyro()

virtual bool usingGyro ( ) const
inlinenodiscardvirtual

Member Data Documentation

◆ m_acceleromter_state

AccelerometerState m_acceleromter_state
protected

◆ m_angle_drift_rate

Vector<3, Angle<fltp08> > m_angle_drift_rate
protected

◆ m_angle_drift_start_time

Time m_angle_drift_start_time
protected

◆ m_calibrated_magnetomer_vector

Ray<3, fltp08> m_calibrated_magnetomer_vector = Constant<Ray<3, fltp08>>::NaN
protected

◆ m_calibration_id

UUID m_calibration_id
protected

◆ m_calibration_offset

Matrix<fltp08> m_calibration_offset
protected

◆ m_calibration_percent

fltp04 m_calibration_percent
protected

◆ m_calibration_time

Time m_calibration_time
protected

◆ m_device_specified_offsets

Vector<3, Angle<fltp08> > m_device_specified_offsets
protected

◆ m_gyro_calibration_requested

bool m_gyro_calibration_requested = false
protected

◆ m_gyro_state

GyroState m_gyro_state
protected

◆ m_has_calibrated_drift

bool m_has_calibrated_drift = false
protected

◆ m_imu_calibrator

IMUCalibrator* m_imu_calibrator = nullptr
protected

◆ m_is_gyro_updating

bool m_is_gyro_updating = false
protected

◆ m_is_locked

bool m_is_locked = false
protected

◆ m_magnetometer_state

MagnetometerState m_magnetometer_state
protected

◆ m_raw_magnetometer_vector

Ray<3, fltp08> m_raw_magnetometer_vector = Constant<Ray<3, fltp08>>::NaN
protected

◆ m_roll_lock

Angle<fltp08> m_roll_lock
protected

◆ m_roll_lock_reference_yaw

Angle<fltp08> m_roll_lock_reference_yaw
protected

◆ m_tilt_angle

Vector<3, Angle<fltp08> > m_tilt_angle
protected

◆ m_user_specified_offsets

Vector<3, Angle<fltp08> > m_user_specified_offsets
protected

◆ m_using_accelerometer

bool m_using_accelerometer = false
protected

◆ m_using_compass

bool m_using_compass = false
protected

◆ m_using_gyro

bool m_using_gyro = false
protected

◆ m_yaw_lock

Angle<fltp08> m_yaw_lock
protected

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