da bada
/
AntennaTracker
UAV/UAS Tracking Antenna System
Diff: tracker/tracker.h
- Revision:
- 0:96bf30dd833a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tracker/tracker.h Mon May 30 21:28:33 2011 +0000 @@ -0,0 +1,21 @@ +#define PI 3.14159274 +#define ON 1 +#define OFF 0 +typedef unsigned char uchar; + + +float torads(float deg); +float todegs(float rad); + +//Gets string from groundStation and converts to Lat Lon Alt +void getlla(float& p_lat, float& p_lon, float& p_alt, float& g_lat, float& g_lon, float& g_alot); + +//converts lat lon alt to ECEF earth centered earth fixed coordinates +void lla2ecef(float lat, float lon, float alt, float& x, float& y, float& z); + +//converts 4 bytes to float +float tofloat(uchar b0, uchar b1, uchar b2, uchar b3); + +//this is a testing function it allows me to input a puse width in uS and output it to the servo(s) +// Allows me to get y = Mx + B.. it's not used in the main program but is usefull +void servo_calib();