From 3df07f7ba7a2d9a9ae4f985e9959c18adca736e5 Mon Sep 17 00:00:00 2001
From: Tommy Persson <@tommy.persson@liu.se>
Date: Thu, 17 Feb 2022 18:06:27 +0100
Subject: [PATCH] Small updates.

---
 src/pyutil/jsonutil.py | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/pyutil/jsonutil.py b/src/pyutil/jsonutil.py
index 48ece03..89f42d6 100644
--- a/src/pyutil/jsonutil.py
+++ b/src/pyutil/jsonutil.py
@@ -1296,13 +1296,11 @@ def json_yaw (ns, heading, use_alias=False, use_lock=False):
     jobj["children"].append(json_basic_yaw(ns, heading, use_alias=use_alias, use_lock=use_lock))
     return jobj
 
-def json_flypath(ns, resps, commanded_speed, speed="", use_alias=False):
-    pathobj = []
-    for resp in resps:
-        pathobj.append({"altitude": resp.alt,
-                        "latitude": resp.lat,
-                        "longitude": resp.lon,
-                        "rostype": "GeoPoint"})
+def json_flypath(ns, geopath, commanded_speed, speed="", use_alias=False):
+    geopath = self.world_to_geo_path(path)
+    resps = [world_to_geo(ns, 40, 0, 20),
+             world_to_geo(ns, 40, 80, 20),
+             world_to_geo(ns, 0, 0, 20)]
     jobj = json_basic_seq(ns, use_alias=use_alias)
     jobj["children"].append(json_basic_flypath(ns, pathobj, commanded_speed, speed=speed, use_alias=use_alias))
     return jobj
-- 
GitLab