-
Posts
564 -
Joined
Content Type
Profiles
Forums
Store
Blogs
Events
Downloads
Supra Articles
Gallery
Everything posted by Andy Blyth
-
You can leave it as-is if you want. The if() function is performing the necessary correction.
-
It does matter! The function if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW') within the COMBINE channels accounts for the fact that the high word has been logged as an unsigned rather than a signed. If you wanted to change it to be correct, you could set the high word to be signed, the low word to be unsigned and then change the COMBINE channels to be along the lines of: GPS LAT COMBINE = ((('GPS LAT HW'*65536)+'GPS LAT LW')/10000000) With the channels set up this way, the HW should show the same value in GDA and i2. The LW will show the same value if it is 32767 or lower, otherwise it will be negative in i2 and positive in GDA. This is not a problem however.
-
Hi Chris There's a couple of things I've noticed in your results: 1: The new combined channels seem to have less precision than necessary. There's only 2 decimal places (52.53) when you need 6-7 places (52.5322745). Is there a way in the GDA software to add more decimal places to GPS LAT COMBINE and GPS LON COMBINE? 2: Even when I try the calc with 52.53, I get a different answer for the actual latitiude. Did you copy the new formula from post 43 or from the notification email? I made a mistake in the original post with the position of the parentheses which will give the wrong result. The formula now in post 43 should be correct.
-
It becomes much easier to read if it's spilt into two steps. First, I'd create a channel called something like GPS_LAT_COMBINE. This would be the first step of converting the two 16 bit numbers into a 32 bit number: GPS LAT COMBINE = combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000 Then the calc for GPS LAT becomes: if(('GPS LAT COMBINE'>=0),((('GPS LAT COMBINE'-floor('GPS LAT COMBINE'))/0.6)+(floor('GPS LAT COMBINE'))),((('GPS LAT COMBINE'-ceil('GPS LAT COMBINE'))/0.6)+(ceil('GPS LAT COMBINE')))) You'd have to create a similar intermediate channel for longitude.
-
Yes it's getting a bit silly now! :-) It would be much easier to understand if it were split into intermediate steps instead of cutting and pasting the same function several times over. I'll have another crack tomorrow.
-
I'm pretty sure this will give -3 rather than -2. You need to use the ceil() function when the number is negative to round up towards 0. The following should use floor() or ceil() appropriately. if(((combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)>=0),(((combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)-(floor(combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)))/0.6)+(floor(combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)),(((combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)-(ceil(combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)))/0.6)+(ceil(combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)))
-
Unfortunately not. It's on the 'todo' list of the manufacturer. For now I use logging on a laptop or logging direct to a USB stick plugged into the ECU.
-
Interesting. I wonder if it's the way the floor function is handling negative numbers. What do you get for floor(-2.3840563)?
-
£240 + VAT is not bad at all. I was expecting about 10x that! I may very well go for that software once I get the ECU up and running and ready for dyno tuning. Probably xmas at the earliest at the rate I'm going though!
-
Thanks for that Chris! It looks like it's exactly what I've been looking for. If you don't mind me asking, what's the damage on the pro version of the software? I can't find it on their website.
-
Have you got a screen capture of the function you're using for the longitude?
-
I went for an Adaptronics e1280s. It's not common at all, but amazingly versatile. Perfect for a tinkerer like myself. If only it had a CAN interface! Thanks Chris, I've attached a trivial logfile I recorded a while ago. It's not from a running engine, it's from a test I was running while trying to debug the triggering settings (hence the oscillating engine speed that should be 6000 RPM solid).
-
On a side note, that GEMS software looks great. I wish my ECU had a CAN output so I could use one of their loggers! I have to do it by hand with .csv files.
-
OK, it looks like you have a floor() function. Try this: (((combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)-(floor(combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000)))/0.6)+(floor(combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000))
-
What am I on about!? Scott's right, you need a function along the lines of RoundDown() or Floor().
-
Do you have a function along the lines of 'div()'? I think you'll need something like this to get the whole number of degrees. You'll need this to apply Scott's formula from the other thread. Failing that, is there a list of all the functions available?
-
try: combine16(if('GPS LAT HW'>32767,('GPS LAT HW'-65536),'GPS LAT HW'),'GPS LAT LW')/10000000 This compares 'GPS LAT HW' with 32767. If it's greater it feeds 'GPS LAT HW'-65536 into combine16, otherwise it just feeds the original value of 'GPS LAT HW'.
-
If GEMS always sees positive numbers, that's not a problem. The high word can be negative or positive, the low word needs to be interpreted as positive. You need to create a maths function that if the high word is greater than 32767, subtract 65536. Then you can combine it with the positive low word.
-
Does the GEMS pro software offer an "IF" function? If it is available, you can check to see if the low word is negative before combining it with the high word. If it is negative, you need to add 65536 (0xFFFF), otherwise just use as-is. I tried the standard GEMS software but couldn't find any way to define maths channels. There doesn't appear to be any detailed documentation on the maths functions online.
-
I would suggest that the fuel is coming from the nitrous / fuel nozzle on your air intake pipe just before the throttle. Take the nozzle out to check. You could have a leaky solenoid valve or have a wiring issue.
-
I get the feeling this won't work when the Low Word has a positive value. I believe that Chris' datalogger is interpreting the 16 bit word on the CAN bus as a signed 16 bit integer when it is an unsigned integer. The number Chris gave was -13983 which is 0xC961 in hex. If this were interpreted as an unsigned integer, you get 51553. If you apply your algorithm to the longitude you get: HiWord = -364 LoWord = 14387 -364 * 65536 = -23855104 14387 + 65535 = 79922 -23855104 + 79922 = -23775182 -23775182 / 10^7 = -2.3775182 Mins/secs = 0.3775182 0.3775182/0.6 = 0.629197 If you change the algorithm to treat the low word as an unsigned integer (the high word must stay signed to differentiate between N/S and E/W) and don't add 65535: HiWord = -364 LoWord = 14387 -364 * 65536 = -23855104 -23855104 + 14387 = -23840717 -23840717 / 10^7 = -2.3840717 Mins/secs = 0.3840717 0.3840717/0.6 = 0.6401195 Which is much closer! Chris, do you have some more ECU output to real world position conversion examples? It will be necessary to have more than one example to have confidence that the algorithm works for all cases.
-
Hi Chris I would expect that you need to join the high and the low words together to make one 32 bit word. It's probably easier to work in hex or binary when doing this. I would then expect that the least significant bit of this 32 bit word will represent a very small fraction of a degree. You just need to multiply the 32 bit number by this LSB value to get the real world measurement. Be careful with handling negative numbers during the conversion. You may also find that the conversions for longitude and latitude are different as the latitude only needs to encode +/- 90 degrees whereas the longitude needs to handle +/- 180 degrees. If you haven't got an answer tonight, I'll have another look for you. Andy
-
Single pin temp sensor connector, part number
Andy Blyth replied to pezzler's topic in mkiv Technical
90980-11428 -
Yes, the fuel rail will be at 5.2 bar which will make the fuel pump work harder - you'd need to check the datasheet of the pump to ensure that it can flow suffiecent fuel at that pressure. The injectors however would have 5.2 bar on the fuel side and 1.2 bar on the air side so they would only "see" 4 bars across them. They would behave the same way as they would say at idle with for example -0.75 bar on the air side and 3.25 bar on the fuel side. There's still 4 bars across the injector.
-
wanted Low amperage clip on current clamp for oscilloscope.
Andy Blyth replied to Chris Wilson's topic in Other Items
Thanks for that Chris! It certainly seems that you're not getting the current plateau that I was seeing. Things are looking good for the 3-channel igniters! Just for reference, how many mV per Amp was your probe set to? On mine, the most sensitive setting is 100mV/A. This is just to see what the peak current your coils are drawing before the spark. Cheers Andy