Browse Source

force_telemetry interface

Cary Sandvig 25 years ago
parent
commit
4a74d7a538
2 changed files with 16 additions and 3 deletions
  1. 13 3
      direct/src/deadrec/prediction.cxx
  2. 3 0
      direct/src/deadrec/prediction.h

+ 13 - 3
direct/src/deadrec/prediction.cxx

@@ -14,7 +14,10 @@ Prediction::~Prediction(void) {
 void Prediction::step(void) {
 void Prediction::step(void) {
 }
 }
 
 
-void Prediction::new_telemetry(LPoint3f& t_pos) {
+void Prediction::new_telemetry(LPoint3f&) {
+}
+
+void Prediction::force_telemetry(LPoint3f&) {
 }
 }
 
 
 LPoint3f Prediction::get_pos(void) const {
 LPoint3f Prediction::get_pos(void) const {
@@ -37,7 +40,11 @@ void NullPrediction::step(void) {
 }
 }
 
 
 void NullPrediction::new_telemetry(LPoint3f& t_pos) {
 void NullPrediction::new_telemetry(LPoint3f& t_pos) {
-  //  _curr_v = _curr_p - t_pos;
+  _curr_v = t_pos - _curr_p;
+  _curr_p = t_pos;
+}
+
+void NullPrediction::force_telemetry(LPoint3f& t_pos) {
   _curr_v = t_pos - _curr_p;
   _curr_v = t_pos - _curr_p;
   _curr_p = t_pos;
   _curr_p = t_pos;
 }
 }
@@ -53,5 +60,8 @@ LinearPrediction::~LinearPrediction(void) {
 void LinearPrediction::step(void) {
 void LinearPrediction::step(void) {
 }
 }
 
 
-void LinearPrediction::new_telemetry(LPoint3f& t_pos) {
+void LinearPrediction::new_telemetry(LPoint3f&) {
+}
+
+void LinearPrediction::force_telemetry(LPoint3f&) {
 }
 }

+ 3 - 0
direct/src/deadrec/prediction.h

@@ -19,6 +19,7 @@ PUBLISHED:
 
 
   virtual void step(void);
   virtual void step(void);
   virtual void new_telemetry(LPoint3f&);
   virtual void new_telemetry(LPoint3f&);
+  virtual void force_telemetry(LPoint3f&);
 
 
   LPoint3f get_pos(void) const;
   LPoint3f get_pos(void) const;
   LVector3f get_vel(void) const;
   LVector3f get_vel(void) const;
@@ -31,6 +32,7 @@ PUBLISHED:
 
 
   virtual void step(void);
   virtual void step(void);
   virtual void new_telemetry(LPoint3f&);
   virtual void new_telemetry(LPoint3f&);
+  virtual void force_telemetry(LPoint3f&);
 };
 };
 
 
 class LinearPrediction : public Prediction {
 class LinearPrediction : public Prediction {
@@ -40,6 +42,7 @@ PUBLISHED:
 
 
   virtual void step(void);
   virtual void step(void);
   virtual void new_telemetry(LPoint3f&);
   virtual void new_telemetry(LPoint3f&);
+  virtual void force_telemetry(LPoint3f&);
 };
 };
 
 
 #endif /* __PREDICTION_H__ */
 #endif /* __PREDICTION_H__ */