ニョロゾ

Dependencies:   mbed BMP180

Revision:
4:e84fb33d8c2b
Parent:
3:258c138c6299
Child:
5:eedb48931268
--- a/main.cpp	Thu Dec 17 17:36:33 2020 +0000
+++ b/main.cpp	Thu Dec 17 17:44:55 2020 +0000
@@ -109,16 +109,16 @@
 wait(20);
 FET=0;*/
 motor = 100; 
-double a;
+/*double a;
     double b;
     double distance;
     
      pc.printf("GPS begin\n");
     
     while(1){
-        if(gps.getgps()){
+        if(gps.getgps()){*/
             /*a,bを緯度経度の初期値で初期化*/
-            a=gps.latitude;
+           /* a=gps.latitude;
             b=gps.longitude;
             pc.printf("(%lf,%lf)\r\n",gps.latitude,gps.longitude);//緯度と経度を表示
             pc.printf("--------------------------------\n\r");
@@ -132,18 +132,18 @@
          if(gps.getgps()){
              pc.printf("(%lf,%lf)\n\r",gps.latitude,gps.longitude);//緯度と経度を表示
             pc.printf("--------------------------------\n\r");
-             
+      */       
     /*ここから距離の計算*/
                  /*c、dを得た緯度経度の値で初期化*/  
-                     double c;
+                     /*double c;
                       double d;
                       c=gps.latitude;
                       d=gps.longitude;
-                      
-                      const double pi=3.14159265359;//円周率
+                      */
+                      //const double pi=3.14159265359;//円周率
                       
                       /*ラジアンに変換*/
-                      double theta_a=a*pi/180;
+                    /*  double theta_a=a*pi/180;
                       double theta_b=b*pi/180;
                       double theta_c=c*pi/180;
                       double theta_d=d*pi/180;
@@ -154,9 +154,9 @@
                       const double earth_radius=6378140;//赤道半径
                       
                       distance=earth_radius*theta_r;//距離の計算
-                      
+                      */
              /*距離が25m以上なら表示、通信*/         
-                 if(distance>=30){
+                /* if(distance>=30){
                   pc.printf("run over 20m");
                   motor=0;
                   pc.printf("run over 20m");
@@ -169,7 +169,7 @@
                 wait(1);
             }//データ取得失敗を表示、通信、1秒待機
                
-               }
+               }*/
     pc.printf("成功\n");
    return 0;
    }
\ No newline at end of file