diff options
author | ccolin | 2021-01-02 01:16:06 +0100 |
---|---|---|
committer | ccolin | 2021-01-02 01:16:06 +0100 |
commit | bb0da810d945d98b25390c65ab3f34e695914fd6 (patch) | |
tree | 7ecbfe570db170b72b7e3096f78c3d60d0bf0acd /src/waypoint.cc | |
parent | 861d505606d612bc328534dba3257e9ef9a1c269 (diff) |
move Drone and Waypoint declarations to their own files
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)) {} |