From 08026cc0f45ed71f5d02327ec5d6d0ca976aad4d Mon Sep 17 00:00:00 2001 From: Hector Garcia de Marina Date: Mon, 13 Mar 2017 16:57:04 +0100 Subject: [PATCH] Small bug with the plotting of the sin track at the python App (#2036) --- sw/ground_segment/python/gvf/gvfframe.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sw/ground_segment/python/gvf/gvfframe.py b/sw/ground_segment/python/gvf/gvfframe.py index d12cf63470..92b18a9f07 100644 --- a/sw/ground_segment/python/gvf/gvfframe.py +++ b/sw/ground_segment/python/gvf/gvfframe.py @@ -76,14 +76,11 @@ class GVFFrame(wx.Frame): if int(ac_id) == self.ac_id: if msg.name == 'GPS': self.course = int(msg.get_field(3))*np.pi/1800 - if msg.name == 'NAVIGATION': self.XY[0] = float(msg.get_field(2)) self.XY[1] = float(msg.get_field(3)) - if msg.name == 'ATTITUDE': self.yaw = float(msg.get_field(1)) - if msg.name == 'DL_VALUE' and \ self.indexes_are_good == len(self.list_of_indexes): if int(msg.get_field(0)) == int(self.ke_index): @@ -372,8 +369,8 @@ class traj_sin: xtr = np.linspace(-200, 200, 400) ytr = self.A*np.sin(self.w*xtr + self.off) - xsin = -(xtr-a)*np.sin(self.alpha) + (ytr-b)*np.cos(self.alpha) - ysin = (xtr-a)*np.cos(self.alpha) + (ytr-b)*np.sin(self.alpha) + xsin = -xtr*np.sin(self.alpha) + ytr*np.cos(self.alpha) + a + ysin = xtr*np.cos(self.alpha) + ytr*np.sin(self.alpha) + b self.traj_points = np.vstack((xsin, ysin))