Milage is an extension plugin for Roadrunner. It adds multiple trip meters,
fuel consumption calculation and logging, and a few other bits and pieces.
The plugin can record trip specifics - such as distance, end time/date and end coordinates.
These details are saved to a CSV. Fuel consumption information is also saved to CSV.
There are 3 trip meters available simultaneously:
Total meter - this is an accumulative meter that is saved between RR restarts. This is the trip meter that the fuel consumption is calculated from. Resetting this meter also resets the average and max speed, as well as the leg meter.
Trip or Leg meter - this is a sub-meter of the Total meter, useful for following trip notes that state "left in 3.4km" kind of thing, can be reset without effecting the total meter.
Work meter - can be started and stopped at will, useful for recording trips for work etc. Completely independant of the other meters.
Fuel consumption is calculated by inputting the quantity of fuel used. The idea being that when you fill up, you enter the litres/gallons it took, and this is used with the Total meter to record a consumption figure, in L/100km or mpg. Entering a fuel quantity will zero the Total meter, ready to start logging the next tank of fuel.
Both metric and imperial units are supported, based on the isunits line in RR.ini.
tripmeter.ini - records Total and work meter values between invocations of RR
tripmeter.log - CSV of recorded trips, fields are end date, end time, total meter,
leg meter, work meter, end lat, end lon
fuel.log - CSV of fuel consumption, fields are date, time, fuel quantity, distance,
mpg or l/100km, lat, lon
Load the Milage plugin on your Menu.skin with the line "X,Milage".
Don't forget to regsvr32 milage.dll as well.
MILAGE_. MILAGE_CLR, MILAGE_OK - buttons for inputting litres, numeric keypad style
RESETTRIP - reset trip meter to zero
RESETTOTAL - reset total meter to zero
RESETWORK - reset work meter to zero
LOGTRIP - write trip details to CSV log
LOGWORK - start/stop recording distance in work meter
FUELUNITS - litres/gallons entered for consumption calculation
MPG - calculated fuel consumption (in l/100km or MPG)
TRIPMETER - distance in km/miles for trip meter
TRIPTOTAL - distance in km/miles for total meter
WORKMETER - distance in km/miles for work meter
MAXSPEED - maximum speed reached on trip
AVSPEED - Average speed for trip
SPEEDUNITS - "km/h" or "mph" string, depending on units in use
CONSUMPUNITS - "l/100km" or "mpg",depending on units in u
WORKREC - indicator showing whether work meter is on/off
my skins aren't too pretty, but hopefuly they give an idea of how it fits together. If you're using the examle skins, load tripmeter.skin, milage.skin is called for the fuel consumption input.
0.6.0.4 - Change Indicator code to new format
0.6.0.3 - debug/testing version (milage_debug.zip)
0.6.0.1 - fixes the RELOADSKIN crash (thx chuck)
0.6.0 - fixes a few more bugs, and implements a couple of new things like min/max distance per update, tripmeter saving.
isuntis is a true/false directive.
use isunits=true for metric, false for imperial.
Or, use rrconfig, and tick the "international standardized units" box.
Once you set that, everything should be metric - speeds, distances, and fuel quantities.
Nice, but I have a few questions.
1) How does the program get its distance, speed and fuel reserves data?
2) Why does inputting the fuel amount and pressing enter do nothing?
3) Why does the zero not work?
4) Can you supply these answers in a readme that comes with the download? because I think it needs one for dumb people like me!
Sorry if the answers are obvious. I am testing this out of my car so obviously no gps etc.
One more thing: I have been looking for something like this for ages, thanks for making it
For fuel, the idea is that you fill up your tank, and reset the trip meter. Then, when you fill up next time you punch in the amount of fuel it took to fill, and the plugin works out your fuel economy based on how far you travelled and how much fuel it took to fill the tank.
If you don't have a GPS hooked up, your trip meter won't be recording any distance, so it can't work out an economy. Providing you hve a distance in the trip meter and a quantity of fuel input, pressing enter will add a line to the file "fuel.log" in your roadrunner dir, which is a CSV with the stats, ready to import into excel or whatever.2) Why does inputting the fuel amount and pressing enter do nothing?
Good question - I'll look into that. I hadn't noticed3) Why does the zero not work?
Working on a readme, I agree it needs one...4) Can you supply these answers in a readme that comes with the download? because I think it needs one for dumb people like me!
It's not really going to work too well without a GPS - if you're testing without one, it might be worth using a GPS simulator like the one included in GPSgate so there's data coming in.
The plugin uses GPS data from RR, so make sure you've configured the gps port etc. in RR too.
Thank you for the international option, I have a small comment as well, how about adding some distance countdown fields, like engine service, oil change etc?
Currently, I'm also developing (still learning VB though ) a standalone app that almost does the same thing but it mainly targets vehicle maintanance applications. I am also using two more fields, one that has a ratio with the difference between the car's distance meter and GPS distances (1GPS km/1Car's km) and one with what the car's distance meter should read.
This is mainly useful to service stats in order to check whether GPS has missed any trips, adjust GPS readings (travelling during GPS cold start), etc.
do you think you could add a calc like this into your app
What do you think would be a good way of entering it?
After entering the fuel quantity, another skin with a numpad for entering the price?
Which complete and exact string needs to write for making the loading of your plugin in the Menu.skin?
to load the plugin in RR, add this to menu.skin:
Make sure you have registered the dll on your system first though - for example if you've copied milage.dll to c:\roadrunner\milage.dll:Code:X,Milage
If you load the tripmeter.skin and only the Current speed is working, the plugin either isn't registered or loaded. If the Currnent speed isn't working either, then there's a problem with the RR talking to the GPS.Code:c:\> regsvr32 c:\roadrunner\milage.dll