Satellite tracking for the mbed platform(s). Note: This software is beerware.
Satellite Tracking with mbed!
This is a quick example of tracking satellites with the mbed platform. Ensure you have the latest TLE information and map it correctly. I have commented in the original TLEs used for the example to help you do this.
This code is not restricted to geostationary/geosynchronous satellites, you can track any satellite for which you can get a TLE. (Which is almost all non military satellites).
See http://www.celestrak.com/NORAD/elements/ http://en.wikipedia.org/wiki/Two-line_element_set
If you use this code, please send me a beer (see main.cpp header). Enjoy!
Revision 5:8af1b8452986, committed 2014-01-20
- Comitter:
- SamClarke
- Date:
- Mon Jan 20 21:25:27 2014 +0000
- Parent:
- 4:e16c4e5b9dbc
- Commit message:
- tidy
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jan 20 10:24:09 2014 +0000 +++ b/main.cpp Mon Jan 20 21:25:27 2014 +0000 @@ -10,18 +10,6 @@ #define ONEPPM 1.0e-6 #define ONEPPTM 1.0e-7 -char *astra2f_tle = - "ASTRA 2F" - "1 38778U 12051A 14010.00000000 .00000143 00000-0 00000+0 0 2381" - "2 38778 000.0670 267.2510 0004011 341.2500 249.1500 01.00276604 4755"; - -void target_tle(int year, char *tle, struct Target *t); - -void calculate(Plan13& p, GPS& g, struct Target *t); - -void target_data(int yr, float epoch, float inc, float raan, - float ecc, float arg, float anom, float mmotion, - float tmotion, float epoch_orbit, struct Target *t); struct Target{ int YEAR; float EPOCH; @@ -37,6 +25,19 @@ float elevation; }; +char *astra2f_tle = + "ASTRA 2F" + "1 38778U 12051A 14010.00000000 .00000143 00000-0 00000+0 0 2381" + "2 38778 000.0670 267.2510 0004011 341.2500 249.1500 01.00276604 4755"; + +void target_tle(int year, char *tle, struct Target *t); + +void calculate(Plan13& p, GPS& g, struct Target *t); + +void target_data(int yr, float epoch, float inc, float raan, + float ecc, float arg, float anom, float mmotion, + float tmotion, float epoch_orbit, struct Target *t); + Plan13 p; GPS gps(p9,p10); Serial pc(USBTX, USBRX);