Clew is a chart plotting program. Connect a GPS to your laptop, load some
maps, and watch the dots crawl across the map as you drive, sail, etc. It
currently works with maps scanned/photographed into the computer and any
GPS with NMEA output.
Probably not suitable for navigation.
Screenshots
(click on the thumbnail - or on the map snippet on right - to see more) | DownloadDownload current version (0.2a). (Old versions: 0.1) |
demo = True
import
log
demo_fixes = log.read("filename.log")
import log
demo_fixes = log.play("filename.log",
timefactor=1)
batch = True
demo = True
import gpsmgr_track
demo_fixes =
gpsmgr_track.read("filename.track")
import gpsmgr_track, log
demo_fixes = log.play("filename.track",
timefactor=1, parser=gpsmgr_track.read)
batch = True
Two different map formats are supported: native clew and (new in version 0.2) GPSy.
(new in version 0.2) There is an optional 'adj' field; any values listed in the adj field are added to the corresponding values in each of the points. Thus, they can be used to fine-tune georeferencing (for instance, for a different datum).# Image data for clew
{
'points': (
{'x': 252, 'y': 871, 'lat': "38 19 S", 'long': "145 12 E"},
{'x': 1229, 'y': 866, 'lat': "38 19 S", 'long': "145 13 E"},
{'x': 1235, 'y': 2092, 'lat': "38 20 S", 'long': "145 12.5 E"}
)
}
If the position offset is known, one can instead use# Image data for clew
{
'points': (
{'x': 252, 'y': 871, 'lat': "38 19 S", 'long': "145 12 E"},
{'x': 1229, 'y': 866, 'lat': "38 19 S", 'long': "145 13 E"},
{'x': 1235, 'y': 2092, 'lat': "38 20 S", 'long': "145 12.5 E"}
),
'adj': {'x':7, 'y':-3}
}
'adj':
{'lat': "0 01 N", 'long': "0 02 E"}.
.JPG and .JPG Calibrations_
files.
# are comments (or commented-out variations). Sample:
""" User config - sets various options """
# the directory which contains the map files (relative to current directory)
mapdir = "Hastings"
# 0=tiny (1 pixel), 1=small (3x3), 2=medium (5x5), 3=large (7x7), 4=XL (9x9)
marksize = 3
# RGB colour
markcolour = (255, 0, 0) # bright red
#markcolour = (229, 22, 84) # a kind of red, not as garish as (255, 0, 0)
#markcolour = (0x33, 0x33, 0x99) # dark blue
#markcolour = (0x66, 0xdd, 0xdd) # aqua
# should marks be joined with thin lines?
join = True
# RGB colour
#joincolour = (229, 22, 84) # a kind of red, not as garish as (255, 0, 0)
#joincolour = (0x33, 0x33, 0x99) # dark blue
#joincolour = (0x66, 0xdd, 0xdd) # aqua
joincolour = (255, 255, 255) # white
# size of the output images
tracksize = (1024, 768)
# batch mode - only save the full images at the end, not the partial ones
# during run. This is handy to plot logs and tracks on maps.
batch = False
# demo/testing mode
demo = False
# should the file be saved even if we didn't move? (for testing only)
demo_alwayssave = False
# use one particular location
#demo_fixes = [("38 19.8 S", "145 13 E")] # near Hastings
# re-play a log (at the correct speed)
#import log
#demo_fixes = log.play("demo-log", timefactor=10, maxdelay=2)
# re-play a track (as quickly as possible)
#import gpsmgr_track
#demo_fixes = gpsmgr_track.read("Rarotonga_2004_track")
# the port to which the GPS is connected (eg '/dev/ttyS0')
port = '/dev/ttyUSB0'