Ricardo Binas
/
GPSUAV
GPS UAV, Latitude,Longitude, Speed, Heading, GPS Fix, No.Of Sats. HDOP
main.cpp@1:ae1120188730, 2019-02-24 (annotated)
- Committer:
- Rbinas
- Date:
- Sun Feb 24 02:01:36 2019 +0000
- Revision:
- 1:ae1120188730
- Parent:
- 0:8508616aa661
Rev 0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Rbinas | 0:8508616aa661 | 1 | #include "mbed.h" |
Rbinas | 1:ae1120188730 | 2 | #include "GPSUAV.h" |
Rbinas | 0:8508616aa661 | 3 | //Board:mbed LPC1768 |
Rbinas | 0:8508616aa661 | 4 | DigitalOut led1(LED1); |
Rbinas | 1:ae1120188730 | 5 | //Altitude not included, deemed unreliable for UAV appliations. Use Pitot tube or AGL. |
Rbinas | 0:8508616aa661 | 6 | |
Rbinas | 1:ae1120188730 | 7 | //--------------------------------------------------------------- |
Rbinas | 0:8508616aa661 | 8 | int main() { |
Rbinas | 1:ae1120188730 | 9 | |
Rbinas | 0:8508616aa661 | 10 | while (1) { |
Rbinas | 1:ae1120188730 | 11 | |
Rbinas | 1:ae1120188730 | 12 | EnableGPS(); |
Rbinas | 1:ae1120188730 | 13 | pc.printf("%02d ",LatDegInt); pc.printf("%08.5f",LatMinInt);pc.printf("%c ",NS);//latitude |
Rbinas | 1:ae1120188730 | 14 | pc.printf("%03d ",LongDegInt);pc.printf("%08.5f",LongMinInt);pc.printf("%c",WE);//longitude |
Rbinas | 1:ae1120188730 | 15 | pc.printf(" %07.3f",speedInt);//speed |
Rbinas | 1:ae1120188730 | 16 | pc.printf(" %05.1f",HeadingInt);//heading |
Rbinas | 1:ae1120188730 | 17 | pc.printf(" %1d",GFInt);//gpsfix |
Rbinas | 1:ae1120188730 | 18 | pc.printf(" %02d",NOSInt);//number of sats |
Rbinas | 1:ae1120188730 | 19 | pc.printf(" %05.2f\n",HDOPInt);//hdop |
Rbinas | 1:ae1120188730 | 20 | |
Rbinas | 1:ae1120188730 | 21 | led1 = !led1; |
Rbinas | 1:ae1120188730 | 22 | |
Rbinas | 0:8508616aa661 | 23 | } |
Rbinas | 0:8508616aa661 | 24 | |
Rbinas | 0:8508616aa661 | 25 | } |