Skip to content

Commit

Permalink
Small bug with the plotting of the sin track at the python App (#2036)
Browse files Browse the repository at this point in the history
  • Loading branch information
noether authored and podhrmic committed Mar 19, 2017
1 parent d82146f commit bf0ca7e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sw/ground_segment/python/gvf/gvfframe.py
Expand Up @@ -76,14 +76,11 @@ def message_recv(self, ac_id, msg):
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):
Expand Down Expand Up @@ -372,8 +369,8 @@ def __init__(self, Xminmax, a, b, alpha, w, off, A):
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))

Expand Down

0 comments on commit bf0ca7e

Please sign in to comment.