def steer(a): print "Steering wind angle: ", round(rad_to_deg(a), 2), sys.stdout.flush() do_steer_wind(a) while abs(boat.wind_angle - a) > 0.001: sys.stdout.write(".") sys.stdout.flush() time.sleep(1) fetch_boat(boat) print " Done." time.sleep(10)
""" This scripts prints the status of the currently configured sol boat Author: Jaap Versteegh <*****@*****.**> """ import sys, os # Add softsailor to the python path sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from softsailor.utils import * from softsailor.boat import SailBoat from softsailor.sol.sol_functions import fetch_boat, get_settings boat = SailBoat() fetch_boat(boat) settings = get_settings() if settings.chart == '': area = settings.area print "Map tiles : ", settings.tilemap, \ lat_to_str(area[0]), lat_to_str(area[1]), \ lon_to_str(area[2]), lon_to_str(area[3]) else: print "Chart : ", settings.chart print "Weather : ", settings.weather print "Boat latitude : ", lat_to_str(boat.position[0]) print "Boat longitude: ", lon_to_str(boat.position[1]) print "Boat heading : ", ang_to_str(boat.heading)
This scripts prints the status of the currently configured sol boat Author: Jaap Versteegh <*****@*****.**> """ import sys, os # Add softsailor to the python path sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from softsailor.utils import * from softsailor.boat import SailBoat from softsailor.sol.sol_functions import fetch_boat, get_settings boat = SailBoat() fetch_boat(boat) settings = get_settings() if settings.chart == '': area = settings.area print "Map tiles : ", settings.tilemap, \ lat_to_str(area[0]), lat_to_str(area[1]), \ lon_to_str(area[2]), lon_to_str(area[3]) else: print "Chart : ", settings.chart print "Weather : ", settings.weather print "Boat latitude : ", lat_to_str(boat.position[0]) print "Boat longitude: ", lon_to_str(boat.position[1]) print "Boat heading : ", ang_to_str(boat.heading)