距離推定3

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
sayan2
Date:
Fri Oct 12 09:01:09 2018 +0000
Commit message:
????

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r bd0a2325eb65 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 12 09:01:09 2018 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include <stdio.h>
+
+int main(void) {
+  float culculate_distance_3(float a,float b);
+  float a,b,c;
+  a=3;//加速度センサから求めた距離
+  b=8;//フォトから求めた距離
+  
+  printf("distance3=%f",culculate_distance_3(a,b));
+  return 0;
+}
+
+//二つの距離から一つの距離を算出
+
+float culculate_distance_3(float a,float b) {
+ float c; 
+ c=0.5*a+0.5*b;//今は平均。計測をもとに修正を加える
+  return c;
+}
+}
diff -r 000000000000 -r bd0a2325eb65 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Oct 12 09:01:09 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187
\ No newline at end of file