CombatCQB Posted February 10, 2008 Author Share Posted February 10, 2008 Yup, the one that tells you how much gas you're wastin. I'm sure we can find a similar serial line for 07-08 if we look at how the navi is connected. Link to comment Share on other sites More sharing options...
Guest Posted February 10, 2008 Share Posted February 10, 2008 Now obvious idea for a product - you should start making and selling inline adapter with some dip-switches (for ease of use) that would allow people with bigger injectors get back proper mpg readings.... Link to comment Share on other sites More sharing options...
FLPerf393 Posted February 10, 2008 Share Posted February 10, 2008 on my 08 it's not integrated in the gage cluster but is displayed on a screen below the center cubby (non gt, no navi) so the stream is continuous? or there is a 50ms break between packets? if there is a 50ms break, how i have the software written will only open the comm port when it detects data and will only allow x amout of bytes in as 1 stream. with my string generator i have the timer set to send a stream every 50ms and my stream parser breaks it up in to it's respective places flawlessly. it can be started and stopped whenever with no ill effect on data. anymore info on temperature? as for adjusting for larger injectors, this can be done in the software by manipulating the data Link to comment Share on other sites More sharing options...
CombatCQB Posted February 10, 2008 Author Share Posted February 10, 2008 Let me rephrase: The packets are sent every 100ms (10Hz) or so, each packet takes about 45ms of that 100ms cycle. The rest of the 100ms cycle is quiet. The packets are repeated in this fashion "continuously" from the point the car is started to when the engine is turned off. I've been working on the HW for a little bit so don't have more info on the temp yet. I'll take a look today to see what I can find out. The easiest way to comp for large injectors is to have a formula or a look up table. We'll need to have some fixed data points (i.e. 3rd gear, 40MPH) to compare stock and upgraded injectors. This will hopefully tell us if the offset is linear or something more involved. Link to comment Share on other sites More sharing options...
Guest Posted February 10, 2008 Share Posted February 10, 2008 I'd say pm edmundu he knows tuning and knows how the injectors are scaled in ECU. I'd guess it's linear so no need for lookup tables or funny formulas. Link to comment Share on other sites More sharing options...
FLPerf393 Posted February 10, 2008 Share Posted February 10, 2008 excellent. In VB I set MSComm1.RThreshold to the length of the stream (my stream is 24, it will have to be changed to the length of the real stream). I made a few functions, one for each byte we want to look at. In the MSComm_OnComm event i put all my coding to call the functions and post the data in a few text boxes. no need for a timer to poll for data, my guess is the length of the stream never changes so unless the threshold is met exactly it does nothing with the data. Link to comment Share on other sites More sharing options...
CombatCQB Posted February 10, 2008 Author Share Posted February 10, 2008 Can you explain how you're detecting the start of a packet? i.e. if the first byte you received is the checksum from the last packet, how does the code know the next byte will be the temp data from a new packet? Link to comment Share on other sites More sharing options...
FLPerf393 Posted February 10, 2008 Share Posted February 10, 2008 i'm not using anything to detect the start of the stream. the oncomm event fires only if it senses data comming in. setting the threshold to the length of the stream it works without a hitch. because the stream is sent only every 100ms and not continuously, the "break" we do get is the start of the stream. If for some reason the length of the stream gets screwed up, i have not accounted for and i'm looking in to that. but like i said at this point, i can start and stop my parsing app at any time while the stream is comming in and it works perfectly EDIT: well i got it to error by starting and stopping it really fast. time to re-think EDIT 2: Using this If Not Len(buffer) = 24 Then GoTo err effectivly if the data length doesn't equal the correct length it skips it and waits for a new stream. The 24 is the length of my mock stream for now. Link to comment Share on other sites More sharing options...
CombatCQB Posted February 11, 2008 Author Share Posted February 11, 2008 Here is my analysis of the temperature data: http://spreadsheets.google.com/pub?key=pbu2njZZpkg-DLIJVouqZJQ It seems that every 9th and 10th data point produces the same temperature value. It is based on the data that I did replicate on my trip meter (green highlight) and I manually filled in the rest after seeing the pattern. I can't explain why this is the case, but I'm 99% sure the pattern is correct. It would be nice to have a simple formula to replicate this in our code, but have to think on it a little to come up with one. Edit1============= This pattern lines up with every 5th and 6th decimal value of the input data (i.e. 25,26,35,36). If we create an xy plot we see the steps generated and we can divide this up into linear segments; so 20-25 is linear, 26-35 is linear, 36-45 is linear. We could write a switch statement that will recreate these segments: switch(input) { case: 20<input<26 temp = -22 + (input - 20) case: 25<input<36 temp = -17 + (input - 26) . . . default error in temp input data } Edit2============================== The hex data is in centigrade. See post #47 for details: http://www.legacygt.com/forums/showpost.php?p=1700402&postcount=47 Link to comment Share on other sites More sharing options...
FLPerf393 Posted February 11, 2008 Share Posted February 11, 2008 That code will work fine. It'll write something up in VB. I also gotta make a real hex to decimal converter that takes in to account for letters. EDIT: Writing this code is monotonous, it's a shame the data isn't linear, subaru dropped the ball on this one.... Link to comment Share on other sites More sharing options...
Penphoe Posted February 11, 2008 Share Posted February 11, 2008 Japan being a metric unit country (like Canada and many other countries around the world), I wonder if the hex values are based off of celcius units? LaterZ! Darren!! Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2008 Share Posted February 11, 2008 Japan being a metric unit country (like entire world except U.S, Liberia and Burma), I wonder if the hex values are based off of celcius units? LaterZ! Darren!! fixored https://www.cia.gov/library/publications/the-world-factbook/appendix/appendix-g.html Link to comment Share on other sites More sharing options...
Penphoe Posted February 11, 2008 Share Posted February 11, 2008 Anyway, back to the units thingey. I wonder if anyone has a metric trip meter clock that could be plugged into to see what it outputs based on the hex input stream. Here's a quick spreadsheet that I threw together that converts F to C. I show two C columns - one rounded up without any decimal precision, the other column with two decimal places. http://spreadsheets.google.com/pub?key=pqcYtsjv_NcaGNER1i-RFTA LaterZ! Darren!! Link to comment Share on other sites More sharing options...
Guest Posted February 11, 2008 Share Posted February 11, 2008 Pm member zuczek. He tried to hook up a metric gauge cluster to a U.S. trip computer I think and he got temperature displayed correctly, so that would confirm that the temperature is sent in encoded C. Link to comment Share on other sites More sharing options...
nemo Posted February 11, 2008 Share Posted February 11, 2008 USDM cars can't set the Trip Meter to display temperature in C if they wanted to? If you don't vote Trump, out, you're a bigot who hates america. Link to comment Share on other sites More sharing options...
FLPerf393 Posted February 11, 2008 Share Posted February 11, 2008 Okay, that code is all done and from what i can tell works very good. Takes the incomming hex val converts it over to decimal, selects a case depending on decimal val and converts to temp. Link to comment Share on other sites More sharing options...
FLPerf393 Posted February 11, 2008 Share Posted February 11, 2008 if it's in centigrade imma be pissed, i spent 30mins typing that crap out! hah Link to comment Share on other sites More sharing options...
Penphoe Posted February 11, 2008 Share Posted February 11, 2008 Even though I'm Canadian, I grapped a US car because it was oh-so-much cheaper than if I were to buy a local car for myself. If anything, I'm getting use to the imperial units on my car - especially with the interior and exterior temperature gauges. The US trip meter is different than the metric trip meter. The units are pretty well much hard-coded into it. When I pulled out my trip meter to do my boost gauge install, I noticed that the LCD display is unit specific. Just like the Speedo cluster is unit specific. At least I didn't have to change out my cluster as it has km/h units on the "inner" ring. LaterZ! Darren!! Link to comment Share on other sites More sharing options...
CombatCQB Posted February 11, 2008 Author Share Posted February 11, 2008 I tried matching the hex values to centigrade, it doesn't work when I tried it. Link to comment Share on other sites More sharing options...
FLPerf393 Posted February 11, 2008 Share Posted February 11, 2008 Thats a relief. Hopefully I can put the code all togeather tomorrow night and test it out in the car friday night. Link to comment Share on other sites More sharing options...
CombatCQB Posted February 11, 2008 Author Share Posted February 11, 2008 Alright, I was wrong. Each hex value = 0.5C Sorry dude. So the formula for centigrade is C = -30 + (dec value - 20)*0.5 Then the standard C>F conversion applies. Damn my imperialistic mind! Updated spreadsheet: http://spreadsheets.google.com/pub?key=pbu2njZZpkg-DLIJVouqZJQ Link to comment Share on other sites More sharing options...
FLPerf393 Posted February 11, 2008 Share Posted February 11, 2008 Eeeffff.. No biggie, makes the code alot neater and faster. The whole time I was writing it I thought to my self, this doesn't make sense, why would they go though this nightmare to get temp. Link to comment Share on other sites More sharing options...
Penphoe Posted February 12, 2008 Share Posted February 12, 2008 I used the formula C = (F - 32) * 5/9 Anyway, I asked in the Canada forum if their temp display shows a decimal point or not. Nope, whole numbers only. LaterZ! Darren!! Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2008 Share Posted February 12, 2008 I used the formula C = (F - 32) * 5/9 Anyway, I asked in the Canada forum if their temp display shows a decimal point or not. Nope, whole numbers only. LaterZ! Darren!! Interestingly the ACC controls on metric cars display a decimal point (half degrees). Link to comment Share on other sites More sharing options...
CombatCQB Posted February 12, 2008 Author Share Posted February 12, 2008 Well either way, the 0.5C scale matches up and we know how the F scale works too. So it seems that the fahrenheit display is more precise than the centigrade display even though the data itself has the precision. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.