Page 1 of 25 1234567891011 ... LastLast
Results 1 to 10 of 246

Thread: Milage plugin - trip meter and fuel consumption

  1. #1
    Low Bitrate festy's Avatar
    Join Date
    Jun 2006
    Location
    Sydney, OZ
    Posts
    109

    Milage plugin - trip meter and fuel consumption

    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.



    Files:
    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.


    Buttons:
    ========
    MILAGE_0-MILAGE_9
    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


    Labels:
    =======
    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

    Indicators:
    ===========
    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.



    UPDATE:
    --------
    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.
    Attached Images Attached Images   
    Attached Files Attached Files

  2. #2
    Low Bitrate
    Join Date
    Aug 2005
    Location
    Athens,Greece
    Posts
    63
    Quote Originally Posted by festy View Post
    Both metric and imperial units are supported, based on the isunits line in RR.ini.
    Hello Festy,

    First of all, great work with this plugin!

    Could you please clarify the isunits option? I have used isunits=metric in rr.ini but it seems that it still reports distance in miles instead of km...

    Thanks!
    George

  3. #3
    Low Bitrate festy's Avatar
    Join Date
    Jun 2006
    Location
    Sydney, OZ
    Posts
    109
    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.

  4. #4
    Low Bitrate frangolfgt's Avatar
    Join Date
    Jul 2006
    Location
    Lancs, UK
    Posts
    91
    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

  5. #5
    Low Bitrate festy's Avatar
    Join Date
    Jun 2006
    Location
    Sydney, OZ
    Posts
    109
    Quote Originally Posted by frangolfgt View Post
    Nice, but I have a few questions.

    1) How does the program get its distance, speed and fuel reserves data?
    Distance/speed from GPS.
    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.
    2) Why does inputting the fuel amount and pressing enter do nothing?
    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.
    3) Why does the zero not work?
    Good question - I'll look into that. I hadn't noticed
    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!
    Working on a readme, I agree it needs one...

    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.

  6. #6
    Low Bitrate
    Join Date
    Aug 2005
    Location
    Athens,Greece
    Posts
    63
    Quote Originally Posted by festy View Post
    Distance/speed from GPS.
    For fuel, the idea is that you fill up your tank, and reset the trip meter.
    Hello Festy,

    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.

    Thanks,
    George

  7. #7
    SMKFree liquid_smoke's Avatar
    Join Date
    Aug 2003
    Location
    Chicago
    Posts
    4,842
    do you think you could add a calc like this into your app

    http://www.unfocusedbrain.com/projec...es_per_dollar/
    01101100 01101001 01110001 01110101 01101001 01100100 01011111 01110011
    01101101 01101111 01101011 01100101

    beer replenishment fund
    http://www.mp3car.com/vbulletin/rr-faq/
    mp3car live search

    i have joost invites, just hit me up for one.

  8. #8
    Low Bitrate festy's Avatar
    Join Date
    Jun 2006
    Location
    Sydney, OZ
    Posts
    109
    Quote Originally Posted by liquid_smoke View Post
    do you think you could add a calc like this into your app

    http://www.unfocusedbrain.com/projec...es_per_dollar/
    I'd thought about adding that function - mainly so I could keep track of what I'd paid per liter of fuel on big trips, and overall costs of trips etc.
    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?

  9. #9
    FLAC mauri's Avatar
    Join Date
    Jan 2004
    Posts
    1,039
    Which complete and exact string needs to write for making the loading of your plugin in the Menu.skin?

    Mauri

  10. #10
    Low Bitrate festy's Avatar
    Join Date
    Jun 2006
    Location
    Sydney, OZ
    Posts
    109
    to load the plugin in RR, add this to menu.skin:

    Code:
    X,Milage
    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:
    c:\> regsvr32 c:\roadrunner\milage.dll
    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.

    hth

Page 1 of 25 1234567891011 ... LastLast

Similar Threads

  1. A Working RR Trip Meter
    By ashgrovered in forum RR Plugins No Longer Supported
    Replies: 42
    Last Post: 01-06-2007, 12:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •