create-test-paddle 932 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/python
  2. # 42.445512 -76.50726
  3. # 42.444988 -76.506852
  4. # 42.4444 -76.506444
  5. paddle = 6055
  6. dmmc_coord = [ [ 4226.73072, -7630.4356 ],
  7. [ 4226.69928, -7630.41112],
  8. [ 4226.664, -7630.38664] ]
  9. dmmc_name = [ "test route top", "test route mid", "test route bottom" ]
  10. print "# Paddle", paddle, "(testing)"
  11. print "# coodinates in concatinated degree/decimal minute format (dmmc)"
  12. print "#", "\t".join(["hour", "minute", "latitude", "longitude", "route", "trip", "stop", "name"])
  13. even_odd = 0
  14. base_route = 1000
  15. idx=0
  16. for hour in range(24):
  17. for minute in range(0,60,10):
  18. trip = int(minute/10) + 1
  19. route = int(base_route + (even_odd*10))
  20. even_odd = 1 - even_odd
  21. for stop in range(1,4):
  22. v = [str(hour), str(minute+stop), str(dmmc_coord[idx][0]), str(dmmc_coord[idx][1]), str(route), str(trip), str(stop), dmmc_name[idx]]
  23. print "\t".join(v)
  24. idx = (idx + 1) % len(dmmc_coord)