Recent Topics
Lifeguard 8 and Audi 8hp55
by seanf
27 minutes 41 seconds ago
2008 Tahoe loses power - electrical problem
by pacem
35 minutes 34 seconds ago
How to clean wood trim?
by MajorCavalry
Today at 05:39 PM
Rotella T6 5w40 $12.97 after rebate
by dmiko
Today at 04:30 PM
Drivers not turning left with green light
by Mr Nice
Today at 04:25 PM
Someone hit my car
by Dylan1303
Today at 04:15 PM
Which spark plugs for 92 Olds 88?
by atikovi
Today at 02:54 PM
Electronic spark doesn't work on gas stove
by JLawrence08648
Today at 02:46 PM
Doorbell Button Bulb
by Yah-Tah-Hey
Today at 02:07 PM
AC/Blendoor Problem
by SilverFusion2010
Today at 01:53 PM
Suzuki 2.7L idle noise
by FlyPenFly
Today at 01:52 PM
TSC Rotella...YIKES!
by Greg L
Today at 01:48 PM
New Hampshire Speedway
by Warstud
Today at 01:13 PM
Tree growing from stump?
by edwardh1
Today at 01:02 PM
Kingquad hard shifting
by jay929
Today at 10:58 AM
CVT transmissions
by Gito
Today at 10:31 AM
sunday newspaper paper price increase $2 to $3
by edwardh1
Today at 10:08 AM
Tomatos and peppers
by Quattro Pete
Today at 10:02 AM
Homemade yogurt + probiotics
by onetwoothreee
Today at 09:16 AM
ATF+4 in a Mercedes Transmission! Really?
by Tikka
Today at 09:12 AM
Newest Members
joonyflux, dippschtick, Brdftbll, NievesStefanor, Zervun
65529 Registered Users
Who's Online
87 registered (10ecfarmer, 2002 Maxima SE, 77GrandPrix, 4WD, 13 invisible), 1524 Guests and 29 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
65529 Members
67 Forums
287486 Topics
4795812 Posts

Max Online: 3590 @ 01/24/17 08:07 PM
Donate to BITOG
Topic Options
#4711390 - 03/30/18 10:28 AM Calculating City and highway miles
MoneyJohn Offline


Registered: 03/01/12
Posts: 178
Loc: Southern NY
Just curious if anybody figured out a method to figure out city and highway miles using OBD scan tool. In an ideal case, one would install OBD tool, connect it to android phone with some app and the app does the job.

Not interested in buying $100 OBD device with specialized web platform.

Any idea, pointers?
_________________________
2015 Subaru Forester 2.5i Premium w/ EyeSight
2006 Nissan Sentra 1.8S Special Edition

Top
#4711420 - 03/30/18 10:59 AM Re: Calculating City and highway miles [Re: MoneyJohn]
raytseng Offline


Registered: 12/11/08
Posts: 2366
Loc: CA
normalize using another variable, either fuel used or hours of operation

Top
#4711602 - 03/30/18 02:16 PM Re: Calculating City and highway miles [Re: MoneyJohn]
MoneyJohn Offline


Registered: 03/01/12
Posts: 178
Loc: Southern NY
I would actually know how long the vehicle drives at highway speeds (50mph+) and below. I am not too sure if I could use any other attribute to figure that out.
_________________________
2015 Subaru Forester 2.5i Premium w/ EyeSight
2006 Nissan Sentra 1.8S Special Edition

Top
#4711728 - 03/30/18 05:04 PM Re: Calculating City and highway miles [Re: MoneyJohn]
MoneyJohn Offline


Registered: 03/01/12
Posts: 178
Loc: Southern NY
Typo edit, since I can not edit the post above,

Actually, I would like to know how long the vehicle drives at highway speeds (50mph+) and below. I am not too sure if I could use any other attribute to figure that out.
_________________________
2015 Subaru Forester 2.5i Premium w/ EyeSight
2006 Nissan Sentra 1.8S Special Edition

