From 23ab189a4caccdc26bd7d6eee382fc65b3fef621 Mon Sep 17 00:00:00 2001 From: thip Date: Mon, 5 Sep 2016 19:14:04 +0100 Subject: [PATCH] clarified wind direction naming --- boatdclient/boatd_client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/boatdclient/boatd_client.py b/boatdclient/boatd_client.py index 551484d..7f24fbf 100644 --- a/boatdclient/boatd_client.py +++ b/boatdclient/boatd_client.py @@ -85,11 +85,11 @@ def wind(self): :returns: wind object containing direction bearing and speed :rtype: Wind ''' - content = self.boatd.get('/wind') + content = self.boatd.get('/relative_wind') return Wind( - Bearing(content.get('direction')) - self.heading, + Bearing(content.get('relative_direction')) - self.heading, content.get('speed'), - Bearing(content.get('direction')) + Bearing(content.get('relative_direction')) ) @property @@ -101,7 +101,7 @@ def relative_wind(self): :returns: wind direction bearing in boat coordinates :rtype: Bearing ''' - return self.wind.direction + return self.wind.relative_direction @property def position(self): @@ -212,7 +212,7 @@ def get_home_position(boatd=None): boat = Boat() print(boat.version) print(boat.heading) - print(boat.wind) + print(boat.relative_wind_direction) print(boat.position) print(boat.rudder(0)) print(boat.rudder(10))