# By Sokar's request, we want to return an invalid value rather than an error response.
return"0"
ifnotextrapolate:
returnstr(result.odometer)
# Current extrapolate strategy is very simple: presume we're going at full speed (45mph).
SPEED=45./3600# in miles per second
delta_t=time-timestamp
delta_odo=delta_t*SPEED
returnstr(result.odometer+delta_odo)
@argh.arg('--host',help='Address or socket server will listen to. Default is 0.0.0.0 (everything on the local machine).')
@argh.arg('--host',help='Address or socket server will listen to. Default is 0.0.0.0 (everything on the local machine).')
@argh.arg('--port',help='Port server will listen on. Default is 8004.')
@argh.arg('--port',help='Port server will listen on. Default is 8004.')
@argh.arg('connection-string',help='Postgres connection string, which is either a space-separated list of key=value pairs, or a URI like: postgresql://USER:PASSWORD@HOST/DBNAME?KEY=VALUE')
@argh.arg('connection-string',help='Postgres connection string, which is either a space-separated list of key=value pairs, or a URI like: postgresql://USER:PASSWORD@HOST/DBNAME?KEY=VALUE')