2015/08/14

Dependencies:   VNH5019

Dependents:   Cansat_program4_1

Fork of cansat by Mami Yokokawa

Revision:
0:3f50511c1c1f
Child:
1:6a034792e059
diff -r 000000000000 -r 3f50511c1c1f cansat.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cansat.h	Sat Jul 11 06:35:44 2015 +0000
@@ -0,0 +1,44 @@
+#ifndef CANSAT_H
+#define CANSAT_H
+
+/**
+ * Includes
+ */
+#include "mbed.h"
+
+
+class CanSat{
+    public:
+        //ロボットとターゲットの方角からロボットの動きを決める
+        char get_moving_angle(int robot_angle,int target_angle);
+        //ロボットとターゲットの距離の計算
+        double get_taget_distance();
+        //ロボットとターゲットの距離から速度を決める
+        int get_roboto_velocity();
+        //気圧の取得
+        double get_pressure();
+        //スタック判定:加速度データをもとに?
+        bool is_stack();
+        //ログデータの送信
+        void log_send();
+    
+    private:
+        //モータ
+        //VNH5019 _agzSheild;
+        //ロボットとターゲットの座標(緯度と経度)を表す
+        double robot_x,robot_y,target_x,target_y;
+        //ロボットとターゲットの方角を表す。北を1として北東:2、東:3、南東4のように1~8の値を持つ
+        int robot_angle,target_angle;
+        //ジャイロ
+        double gyro_x,gyro_y,gyro_z;
+        //コンパス
+        double compass_x,compass_y,compass_z;
+        //気圧計の気圧、気温、湿度
+        double pressure,temperature,humidity;
+        //ロボットの速度
+        int velocity;
+        //ターゲットまでの距離
+        int target_distance;
+};
+
+#endif
\ No newline at end of file