RflySimSDK v3.08
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_IMU_Magnetometer类 参考

Normalizes the three directions for a magnetometer into a unit vector. 更多...

#include <vrpn_Tracker_IMU.h>

+ 类 vrpn_IMU_Magnetometer 继承关系图:
+ vrpn_IMU_Magnetometer 的协作图:

Public 成员函数

VRPN_API vrpn_IMU_Magnetometer (std::string const &name, vrpn_Connection *output_con, vrpn_IMU_Axis_Params params, float update_rate, bool report_changes=VRPN_FALSE)
 Constructor
 
virtual VRPN_API void mainloop ()
 Override base class function.
 
- Public 成员函数 继承自 vrpn_Analog_Server
 vrpn_Analog_Server (const char *name, vrpn_Connection *c, vrpn_int32 numChannels=vrpn_CHANNEL_MAX)
 
virtual void report_changes (vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
 Makes public the protected base class function
 
virtual void report (vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
 Makes public the protected base class function
 
vrpn_float64 * channels (void)
 Exposes an array of values for the user to write into.
 
vrpn_int32 setNumChannels (vrpn_int32 sizeRequested)
 
- Public 成员函数 继承自 vrpn_Analog
 vrpn_Analog (const char *name, vrpn_Connection *c=NULL)
 
void print (void)
 
vrpn_int32 getNumChannels (void) const
 
- Public 成员函数 继承自 vrpn_BaseClass
 vrpn_BaseClass (const char *name, vrpn_Connection *c=NULL)
 
- Public 成员函数 继承自 vrpn_BaseClassUnique
vrpn_ConnectionconnectionPtr ()
 Returns a pointer to the connection this object is using
 

Protected 成员函数

int setup_vector (vrpn_IMU_Vector *vector)
 
int teardown_vector (vrpn_IMU_Vector *vector)
 
- Protected 成员函数 继承自 vrpn_Analog
virtual int register_types (void)
 
virtual vrpn_int32 encode_to (char *buf)
 
- Protected 成员函数 继承自 vrpn_BaseClass
virtual int init (void)
 
virtual int register_senders (void)
 
- Protected 成员函数 继承自 vrpn_BaseClassUnique
int register_autodeleted_handler (vrpn_int32 type, vrpn_MESSAGEHANDLER handler, void *userdata, vrpn_int32 sender=vrpn_ANY_SENDER)
 
int send_text_message (const char *msg, struct timeval timestamp, vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL, vrpn_uint32 level=0)
 Sends a NULL-terminated text message from the device d_sender_id
 
SendTextMessageBoundCall send_text_message (vrpn_TEXT_SEVERITY type=vrpn_TEXT_NORMAL)
 
void server_mainloop (void)
 
void client_mainloop (void)
 

静态 Protected 成员函数

static void VRPN_CALLBACK handle_analog_update (void *userdata, const vrpn_ANALOGCB info)
 
- 静态 Protected 成员函数 继承自 vrpn_BaseClassUnique
static int encode_text_message_to_buffer (char *buf, vrpn_TEXT_SEVERITY severity, vrpn_uint32 level, const char *msg)
 
static int decode_text_message_from_buffer (char *msg, vrpn_TEXT_SEVERITY *severity, vrpn_uint32 *level, const char *buf)
 Decodes the body of the text message from a buffer from the connection
 

Protected 属性

double d_update_interval
 
struct timeval d_prevtime
 
bool d_report_changes
 
vrpn_IMU_Vector d_vector
 Axes to handle gathering and scaling the required data.
 
double d_mins [3]
 Minimum, maximum, and current values for each axis.
 
double d_maxes [3]
 
- Protected 属性 继承自 vrpn_Analog
vrpn_float64 channel [vrpn_CHANNEL_MAX]
 
vrpn_float64 last [vrpn_CHANNEL_MAX]
 
vrpn_int32 num_channel
 
struct timeval timestamp
 
vrpn_int32 channel_m_id
 
int status
 
- Protected 属性 继承自 vrpn_BaseClassUnique
vrpn_Connectiond_connection
 Connection that this object talks to
 
char * d_servicename
 
vrpn_int32 d_sender_id
 part
 
vrpn_int32 d_text_message_id
 ID for text messages
 
vrpn_int32 d_ping_message_id
 Ask the server if they are there
 
vrpn_int32 d_pong_message_id
 Server telling that it is there
 

额外继承的成员函数

- Public 属性 继承自 vrpn_BaseClassUnique
bool shutup
 

详细描述

Normalizes the three directions for a magnetometer into a unit vector.

This class acts as an analog-to-analog filter. It is given three axes to manage. For each axis, it keeps track of the minimum and maximum value it has ever received and maps the current value into the range -1..1 based on that range. It then normalizes the resulting vector, producing a unit vector that should auto-calibrate itself over time to provide a unit direction vector (as a 3-output analog) pointing in the direction of magnetic north.

构造及析构函数说明

◆ vrpn_IMU_Magnetometer()

VRPN_API vrpn_IMU_Magnetometer ( std::string const & name,
vrpn_Connection * output_con,
vrpn_IMU_Axis_Params params,
float update_rate,
bool report_changes = VRPN_FALSE )

Constructor

参数
nameThe name to give to the Analog_Server output device.
output_conThe connection to report on.
xThe parameters for the X axis.
yThe parameters for the Y axis.
zThe parameters for the Z axis.
update_rateHow often to send reports. If report_changes is true, it will only report at most this often. If report_changes is false, it will send reports at this rate whether it has received new values or not.
report_changesIf true, only reports values when at least one of them a changed. If false, report values at the specified rate whether or not they have changed.

成员函数说明

◆ mainloop()

virtual VRPN_API void mainloop ( )
virtual

Override base class function.

重载 vrpn_Analog_Server .

类成员变量说明

◆ d_mins

double d_mins[3]
protected

Minimum, maximum, and current values for each axis.

◆ d_vector

vrpn_IMU_Vector d_vector
protected

Axes to handle gathering and scaling the required data.


该类的文档由以下文件生成: