From bb0da810d945d98b25390c65ab3f34e695914fd6 Mon Sep 17 00:00:00 2001 From: ccolin Date: Sat, 2 Jan 2021 01:16:06 +0100 Subject: move Drone and Waypoint declarations to their own files --- src/waypoint.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/waypoint.cc (limited to 'src/waypoint.cc') diff --git a/src/waypoint.cc b/src/waypoint.cc new file mode 100644 index 0000000..7acf632 --- /dev/null +++ b/src/waypoint.cc @@ -0,0 +1,13 @@ +#include "waypoint.hh" + + +Waypoint::Waypoint(unsigned frame, QVector3D pos) + :frame(frame), + pos(pos) {} + + +Waypoint::Waypoint(const QJsonObject &json) + :Waypoint(json["frame"].toInt(), + QVector3D(json["position"]["lng_X"].toInt() / 100.0, + json["position"]["alt_Y"].toInt() / 100.0, + json["position"]["lat_Z"].toInt() / 100.0)) {} -- cgit v1.2.3-70-g09d2