Index: /branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.cpp
===================================================================
--- /branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.cpp	(revision 82)
+++ /branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.cpp	(revision 83)
@@ -27,10 +27,12 @@
 #include <ListWidget.h>
 
-//todo remove for tests
 #include <iostream>
+#include <array>
 
 using namespace std;
 using namespace flair::core;
 using namespace flair::gui;
+
+const std::string delimiter = "|";
 
 GuiGcs::GuiGcs(const FrameworkManager *parent, string name,
@@ -74,10 +76,8 @@
 void GuiGcs::MissionStop() {
   cout << "MavPlanner GuiGcs MissionStop" << endl;
-  outputSocket->SendMessage("MavPlanner GuiGcs MissionStop");
 }
 
 void GuiGcs::MissionResume() {
   cout << "MavPlanner GuiGcs MissionResume" << endl;
-  outputSocket->SendMessage("MavPlanner GuiGcs MissionResume");
 }
 
@@ -103,5 +103,4 @@
   // sending mission items
   cout << "[INFO] Mission items.\n";
-  std::string delimiter = "|";
   for (auto &missionCommand : missionCommandList) {
     cout << "[INFO] Mission item : " << missionCommand << "\n";
@@ -109,24 +108,9 @@
     std::string command = missionCommand.substr(0, missionCommand.find(delimiter));
     missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
-    // Parse param1
-    float param1 = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
-    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
-    // Parse param2
-    float param2 = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
-    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
-    // Parse param3
-    float param3 = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
-    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
-    // Parse latitude
-    float latitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
-    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
-    // Parse longitude
-    float longitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
-    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
-    // Parse altitude
-    float altitude = std::stof(missionCommand.substr(0, missionCommand.find(delimiter)));
-    missionCommand.erase(0, missionCommand.find(delimiter) + delimiter.length());
-    // cout << "[INFO] Mission item commands : " << command << ", " << param1 << ", " << param2 << ", " << param3 << std::endl;
-    mavCom->sendMissionItem(mavCom->target.getSysID(), mavCom->target.getCompID(), 0, MAV_FRAME_GLOBAL_RELATIVE_ALT, MavCommandGet(command), 0, 1, param1, param2, param3, 0, latitude, longitude, altitude);
+    std::array<float, 6> missionParameters;
+    ParametersParse(missionCommand, missionParameters);
+
+    mavCom->sendMissionItem(mavCom->target.getSysID(), mavCom->target.getCompID(), 0, MAV_FRAME_GLOBAL_RELATIVE_ALT, MavCommandGet(command), 0, 1,
+            missionParameters[0], missionParameters[1], missionParameters[2], 0, missionParameters[3], missionParameters[4], missionParameters[5]);
     mavCom->waitMissionAck(ACK_TIMEOUT);
   }
@@ -142,4 +126,12 @@
 }
 
+void GuiGcs::ParametersParse(const std::string& parametersString, std::array<float, 6>& parametersFloat) {
+  std::string parametersBuffer = parametersString;
+  for (int count = 0; count < parametersFloat.size(); count++) {
+    parametersFloat[count] = std::stof(parametersBuffer.substr(0, parametersBuffer.find(delimiter)));
+    parametersBuffer.erase(0, parametersBuffer.find(delimiter) + delimiter.length());
+  }
+}
+
 uint16_t GuiGcs::MavCommandGet(const std::string& command) const {
   uint16_t returnValue = -1;
Index: /branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.h
===================================================================
--- /branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.h	(revision 82)
+++ /branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.h	(revision 83)
@@ -21,4 +21,5 @@
 
 #include <string>
+#include <array>
 
 #include "GuiInterface.h"
@@ -53,5 +54,4 @@
 
 private:
-  flair::core::Socket *outputSocket;
   std::string outputAddress;
   int outputPort;
@@ -60,4 +60,5 @@
 
   void Initialize();
+  void ParametersParse(const std::string& parametersString, std::array<float, 6>& parametersFloat);
 };
 
