HeptaSat
Dependencies: HEPTA_CDH HEPTA_EPS HEPTA_SENSOR mbed
main.cpp@33:e113f53684b4, 18 months ago (annotated)
- Committer:
- RyusukeIwata
- Date:
- Fri Nov 11 00:39:09 2022 +0000
- Revision:
- 33:e113f53684b4
- Parent:
- 32:d3bc354cd532
changed to Rawserial;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
HeptaSatTraining2019 | 25:5fd40a170032 | 2 | #include "HEPTA_EPS.h" |
HeptaSatTraining2019 | 25:5fd40a170032 | 3 | #include "HEPTA_CDH.h" |
HeptaSatTraining2019 | 25:5fd40a170032 | 4 | #include "HEPTA_SENSOR.h" |
umeume | 2:1c5cdb2c3e0f | 5 | |
RyusukeIwata | 33:e113f53684b4 | 6 | RawSerial pc(USBTX,USBRX); |
HeptaSatTraining2019 | 21:92c25e853b87 | 7 | HEPTA_EPS eps(p16,p26); |
HeptaSatTraining2019 | 25:5fd40a170032 | 8 | HEPTA_CDH cdh(p5,p6,p7,p8,"sd"); |
csmk18112 | 32:d3bc354cd532 | 9 | HEPTA_SENSOR sensor(p17, |
csmk18112 | 32:d3bc354cd532 | 10 | p28,p27,0x19,0x69,0x13, |
csmk18112 | 32:d3bc354cd532 | 11 | p13, p14,p25,p24); |
umeume | 5:c5ccb1b07e8f | 12 | |
umeume | 2:1c5cdb2c3e0f | 13 | int main() |
umeume | 2:1c5cdb2c3e0f | 14 | { |
HeptaSatTraining2019 | 26:7274f093671c | 15 | sensor.gps_setting(); |
HeptaSatTraining2019 | 26:7274f093671c | 16 | int quality=0,stnum=0,gps_check=0; |
HeptaSatTraining2019 | 26:7274f093671c | 17 | char ns='A',ew='B',aunit='m'; |
HeptaSatTraining2019 | 26:7274f093671c | 18 | float time=0.0,latitude=0.0,longitude=0.0,hacu=0.0,altitude=0.0; |
HeptaSatTraining2019 | 30:cd7f7385d9f5 | 19 | for(int i=1; i<1000; i++) { |
HeptaSatTraining2019 | 26:7274f093671c | 20 | sensor.gga_sensing(&time, &latitude, &ns, &longitude, &ew, &quality, &stnum, &hacu, &altitude, &aunit, &gps_check); |
HeptaSatTraining2019 | 26:7274f093671c | 21 | if((gps_check==0)|(gps_check==1)) { |
HeptaSatTraining2019 | 26:7274f093671c | 22 | pc.printf("GPGGA,%f,%f,%c,%f,%c,%d,%d,%f,%f,%c\r\n",time,latitude,ns,longitude,ew,quality,stnum,hacu,altitude,aunit); |
HeptaSatTraining2019 | 26:7274f093671c | 23 | } |
HeptaSatTraining2019 | 26:7274f093671c | 24 | } |
umeume | 2:1c5cdb2c3e0f | 25 | } |