Page 1 of 5 12345 LastLast
Results 1 to 10 of 43

Thread: A Working RR Trip Meter

  1. #1
    Constant Bitrate ashgrovered's Avatar
    Join Date
    Jul 2005
    Location
    Brisbane Australia
    Posts
    150

    Thumbs up A Working RR Trip Meter

    When I get out of town on some of my 4WD trips I use my Car Speedo’s trip meter either for resetting to 0.0 at the beginning of a track where I am looking for a track or turnoff that is not always marked on the map. I also use it to calculate fuel consumption especially in long sandy trips where the fuel consumption is greater than normal.

    This got me thinking about making a RoadRunner screen with 2 or 3 trip meters, where you can either set the starting value to 0.0 and have it count up or set a distance and have it count backwards.

    I have now got a basic working trip meter but need to get some feedback as to what to do next.

    As a prototype I just used AutoIT as I don’t have any VB skills. This is the logic to how it works.

    Read GPSLAT & GPSLON from RR work out the distance between this lat and long and the previous set you read. Add the difference to a counter.

    then send the value of the counter back to RR as a custom label

    On a test run in the car today over 12km on my Speedo I got 12.04 one-way and 12.02 in reverse

    One thing I did notice that will have to be added to the code is not to increment the counter if the speed is less that 1km, sitting at the lights I was getting very small increments but over time they could add up

    --------------------------------------------------------------------------
    $pi = 3.14159265358979
    $counter1 = 0.00
    $lat2 = rrget ("GPSLAT")
    $lon2 = rrget ("GPSLON")

    while 1
    $lat1 = rrget ("GPSLAT")
    $lon1 = rrget ("GPSLON")
    $dist3 = distance($lat1, $lon1, $lat2, $lon2)
    ;swap the points ready for next calculation
    $lat2 = $lat1
    $lon2 = $lon1
    $counter1 = $counter1 + $dist3
    rrsnd ("!MYCTR", $counter1)
    sleep(1000)
    wend
    exit

    I have the following AutoIt functions

    rrget – will read a label from RR
    rrsnd – will send back to RR a custom label
    distance – calculates the distance between ($lat1, $lon1, $lat2, $lon2)

    rrget and rrsnd were written by @cool dude back in march when I was playing around with getting a compass working, and he changed the VB SDK example so you can talk to the SDK it without the VB form.
    --------------------------------------------------------------------------

    All the mathematics are in the distance function
    I found on the www a few different ways to calculate the distance between 2 geographical coordinates; I have used a formula that is based on spherical trigonometry which is supposed to be more accurate than some of the others

    I would also like to see Average speed as a label

    Why I have posted is to get some feedback on what to do next

    Are there enough people that would like to have a trip meter as part of RR in which case we can ask Guino to add it to RR

    Or I just continue using AutoIT and finish off the development myself and release it when I finish my 4WD skin

    Thinking outside the box and on a comment Rustyboxx made is if you have 3 or 4 trip counters you could assign one for work mileage and save the counter to a file when you exit RR, probably even a description of the work trip.

    Your comments and thoughts

  2. #2
    Variable Bitrate gameboy's Avatar
    Join Date
    May 2005
    Location
    Elizabeth City, NC
    Posts
    294
    subscribed
    95 Mazda Protege LX
    Worklog
    Overall [Project Dead] 0%

    2003 Nissan Altima
    [XXXXXXXX--] 80% Planning
    [XX--------] 20% FABRICATION/INSTALLATION

    Worklog

  3. #3
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Maybe also have a variable gauge that by clicking will cycle through displays of things like:
    Average speed
    Time traveling
    Current speed (To have it on the same page for ease)
    Average time/distance between stops

    and other such things that could maybe be customized.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  4. #4
    Poet Laureate rustyboxx's Avatar
    Join Date
    Feb 2005
    Location
    The Côte d'Azur of England - Hot totty central
    Posts
    1,289
    This is a great idea Ash and one that would appear to have quite a few possibilities as Toaster pointed out. Excellent work on getting the complicated maths sussed, I can't believe you got it working and tested in such a short time.

    I'll be keeping a close eye on this and encourage other members to express their interest and opinion as this is a feature that is well overdue.

    Ash, I've got another idea for your 4wd skin if you get time. Catch me on msn later
    Only true postwhores remember everything they post

    REP CLUB IS DEAD
    LONG LIVE REP CLUB

  5. #5

  6. #6
    Banned JagPuter's Avatar
    Join Date
    Apr 2006
    Location
    My Garage
    Posts
    128
    Very interesting, subscribing to this idea

  7. #7
    FLAC ShawJohn's Avatar
    Join Date
    Aug 2004
    Location
    On the edge!
    Posts
    1,790
    good idea

  8. #8
    Poet Laureate rustyboxx's Avatar
    Join Date
    Feb 2005
    Location
    The Côte d'Azur of England - Hot totty central
    Posts
    1,289
    Ash, I just posted a link to this thread on DC. Hope you don't mind
    Only true postwhores remember everything they post

    REP CLUB IS DEAD
    LONG LIVE REP CLUB

  9. #9
    FLAC Griff1's Avatar
    Join Date
    Nov 2005
    Location
    Midlands
    Posts
    1,052
    Maybe Tissy in the RR clock thread could add the info you want to a screen in 1 of his flash clocks.
    Great Idea BTW
    Nice1 Ash

  10. #10
    Poet Laureate rustyboxx's Avatar
    Join Date
    Feb 2005
    Location
    The Côte d'Azur of England - Hot totty central
    Posts
    1,289
    Ash, if you need a willing volunteer to test this.........
    Only true postwhores remember everything they post

    REP CLUB IS DEAD
    LONG LIVE REP CLUB

Page 1 of 5 12345 LastLast

Similar Threads

  1. Dialup in RR without Phoco?
    By kbreeden in forum Road Runner
    Replies: 6
    Last Post: 12-12-2005, 08:04 PM
  2. Generalized Perception of RR from a new user
    By replicant in forum Road Runner
    Replies: 2
    Last Post: 11-15-2005, 10:41 PM
  3. Anyone have Hebrew Characters working in RR?
    By Chita79 in forum Road Runner
    Replies: 1
    Last Post: 10-20-2005, 01:17 PM
  4. Replies: 5
    Last Post: 10-05-2005, 10:34 AM
  5. RR Link not working
    By ShawJohn in forum Road Runner
    Replies: 12
    Last Post: 09-16-2005, 05:04 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
  •