Page MenuHomec4science

simplevmg
No OneTemporary

File Metadata

Created
Sat, Jan 25, 03:08

simplevmg

#!/usr/bin/env python3
import sys, datetime
sys.path.append ('../lib')
from router_v1 import *
boat = Boat(43, 6)
boat.polar = Polar('../polar/so36i.pol')
boat.wind = Wind(90.0, 15.0)
boat.wp = WayPoint(43.1, 6.1)
boat.polar.boatSpeed2(55, 7)
exit(0)
vmg, twa, hdg, speed = boat.bestVmg()
print(' WP Bearing:{0:.2f} Dist:{1:.2f} Nm'.format(boat.azimut, boat.dist))
print(' TWS:{0:.2f}'.format(boat.wind.speed))
print(' TWA:{0:.2f}'.format(twa))
print(' Heading:{0:.2f}'.format(hdg))
print(' boat speed:{0:.2f} Kts'.format(speed))
print(' VMG:{0:.2f} Kts'.format(vmg))
if vmg != 0 :
print(' ETA:{0:.1f} sec = {1:.2f} h'.format(3600*boat.dist/vmg, boat.dist/vmg))

Event Timeline