import getposlib as gp import sys, time #Generate with basedatas def baseboat(rid): vlmboatidfirst = 1200 return {'vlmid': -vlmboatidfirst - int(rid)} vlmidrace = 20120610 vlmusernameprefix = "VOR2012_" basefilename = "vor%d" % vlmidrace geotree = gp.GeovoileTree( "http://volvooceanrace.geovoile.com/2011/shared/data/leg8.static.hwz", basefilename) coordfactor = geotree.factors() timezero = 0 # 1339336800 #geotree.timezero() #FIXME (10 jun 2012 - 14:00:00 GMT) boats = geotree.boats() geotree = gp.GeovoileTree( "http://volvooceanrace.geovoile.com/2011/shared/data/leg8.update.hwz", basefilename + "update") for rid in boats.keys(): bb = baseboat(int(rid)) boats[rid]['boatid'] = rid boats[rid]['vlmid'] = -bb['vlmid']
import getposlib as gp import sys, time #Generate with basedatas def baseboat(rid): vlmboatidfirst = 1430 vlmboatridfirst = 59 return {'vlmid': -vlmboatidfirst - int(rid) + vlmboatridfirst} vlmidrace = 20120311 vlmusernameprefix = "SDC2012_" basefilename = "sdc%d" % vlmidrace geotree = gp.GeovoileTree( "http://lasolidaireduchocolat.geovoile.com/2012/shared/data/leg1.static.hwz", basefilename) coordfactor = geotree.factors() timezero = 1331483880 #16:38 (origin of tracks) #geotree.timezero() #FIXME boats = geotree.boats() geotree = gp.GeovoileTree( "http://lasolidaireduchocolat.geovoile.com/2012/shared/data/leg1.update.hwz", basefilename + "update") for rid in boats.keys(): bb = baseboat(int(rid)) boats[rid]['boatid'] = rid
import getposlib as gp import sys, time #Generate with basedatas def baseboat(rid): vlmboatidfirst = 2700 return {'vlmid': -vlmboatidfirst - int(rid)} vlmidrace = 20141102 #vlmidrace = 20141009 vlmusernameprefix = "RDR2014_" basefilename = "vor%d" % vlmidrace geotree = gp.GeovoileTree( "http://routedurhum.geovoile.com/2014/_elements/data/race/static.hwz?v=" + str(int(time.time())), basefilename) coordfactor = geotree.factors() timezero = 0 # 1339336800 #geotree.timezero() #FIXME (10 jun 2012 - 14:00:00 GMT) boats = geotree.boats() geotree = gp.GeovoileTree( "http://routedurhum.geovoile.com/2014/_elements/data/race/update.hwz?v=" + str(int(time.time())), basefilename + "update") for rid in boats.keys(): bb = baseboat(int(rid)) boats[rid]['boatid'] = rid boats[rid]['vlmid'] = -bb['vlmid']
import getposlib as gp import sys, time #Generate with basedatas def baseboat(rid): vlmboatidfirst = 2000 return {'vlmid': -vlmboatidfirst - int(rid)} vlmidrace = 20140406 vlmusernameprefix = "AG2R2014_" basefilename = "ag2r%d" % vlmidrace #http://sodebo-voile.geovoile.com/routedeladecouverte/2012/shared/data/race/update.hwz?v=39778980 geotree = gp.GeovoileTree( "http://transatag2r.geovoile.com/2014/data/race/static.hwz", basefilename) coordfactor = geotree.factors() timezero = 0 # 1339336800 #geotree.timezero() #FIXME (10 jun 2012 - 14:00:00 GMT) boats = geotree.boats() geotree = gp.GeovoileTree( "http://transatag2r.geovoile.com/2014/data/race/update.hwz?", basefilename + "update") for rid in boats.keys(): bb = baseboat(int(rid)) boats[rid]['boatid'] = rid boats[rid]['vlmid'] = -bb['vlmid'] boats[rid]['vlmboatname'] = "%03d - %s" % (rid, boats[rid]['name'])
import getposlib as gp import sys, time #Generate with basedatas def baseboat(rid): vlmboatidfirst = 3901 return {'vlmid': -vlmboatidfirst - int(rid)} vlmidrace = 1581 vlmusernameprefix = "" basefilename = "IDEC-%d" % vlmidrace raceBaseUrl = "http://trimaran-idec.geovoile.com/julesverne/2015/_elements/data/race/" print raceBaseUrl + "static.hwz?v=" + str(int(time.time())) geotree = gp.GeovoileTree( raceBaseUrl + "static.hwz?v=" + str(int(time.time())), basefilename) coordfactor = geotree.factors() boats = geotree.boats() #geotreeLive = gp.GeovoileTree(raceBaseUrl+"leg1.live.hwz?v=" + str(int(time.time())), basefilename+"live") geotreeUpdate = gp.GeovoileTree( raceBaseUrl + "update.hwz?v=" + str(int(time.time())), basefilename + "update") for rid in boats.keys(): bb = baseboat(int(rid)) boats[rid]['boatid'] = rid boats[rid]['vlmid'] = -bb['vlmid'] boats[rid]['vlmboatname'] = "%03d - %s" % (rid, boats[rid]['name']) boats[rid]['vlmusername'] = "******" % (vlmusernameprefix, rid)
'vlmid': 1426 }, 972: { 'vlmid': 1427 }, } if rid in matchid.keys(): return matchid[rid] return {'vlmid': -vlmboatidfirst - int(rid)} vlmidrace = 20120128 vlmusernameprefix = "TSQ2012_" basefilename = "transquadra%d" % vlmidrace geotree = gp.GeovoileTree( "http://transquadra.geovoile.com/2011/data/reports/leg2.gvz", basefilename) coordfactor = geotree.factors() timezero = geotree.timezero() boats = geotree.boats() for rid in boats.keys(): bb = baseboat(int(rid)) boats[rid]['vlmid'] = -bb['vlmid'] boats[rid]['vlmboatname'] = "%03d - %s" % (rid, boats[rid]['name']) boats[rid]['vlmusername'] = "******" % (vlmusernameprefix, rid) if len(sys.argv) > 1 and sys.argv[1] == 'sqlusers': gp.sqlusers(boats, vlmidrace) sys.exit() if len(sys.argv) > 2 and sys.argv[1] == 'basedatas':
import xml.etree.ElementTree as ElementTree import getposlib as gp import sys, time #Generate with basedatas def baseboat(rid): vlmboatidfirst = 1770 return {'vlmid' : -vlmboatidfirst-int(rid)} vlmidrace = 20121003 vlmusernameprefix = "DEC2013_" basefilename = "dec%d" % vlmidrace #http://sodebo-voile.geovoile.com/routedeladecouverte/2012/shared/data/race/update.hwz?v=39778980 geotree = gp.GeovoileTree("http://sodebo-voile.geovoile.com/routedeladecouverte/2012/shared/data/race/static.hwz", basefilename) coordfactor = geotree.factors() timezero = 0# 1339336800 #geotree.timezero() #FIXME (10 jun 2012 - 14:00:00 GMT) boats = geotree.boats() geotree = gp.GeovoileTree("http://sodebo-voile.geovoile.com/routedeladecouverte/2012/shared/data/race/update.hwz?v=39778980", basefilename+"update") for rid in boats.keys() : bb = baseboat(int(rid)) boats[rid]['boatid'] = rid boats[rid]['vlmid'] = -bb['vlmid'] boats[rid]['vlmboatname'] = "%03d - %s" % (rid, boats[rid]['name']) boats[rid]['vlmusername'] = "******" % (vlmusernameprefix, rid)