Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions boatdclient/boatd_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down Expand Up @@ -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))