Bmag incl gps rettelse

Dependencies:   mbed WDT MODSERIAL BME280

Revision:
23:2e914b705b99
Parent:
22:9f5955f051f5
Child:
24:099df3fa2b13
--- a/SPS/SPS.cpp	Mon May 15 12:46:50 2017 +0000
+++ b/SPS/SPS.cpp	Tue May 16 09:33:12 2017 +0000
@@ -10,7 +10,7 @@
     currentString = "";
     currentErrString = "";
     lastString = "";
-    headerString = "/tag identifier_id group_id date time zzz | encoding source_id interpreter_id data_line_version encoding source_firmware_version interpreter_firmware_version | barcode latitude longitude gpsFixFlag batteryvoltage mag_time mag_nt mag_sq checksum";
+    headerString = "/tag identifier_id group_id date time zzz | source_id interpreter_id data_line_version encoding source_firmware_version interpreter_firmware_version | barcode latitude longitude gpsFixFlag batteryvoltage mag_time mag_nt mag_sq checksum";
     crc_tab16_init = 0;
     errStatus = true;
            
@@ -28,7 +28,7 @@
     \param date: string containing the date in the format "YYYY/MM/DD"  
     \param time: string containing the current time in format "HH:MM:SS.FFF"
     \param ZZZ: string containing "ZZZ" :)
-    \param s1: string containing s1 as described in the *.sps documentation
+    \param encoding: string containing encoding as described in the *.sps documentation
     \param source_id: string containing the source id of the unit eg. "0000"
     \param interpreter_id: string containing the interpreter id of the unit eg. "00"
     \param data_line_version: string containing data line version as described in the *.sps documentation, eg. "01" 
@@ -43,7 +43,7 @@
     \param mag_sq: string containing info about the measurement quality of the last mag measurement eg. "99"
               
 */
-void SPS::UpdateCurrentString(string tag, string identifier_id, string group_id, string date, string time, string ZZZ,string s1, string source_id, string interpreter_id, string data_line_version, string source_firmware_version, string interpreter_firmware_version, string barcode, string latitude, string longitude, bool gpsFixFlag, string batteryvoltage, string mag_time, string mag_nt, string mag_sq, Serial * dbg){
+void SPS::UpdateCurrentString(string tag, string identifier_id, string group_id, string date, string time, string ZZZ,string encoding, string source_id, string interpreter_id, string data_line_version, string source_firmware_version, string interpreter_firmware_version, string barcode, string latitude, string longitude, bool gpsFixFlag, string batteryvoltage, string mag_time, string mag_nt, string mag_sq, Serial * dbg){
 
     this->currentString = "";
     this->currentString.resize(256);
@@ -68,14 +68,14 @@
     addToCurrentString(SPACE);
     addToCurrentString(HEADEREND);
     addToCurrentString(SPACE);
-    addToCurrentString(s1);
-    addToCurrentString(SPACE);
     addToCurrentString(source_id);
     addToCurrentString(SPACE);
     addToCurrentString(interpreter_id);
     addToCurrentString(SPACE);
     addToCurrentString(data_line_version);
     addToCurrentString(SPACE);
+    addToCurrentString(encoding);
+    addToCurrentString(SPACE);
     addToCurrentString(source_firmware_version);
     addToCurrentString(SPACE);
     addToCurrentString(interpreter_firmware_version);
@@ -138,7 +138,7 @@
     \param date: string containing the date in the format "YYYY/MM/DD"  
     \param time: string containing the current time in format "HH:MM:SS.FFF"
     \param ZZZ: string containing "ZZZ" :)
-    \param s1: string containing s1 as described in the *.sps documentation
+    \param encoding: string containing encoding as described in the *.sps documentation
     \param source_id: string containing the source id of the unit eg. "0000"
     \param interpreter_id: string containing the interpreter id of the unit eg. "00"
     \param data_line_version: string containing data line version as described in the *.sps documentation, eg. "01" 
@@ -152,7 +152,7 @@
     \param mag_sq: string containing info about the measurement quality of the last mag measurement eg. "99"
               
 */ 
-void SPS::UpdateCurrentErrString(string tag, string identifier_id, string group_id, string date, string time, string ZZZ,string s1, string source_id, string interpreter_id, string data_line_version, string source_firmware_version, string interpreter_firmware_version, string latitude, string longitude, bool gpsFixFlag, string mag_time, string mag_nt, string mag_sq, Serial * dbg){
+void SPS::UpdateCurrentErrString(string tag, string identifier_id, string group_id, string date, string time, string ZZZ,string encoding, string source_id, string interpreter_id, string data_line_version, string source_firmware_version, string interpreter_firmware_version, string latitude, string longitude, bool gpsFixFlag, string mag_time, string mag_nt, string mag_sq, Serial * dbg){
 
     this->currentErrString = "";
     this->currentErrString.resize(256);
@@ -172,21 +172,21 @@
     addToCurrentErrString(time);
     addToCurrentErrString(SPACE); 
     addToCurrentErrString("ZZZ");
-    addToCurrentErrString(SPACE);
-    addToCurrentErrString(HEADEREND);
-    addToCurrentErrString(SPACE);
-    addToCurrentErrString(s1);
-    addToCurrentErrString(SPACE);
-    addToCurrentErrString(source_id);
-    addToCurrentErrString(SPACE);
-    addToCurrentErrString(interpreter_id);
-    addToCurrentErrString(SPACE);
-    addToCurrentErrString(data_line_version);
-    addToCurrentErrString(SPACE);
-    addToCurrentErrString(source_firmware_version);
-    addToCurrentErrString(SPACE);
-    addToCurrentErrString(interpreter_firmware_version);
-    addToCurrentErrString(SPACE);
+    addToCurrentString(SPACE);
+    addToCurrentString(HEADEREND);
+    addToCurrentString(SPACE);
+    addToCurrentString(source_id);
+    addToCurrentString(SPACE);
+    addToCurrentString(interpreter_id);
+    addToCurrentString(SPACE);
+    addToCurrentString(data_line_version);
+    addToCurrentString(SPACE);
+    addToCurrentString(encoding);
+    addToCurrentString(SPACE);
+    addToCurrentString(source_firmware_version);
+    addToCurrentString(SPACE);
+    addToCurrentString(interpreter_firmware_version);
+    addToCurrentString(SPACE);
     addToCurrentErrString(HEADEREND);
     addToCurrentErrString(SPACE);
     addToCurrentErrString("BMAG");