#ifndef _POSITION_TRACKER_H #define _POSITION_TRACKER_H #include "../../stdafx.h" class Position_Tracker : public IO_Module { public: Position_Tracker() { this->parent = NULL; this->moduleId = 0; this->positionX = 0; this->positionY = 0; this->orientation = 0; } Position_Tracker(uint32 trackerId) { this->parent = NULL; this->moduleId = trackerId; this->positionX = 0; this->positionY = 0; this->orientation = 0; } protected: float positionX; float positionY; float orientation; public: void Update(); // Sets the current position; x and y in mm void SetPosition(int newPositionX, int newPositionY, float newOrientation) { positionX = newPositionX*(TICKS_PER_CM/10.0f); positionY = newPositionY*(TICKS_PER_CM/10.0f); orientation = easyAngle(newOrientation); } // returns x-koordinate in mm int GetPositionX() { return (int)((positionX*10.0f)/TICKS_PER_CM); } // returns y-koordinate in mm int GetPositionY() { return (int)((positionY*10.0f)/TICKS_PER_CM); } // returns orientation float GetOrientation() { return 0.0f; //tmp!!!!!!!!!! //return orientation; } }; #endif