Dependencies: mbed
Diff: main.cpp
- Revision:
- 20:a30164d29218
- Parent:
- 19:7f5c0514eb33
- Child:
- 21:548ac557ee95
--- a/main.cpp Sat Dec 14 18:05:05 2019 +0000 +++ b/main.cpp Sat Dec 14 18:30:26 2019 +0000 @@ -43,7 +43,7 @@ flight==1;//flight pin ついてる FET=0;//FET off myled=1; - printf("CanSat-B_Start!\r\n"); + printf("you worry about me don't you?\r\n"); //FET while(1){ @@ -84,7 +84,7 @@ int j = 0; pc.printf("GPS Start\n"); - xbee.printf("start\n");//printf("1"); + xbee.printf("start\n"); time_gps.start(); while(a==0) { @@ -93,9 +93,9 @@ b=gps.longitude; } - pc.printf("%lf,%lf\n",a,b); - if(time_gps.read()>30){ - xbee.printf("timeout!!\n"); + pc.printf("%lf,%lf\n",a,b);/*着地地点の緯度と軽度を測る*/ + if(time_gps.read()>500){/*500経ったら次に進む*/ + xbee.printf("timeout!!\n");/*xbeeで時間切れの場合はtimeoutと出力する*/ timeout_flag=1; break; } @@ -125,7 +125,7 @@ lat2 = gps.latitude; lon2 = gps.longitude; - pc.printf("(%lf,%lf)\n\r",gps.latitude,gps.longitude);//c,dを表示 + pc.printf("(%lf,%lf)\n\r",gps.latitude,gps.longitude);//動いた後の緯度と経度を表示 const double pi = 3.14159265359; // 円周率 double ra = a * pi / 180;