Lab4

Dependencies:   mbed HeptaBattery SDFileSystem HeptaCamera_GPS

Committer:
HEPTA
Date:
Thu Sep 07 13:59:49 2017 +0000
Revision:
14:5e01368bf0fb
Parent:
13:a1fa75a002f6
Child:
16:beb20346067a
Hepta Lab4

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:bdbd3d6fc5d5 1 #include "mbed.h"
mbed_official 0:bdbd3d6fc5d5 2 #include "SDFileSystem.h"
umeume 2:1c5cdb2c3e0f 3 #include "HeptaCamera_GPS.h"
umeume 2:1c5cdb2c3e0f 4
umeume 2:1c5cdb2c3e0f 5 Serial pc(USBTX,USBRX);
HEPTA 9:942eb6e8c117 6 SDFileSystem sd(p5, p6, p7, p8, "sd");
HEPTA 14:5e01368bf0fb 7 HeptaCamera_GPS cam_gps(p13, p14,p25,p24);//(tx,rx,camera switch,gps switch)
umeume 5:c5ccb1b07e8f 8
umeume 2:1c5cdb2c3e0f 9 int main()
umeume 2:1c5cdb2c3e0f 10 {
HEPTA 14:5e01368bf0fb 11 pc.baud(9600);
HEPTA 14:5e01368bf0fb 12 cam_gps.gps_setting();
HEPTA 14:5e01368bf0fb 13 int quality=0,stnum=0,gps_check=0;
HEPTA 14:5e01368bf0fb 14 char ns='A',ew='B',aunit='m';
HEPTA 14:5e01368bf0fb 15 float time=0.0,latitude=0.0,longitude=0.0,hacu=0.0,altitude=0.0;
HEPTA 14:5e01368bf0fb 16 for(int i=1; i<10; i++) {
HEPTA 14:5e01368bf0fb 17 cam_gps.gga_sensing(&time, &latitude, &ns, &longitude, &ew, &quality, &stnum, &hacu, &altitude, &aunit, &gps_check);
HEPTA 14:5e01368bf0fb 18 if((gps_check==0)|(gps_check==1)) {
HEPTA 14:5e01368bf0fb 19 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);
HEPTA 14:5e01368bf0fb 20 }
HEPTA 14:5e01368bf0fb 21 }
umeume 2:1c5cdb2c3e0f 22 }