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_interpolator.H" 00008 #include "conf.H" 00009 #include <vector> 00010 00011 namespace cajun 00012 { 00013 class linear_interpolator_t: public base_interpolator_t 00014 { 00015 public: 00016 linear_interpolator_t (double interp_dis_); 00017 void interpolate (uniform_path_t const &input_path, 00018 uniform_path_t &output_path); 00019 void interpolate_wp (const waypoint_t *start_wp, 00020 const waypoint_t *end_wp, 00021 uniform_path_t &output_path); 00022 private: 00023 bool read_conf (const conf_t &conf); 00024 void copy_wp (const waypoint_t source_wp, 00025 uniform_path_t &output_path); 00026 void add_wp_at_dis (const waypoint_t *start_wp, 00027 const waypoint_t *end_wp, 00028 double dis, 00029 uniform_path_t &output_path); 00030 }; 00031 }; 00032 00033 00034 #endif