vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PosNoiseRemover.h
Go to the documentation of this file.
1 #include <vrecko/Ability.h>
2 #include <vrecko/IOPins.h>
3 #include <helpers/DynamicArray.h>
4 
5 namespace Filter {
6 
8  public:
11 
12  void preInitialize(void);
13  void processEvent(const std::string &input_name, void *value);
14 
15  bool loadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *pParametersNode);
16  XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *saveXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *);
17 
18  protected:
19 
20 // std::string out3String;
21 
22  struct SAMPLE {
23  osg::Vec3 vec;
24  osg::Timer_t time;
25  };
26 
28 
29  bool bOn; // is filtering on or off?
30 
31  osg::Vec3 lastInput, lastResult;
32 
34  // Number of corrected samples IN ROW
35 
36  float fTolerance;
37  // Maximum distance between two samples. The value is time-normalized,
38  // so it stores the distance per second.
40  // Currently, only the values 1 or 2 are supported.
41  // 1: If the new sample is too far from the last one, the system will always output the last value
42  // 2: If too far, the system will output value according to the [bExtrapolateCorrectValue] variable
44  // Maximum of corrected samples IN ROW. If exceeded, we will clear the internal data
45  // and expect that samples are correct (and there was a mistake to correct them)
47  // True: Will compare the new value with the extrapolated one from the last two samples.
49  // True: If error, extrapolate the correct value.
50  // False: If error, use the last sample.
51 
52 
55  };
56 
57 }