vrpn  07.33
Virtual Reality Peripheral Network
vrpn_Tracker_Filter.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Internal Includes
16 #include "quat.h" // for q_vec_type
17 #include "vrpn_Tracker.h" // for vrpn_Tracker
18 #include "vrpn_OneEuroFilter.h"
19 
30  public:
31  // name is the name that the filtered reports go out under
32  // trackercon is the server connection to use to send filtered reports on
33  // listen_tracker_name is the name of the tracker we listen to to filter
34  // If the tracker should use the server connection, then put * in
35  // front of the name.
36  // channels tells how many channels from the listening tracker to
37  // filter (reports on other channels are ignored by this tracker)
38  // The other parameters are passed to each One-Euro filter.
39  vrpn_Tracker_FilterOneEuro(const char * name, vrpn_Connection * trackercon,
40  const char *listen_tracker_name,
41  unsigned channels, vrpn_float64 vecMinCutoff = 1.15,
42  vrpn_float64 vecBeta = 0.5, vrpn_float64 vecDerivativeCutoff = 1.2,
43  vrpn_float64 quatMinCutoff = 1.5, vrpn_float64 quatBeta = 0.5,
44  vrpn_float64 quatDerivativeCutoff = 1.2);
46 
47  virtual void mainloop();
48 
49  private:
50  int d_channels; // How many channels on our tracker?
51  vrpn_OneEuroFilterVec *d_filters; // Set of position filters, one/channel
52  vrpn_OneEuroFilterQuat *d_qfilters; // Set of orientation filters, one/channel
53  struct timeval *d_last_report_times; // Last time of report for each tracker.
54  vrpn_Tracker_Remote *d_listen_tracker; // Tracker we get our reports from
55 
56  // Callback handler to deal with getting messages from the tracker we're
57  // listening to. It filters them and then sends them on.
58  static void VRPN_CALLBACK handle_tracker_update(void *userdata, const vrpn_TRACKERCB info);
59 };
60 
vrpn_Tracker.h
vrpn_Tracker
Definition: vrpn_Tracker.h:49
vrpn_Tracker_FilterOneEuro
Tracker filter based on the one-Euro filter by Jan Ciger jan.ciger@reviatech.com
Definition: vrpn_Tracker_Filter.h:29
vrpn_TRACKERCB
Definition: vrpn_Tracker.h:284
vrpn_Tracker_Remote
Definition: vrpn_Tracker.h:374
vrpn_BaseClass::mainloop
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Connection
Generic connection class not specific to the transport mechanism.
Definition: vrpn_Connection.h:510
vrpn_OneEuroFilter
Definition: vrpn_OneEuroFilter.h:102
vrpn_OneEuroFilter.h
Header file that completely implements a direction and orientation filter on tracking reports; it doe...
VRPN_CALLBACK
#define VRPN_CALLBACK
Definition: vrpn_Configure.h:647
VRPN_API
#define VRPN_API
Definition: vrpn_Configure.h:646