Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Embedded if statements?

  1. #11
    Joe (Moderator) joecar's Avatar
    Join Date
    Apr 2003
    Posts
    28,403

    Default

    Quote Originally Posted by joecar View Post
    lookup(x, a1,b1, a2,b2, a3,b3, ...)

    let x = MPH/RPM

    then gear = look(x, x0,0, x1,gear1, x2,gear2, x3,gear3, x4,gear4, x5,gear5, x6,gear6, x7,0)
    I just remembered that lookup() interpolates between points... so this may not work in your case.

  2. #12
    Lifetime Member
    Join Date
    Jan 2007
    Posts
    298

    Default

    Quote Originally Posted by Ninety8C5 View Post
    Same here. I would be very interested if someone could work out the values as the PID GM.GEAR doesn't seem to work for the M6.
    I got the values by looking at what RPMS i had at different speeds and different gears.

    This can also be done by calculation instead of observation.

  3. #13
    Lifetime Member
    Join Date
    Jan 2007
    Posts
    298

    Default

    Quote Originally Posted by joecar View Post
    I just remembered that lookup() interpolates between points... so this may not work in your case.
    When I get home maybe I will look to see if EFI Live has an interger or round function.

  4. #14
    Lifetime Member
    Join Date
    Jan 2007
    Posts
    298

    Default

    "iff({SAE.VSS.mph}/{SAE.RPM} > 0.0357 && {SAE.VSS.mph}/{SAE.RPM} < 0.0445,6,iff({SAE.VSS.mph}/{SAE.RPM} > 0.0255 && {SAE.VSS.mph}/{SAE.RPM} < 0.029857,5,iff({SAE.VSS.mph}/{SAE.RPM} > 0.01881 && {SAE.VSS.mph}/{SAE.RPM} < 0.022,4,iff({SAE.VSS.mph}/{SAE.RPM} > 0.014625 && {SAE.VSS.mph}/{SAE.RPM} < 0.0165,3,iff({SAE.VSS.mph}/{SAE.RPM} > 0.0108 && {SAE.VSS.mph}/{SAE.RPM} < 0.0121,2,iff({SAE.VSS.mph}/{SAE.RPM} > 0.0075 && {SAE.VSS.mph}/{SAE.RPM} > 0.007857,1,0))))))"

    I think I have the wrong numbers or I have the syntax wrong and it isn't running right. Kinda shows the idea though. it hits 1 3 5 6 on my stored log. I want to test in real life but my lappy battery is dead. i ordered a new one and the fedex terminal is so far away...

    I would suppose a 3,73 M6 would like these numbers better


    First=====Second=====Third=====Fourth=====Fifth=== ==Sixth
    0.0075===0.0108===0.014625====0.018=====0.0255==== 0.0375
    0.00785===0.0121===0.0165=====0.022====0.02985==== =0.044

  5. #15
    Lifetime Member
    Join Date
    Jan 2007
    Posts
    298

    Default

    Got my first mistake. I wrote up the equation for me with the 373 numbers. Guess that makes it easy for you. Maybe if I plug MY correct gear in there it will work better for me. lol

    This site is useful btw
    http://www.f-body.org/gears/

Page 2 of 2 FirstFirst 12

Posting Permissions

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