diff options
Diffstat (limited to 'src/waypoint.cc')
-rw-r--r-- | src/waypoint.cc | 13 |
1 files changed, 13 insertions, 0 deletions
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)) {} |