diff --git a/ground/openpilotgcs/src/plugins/opmap/flightdatamodel.cpp b/ground/openpilotgcs/src/plugins/opmap/flightdatamodel.cpp
index 5a7b3d1ce..4ca229866 100644
--- a/ground/openpilotgcs/src/plugins/opmap/flightdatamodel.cpp
+++ b/ground/openpilotgcs/src/plugins/opmap/flightdatamodel.cpp
@@ -565,11 +565,14 @@ void flightDataModel::readFromFile(QString fileName)
//TODO warning message
removeRows(0,rowCount());
QFile file(fileName);
+ file.open(QIODevice::ReadOnly);
QDomDocument doc("PathPlan");
- if (!doc.setContent(file.readAll())) {
+ QByteArray array=file.readAll();
+ QString error;
+ if (!doc.setContent(array,&error)) {
QMessageBox msgBox;
msgBox.setText(tr("File Parsing Failed."));
- msgBox.setInformativeText(tr("This file is not a correct XML file"));
+ msgBox.setInformativeText(QString(tr("This file is not a correct XML file:%0")).arg(error));
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.exec();
return;
@@ -616,7 +619,7 @@ void flightDataModel::readFromFile(QString fileName)
else if(field.attribute("name")=="altitude")
data->altitude=field.attribute("value").toDouble();
else if(field.attribute("name")=="velocity")
- data->velocity=field.attribute("value").toDouble();
+ data->velocity=field.attribute("value").toFloat();
else if(field.attribute("name")=="mode")
data->mode=field.attribute("value").toInt();
else if(field.attribute("name")=="mode_param0")
diff --git a/ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp b/ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp
index d11ee753b..192f5b932 100644
--- a/ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp
+++ b/ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp
@@ -143,7 +143,8 @@ void modelUavoProxy::objectsToModel()
myModel->setData(index,wpfields.Velocity);
distance=sqrt(wpfields.Position[Waypoint::POSITION_NORTH]*wpfields.Position[Waypoint::POSITION_NORTH]+
wpfields.Position[Waypoint::POSITION_EAST]*wpfields.Position[Waypoint::POSITION_EAST]);
- bearing=acos(wpfields.Position[Waypoint::POSITION_NORTH]/wpfields.Position[Waypoint::POSITION_EAST])*180/M_PI;
+ bearing=atan2(wpfields.Position[Waypoint::POSITION_EAST],wpfields.Position[Waypoint::POSITION_NORTH])*180/M_PI;
+
if(bearing!=bearing)
bearing=0;
index=myModel->index(x,flightDataModel::DISRELATIVE);
diff --git a/shared/uavobjectdefinition/groundtruth.xml b/shared/uavobjectdefinition/groundtruth.xml
index 0892a11c0..c852754ee 100644
--- a/shared/uavobjectdefinition/groundtruth.xml
+++ b/shared/uavobjectdefinition/groundtruth.xml
@@ -1,18 +1,18 @@
-
-
-
+
+
+