00001 // Copyright (C) 2007 University of Louisiana at Lafayette 00002 // Authors: Christopher Mire 00003 00004 #ifndef CAJUN_WAYPOINT_CONTROLLER_H 00005 #define CAJUN_WAYPOINT_CONTROLLER_H 00006 00007 #include "controller_interface.H" 00008 00009 namespace cajun 00010 { 00011 class waypoint_controller_t : public controller_interface_t 00012 { 00013 public: 00014 waypoint_controller_t (); 00015 waypoint_controller_t (dynamic_object_t *object, timer_t *timer); 00016 00017 ~waypoint_controller_t (); 00018 private: 00019 class steering_observer_t : public timer_t::observer_t 00020 { 00021 public: 00022 steering_observer_t (steering_sensor_t *m, double interval_v); 00023 virtual ~steering_observer_t (); 00024 bool timeout (double currTime); 00025 private: 00026 steering_sensor_t *m_steering_sensor; 00027 double m_start_pos[3]; 00028 double m_end_pos[3]; 00029 unsigned m_goal_counter; 00030 double m_rotation[16]; 00031 double m_object_heading; 00032 double m_object_bank; 00033 double m_object_attitude; 00034 float m_prev_time; 00035 float m_pause_time; 00036 char msg[MAXCBMSGSIZE]; 00037 }; 00038 }; 00039 }; 00040 00041 #endif