2017年伊豆大島共同打ち上げ実験用電装モジュール搭載GPS測位プログラム

Dependents:   Hybrid_interruptGPS Hybrid_main_FirstEdtion rocket_logger_sinkan2018_v1 HYBRYD2018_IZU_ROCKET ... more

Revision:
12:935b21d30ec2
Parent:
11:1897b52fa8a1
Child:
13:3ee69851e270
--- a/GPS_interrupt.h	Sat Nov 25 07:00:51 2017 +0000
+++ b/GPS_interrupt.h	Sun Feb 25 03:22:16 2018 +0000
@@ -11,7 +11,7 @@
  * @file GPS_interrupt.h
  * @bref GPSから送られてくるデータをバックグラウンドで解析し、呼び出せるライブラリ
  * @author 松本岳
- * @note ver1.3.5
+ * @note ver1.3.6
  */
  
 #ifndef GPS_INTERRUPT_H_
@@ -37,12 +37,14 @@
         */
         GPS_interrupt(Serial *_gps,  int _baudrate);
         
-        
+        void debug(bool tf);
+
+    private:
         void initialize();//初期化関数
         void gps_auto_receive();
         bool processGPRMC(char *line);
         bool processGPGGA(char *line);
-        void debug(bool tf);
+        
         unsigned char checkSum(char *str);
         void rmc_initialize();
         void gga_initialize();
@@ -64,11 +66,11 @@
         int day;
         int hour;
         int minutes;
-        double seconds;
-        double knot;
-        double degree;
-        double height;
-        double geoid;
+        float seconds;
+        float knot;
+        float degree;
+        float height;
+        float geoid;
         int number;
         
     public:
@@ -143,9 +145,9 @@
         
         /**  秒を返す関数
          * @bref 秒を取得
-         * @return double型 秒
+         * @return float型 秒
          */
-        inline double Seconds(){
+        inline float Seconds(){
             return seconds;   
         }
         
@@ -169,7 +171,7 @@
          * @return データが有効かどうか 有効ならtrue, 無効ならfalse
          * @note 要素2の配列を作って、そのアドレスを引数に与えてください。
          */
-        inline bool getPosition(double *lonlat){
+        inline bool getPosition(float *lonlat){
             lonlat[0] = longitude;
             lonlat[1] = latitude;
             if(gps_readable)    return true;
@@ -183,11 +185,11 @@
          * @param _day int型 日 ポインタ
          * @param _hour int型 時間 ポインタ
          * @param _minutes int型 分 ポインタ
-         * @param _seconds double型 秒 ポインタ 
+         * @param _seconds float型 秒 ポインタ 
          * @return データが有効かどうか 有効ならtrue, 無効ならfalse
          * @note 6つ変数を作って、そのアドレスを引数に与えてください。
          */
-        inline bool getUTC(int *_year, int *_month, int *_day, int *_hour, int *_minutes, double *_seconds){
+        inline bool getUTC(int *_year, int *_month, int *_day, int *_hour, int *_minutes, float *_seconds){
             *_year = year;
             *_month = month;
             *_day = day;
@@ -240,7 +242,7 @@
          * @return データが有効かどうか 有効ならtrue, 無効ならfalse
          * @detail 2つ変数を作って、そのアドレスを引数に与えてください。
          */
-        inline bool getSpeedVector(double *_knot, double *_degree){
+        inline bool getSpeedVector(float *_knot, float *_degree){
             *_knot = knot;
             *_degree = degree;   
             if(gps_readable)    return true;
@@ -259,7 +261,7 @@
          * @bref 標高を返します。 
          * @return double型 標高 アドレス 
          */
-        inline double Height(){
+        inline float Height(){
             return height;   
         }
         
@@ -268,7 +270,7 @@
          * @bref 速さを返します。 
          * @return double型 速さ アドレス[knot] 
          */
-        inline double Knot(){
+        inline float Knot(){
             return knot;   
         }
         
@@ -277,7 +279,7 @@
          * @bref 進行方角を返します。 
          * @return double型 進行方角 アドレス 北から右回り正です。 
          */
-        inline double Degree(){
+        inline float Degree(){
             return degree;   
         }
         
@@ -286,7 +288,7 @@
         * @param x 目標経度
         * @param y 目標緯度
         */
-        double Distance(double x, double y);
+        float Distance(double x, double y);
 };
 /////////////////
 /////sample//////