From 37522f78416a6e7d5adff6f1ac7728c0a55783b7 Mon Sep 17 00:00:00 2001 From: STT <8894457+sttdo@user.noreply.gitee.com> Date: Thu, 16 Dec 2021 14:39:34 +0800 Subject: [PATCH] Fix misssion and waypoint mode bug Signed-off-by --- control.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/control.py b/control.py index 3ba9549..30a1bb0 100644 --- a/control.py +++ b/control.py @@ -24,9 +24,10 @@ class Control: self.battery = 0 def update(self, usv): - self.point_current = Point(usv.navigation.data['location']['latitude'], - usv.navigation.data['location']['longitude']) - self.point_desired = Point(usv.gcs.command['desired_latitude'], usv.gcs.command['desired_longitude']) + self.point_current = Point(radians_to_degrees(usv.navigation.data['location']['latitude']), + radians_to_degrees(usv.navigation.data['location']['longitude'])) + self.point_desired = Point(radians_to_degrees(usv.gcs.command['desired_latitude']), + radians_to_degrees(usv.gcs.command['desired_longitude'])) def c_run(self, usv): self.update(usv)