Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 1:038eca93a8f4
- Parent:
- 0:09287ca178ff
--- a/main.cpp Fri Sep 10 12:37:29 2021 +0000
+++ b/main.cpp Mon Feb 14 13:16:09 2022 +0000
@@ -50,6 +50,7 @@
float nx, ny, nz; //地磁気の補正用
double X,Y; //ゴールがどの象限にいるかを区別するための変数
double mode; //ゴールの位置によってモードを変える
+//float temp1,pre1,h1;
int i; //超音波でのループ用変数
int d[25];
@@ -66,6 +67,9 @@
int main() {
+ //temp1= sensor.getTemperature();//電源を入れた時の標高を求める
+ //pre1=sensor.getPressure();
+ //h1=( pow((pre1/1013.25),0.1902225f))*(temp1+273.15f)/(0.065f);
/*
while(1){ //テスト用、実際は実装しない
@@ -145,7 +149,7 @@
printf("Goodbye World!\r\n"); //microsd
*/ //これをつけるとコンパイルできない
-
+
/*
pc.printf("%2.2f degC, %04.2f hPa, %2.2f %%\r\n", sensor.getTemperature(), sensor.getPressure(), sensor.getHumidity()); //BME280
@@ -204,7 +208,7 @@
twe.printf("r : %f\n",r);
- //sita = atan2l(delta_y, delta_x)*180/3.14; //現在地点からゴールまでの角度を求める(同時に角度の単位をラジアンからdegreeにも変換している)
+ //sita = atan2(delta_y, delta_x)*180/3.14; //現在地点からゴールまでの角度を求める(同時に角度の単位をラジアンからdegreeにも変換している)
//方角を求める(degree ==> rad)
delta_x = delta_x * 3.14/180;