Top
#4711777 - 03/30/18 06:21 PM Re: Calculating City and highway miles [Re: MoneyJohn]
bullwinkle Offline


Registered: 10/09/04
Posts: 7744
Loc: Cincinnati, OH, USA
I almost wonder if a GPS could calculate speed vs. time somehow, they seem to be able to do similar stuff.
_________________________
06 Ram 3500 CTD 4X4(FG Venturi), 93 GMC C3500 6.2, 89 F-450 7.3, 98 XJ 4.0(XG8A), 05 xB(XG3600), 15 Transit 3.7, 03 Merc Grand Marquis 4.6 2V(XG2)

Top
#4711838 - 03/30/18 08:18 PM Re: Calculating City and highway miles [Re: MoneyJohn]
JeepWJ19 Offline


Registered: 09/09/15
Posts: 955
Loc: PENNSYLVANIA
Hi, Software Engineer here :]

It's funny you mention this because one of the projects that I'm working on involves smartphone app talking to a vehicle through bluetooth interface (except mine deals with asking for J1939 codes and I have direct access -> no OBD interface smile ). Funny how things like these pop up :]

So, first off, have you looked at the Torque pro app? I am not familiar with it but it may already be able to do logging. Also, you would need a bluetooth OBD device, as I'm not currently aware of any Bt->wired->phone capabilities.

So that bluetooth OBD module is usually just a messenger. Usually it just wants to pair with something, and it just spits out data per request. So to put it as simply as possible, you would need an app that could pair the phone with the Bluetooth OBD device. The devices you can get sold usually are for mass market people like us and usually they are made to connect with apps like Torque Pro etc. so there shouldn't be any pairing issues like needing to decrypt a uuid with a secret key or any of that. The biggest problem you will face is how to talk to the reader and of course, developing the app.

Overall, my suggestion would be:
You generally have a speed cut off on highways, it's usually greater than or equal to 65mph. Unfortunately there are sections where it can be reduced to 55 mph and you can always have stand still traffic.

So first off, you should talk to the OBD device for speed, fuel, rpms etc. Log it all.

Now the tough part for you to figure out if it's highway driving.....
So I stated above you have a general cut-off of 65mph but there are some other factors that it isn't always the case. Guess what most phones come with now? GPS! :]

So if you wanted, you could compare data and look at GPS locations and type them into google and it will show you where it located. If this is for daily commuting, you could set ranges of GPS locations as 'highway miles' and the other data will be treated as city.

It is good to have redundant data from two sources, as it will allow you to check integrity of the data!

Heck if you really wanted to get fancy, you could probably check tire wear as well. OBD should be able to tell you the revolutions of the tires. If your car has a TPMS you could even find out the pressure. -> Compare the revolutions on your tires from the OBD and compare that to the GPS speed that you calculate and you can see (1): is your car reporting the right speed (2): monitor it over time and as your tires wear, the smaller the diameter, the more revolutions you make.

Heck you could figure out which sections have hills based on how fuel using traveling at the same speed.

You could also record which sections of roads are loudest by recording on your phone and normalizing that data with road speed.

You might even find out the drag from rough road surfaces: higher gps speed on a time scale too low for wear. The scaling is important because on longer scales tire wear can create a similar difference in data. -> Long term changes are wear and short term changes are not.

With all the data, you'd be able to determine if it rained, snowed, or a dry day.

With all the data, you could use it to find out just about anything smile
_________________________
2002 Jeep WJ 4.0 | Mobil 1 HM 5w30 |
TG8A | 2.5" lift | 148k miles

Software Engineer :]

Top
#4711853 - 03/30/18 08:32 PM Re: Calculating City and highway miles [Re: bullwinkle]
eljefino Offline


Registered: 06/15/03
Posts: 32775
Loc: ME
Originally Posted By: bullwinkle
I almost wonder if a GPS could calculate speed vs. time somehow, they seem to be able to do similar stuff.


Do this and you won't have to re-engineer the system for the next vehicle you use.

Set up a cron job to log speed every second and then graph the incoming data in a spreadsheet.

Top