00001 // Copyright (C) 2005 University of Louisiana at Lafayette 00002 // Authors: Suresh Golconda 00003 00004 #ifndef CAJUN_LINEAR_INTERPOLATOR_H 00005 #define CAJUN_LINEAR_INTERPOLATOR_H 00006 00007 #include "base_path_interpolator.H" 00008 #include "conf.H" 00009 #include <vector> 00010 00011 namespace cajun 00012 { 00013 class linear_interpolator_t: public base_path_interpolator_t 00014 { 00015 public: 00016 linear_interpolator_t (const conf_t &conf); 00017 void interpolate (path_data_t const &input_path, 00018 uniform_path_t &output_path); 00019 00020 private: 00021 double m_interp_dis; 00022 bool read_conf (const conf_t &conf); 00023 void copy_wp (const path_wp_t *source_wp, 00024 uniform_path_t &output_path); 00025 void interpolate_wp (const path_wp_t *start_wp, 00026 const path_wp_t *end_wp, 00027 uniform_path_t &output_path); 00028 void add_wp_at_dis (const path_wp_t *start_wp, 00029 const path_wp_t *end_wp, 00030 double dis, 00031 uniform_path_t &output_path); 00032 }; 00033 }; 00034 00035 00036 #endif