Trying to setup my system to turn on a light for brake lockup on the fronts and another on the rear.
System is the mk3
I have 1 light setup on output driver 1 and another on 2.
I figure I could just divide carspeed over wheelspeed and then if then have a trigger value of .5 or something.
How do I set it up so that either left or right would make it go on?
Thanks,
Math help for brake lockup
Not sure of the exact logic in the Mk3, but it is an OR statement inside an IF statement.
If I where doing this in excel:
IF(OR(left lock, right lock),Light turns on)
Left Lock = carspeed/wheelspeed>0.05 (or something, need to experiment)
IF(statement, true statement consequence, false statement consequence)
OR(statement A, Statement B) - either is true then OR is true
If I where doing this in excel:
IF(OR(left lock, right lock),Light turns on)
Left Lock = carspeed/wheelspeed>0.05 (or something, need to experiment)
IF(statement, true statement consequence, false statement consequence)
OR(statement A, Statement B) - either is true then OR is true
BMW 2000 M Coupe
Support
Hello,
I would do it like this...
IF(IF(VAR_0407>2,avg(VAR_0300,VAR_0301,VAR_0302,VAR_0304),VAR_0414)-(min(VAR_0300,VAR_0301,VAR_0302,VAR_0304))>1,1,0)
This is doing...
IF(If GPS speed accuracy is more then 2 output the average wheel speeds.) - (minimun wheel speed of all 4) is more then 1MPH output 1 else 0
This will stop the light coming on in poor GPS conditions and use average wheel speed. You may want to average the front wheel speeds.
I recommend you test this in the analysis on some data in a user defined variable and when that user defined variable shows as 1 the light would be on. You then check it is working correctly before attempting to do it in real time.
Kind regards,
Kieran
I would do it like this...
IF(IF(VAR_0407>2,avg(VAR_0300,VAR_0301,VAR_0302,VAR_0304),VAR_0414)-(min(VAR_0300,VAR_0301,VAR_0302,VAR_0304))>1,1,0)
This is doing...
IF(If GPS speed accuracy is more then 2 output the average wheel speeds.) - (minimun wheel speed of all 4) is more then 1MPH output 1 else 0
This will stop the light coming on in poor GPS conditions and use average wheel speed. You may want to average the front wheel speeds.
I recommend you test this in the analysis on some data in a user defined variable and when that user defined variable shows as 1 the light would be on. You then check it is working correctly before attempting to do it in real time.
Kind regards,
Kieran
-
- Posts: 19
- Joined: Tue Apr 19, 2011 1:46 am
Re: Support
[quote="Support"]Hello,
I would do it like this...
IF(IF(VAR_0407>2,avg(VAR_0300,VAR_0301,VAR_0302,VAR_0304),VAR_0414)-(min(VAR_0300,VAR_0301,VAR_0302,VAR_0304))>1,1,0)
This is doing...
IF(If GPS speed accuracy is more then 2 output the average wheel speeds.) - (minimun wheel speed of all 4) is more then 1MPH output 1 else 0
This will stop the light coming on in poor GPS conditions and use average wheel speed. You may want to average the front wheel speeds.
I recommend you test this in the analysis on some data in a user defined variable and when that user defined variable shows as 1 the light would be on. You then check it is working correctly before attempting to do it in real time.
Kind regards,
Kieran[/quote
Thanks, so is a lower number for GPS accuracy better? I read that as if GPS accuracy is less than 2 than use raw GPS if not than average wheelspeed. Is using raw GPS better than VAR_0015 (combined)
I would do it like this...
IF(IF(VAR_0407>2,avg(VAR_0300,VAR_0301,VAR_0302,VAR_0304),VAR_0414)-(min(VAR_0300,VAR_0301,VAR_0302,VAR_0304))>1,1,0)
This is doing...
IF(If GPS speed accuracy is more then 2 output the average wheel speeds.) - (minimun wheel speed of all 4) is more then 1MPH output 1 else 0
This will stop the light coming on in poor GPS conditions and use average wheel speed. You may want to average the front wheel speeds.
I recommend you test this in the analysis on some data in a user defined variable and when that user defined variable shows as 1 the light would be on. You then check it is working correctly before attempting to do it in real time.
Kind regards,
Kieran[/quote
Thanks, so is a lower number for GPS accuracy better? I read that as if GPS accuracy is less than 2 than use raw GPS if not than average wheelspeed. Is using raw GPS better than VAR_0015 (combined)
-
- Posts: 19
- Joined: Tue Apr 19, 2011 1:46 am
Okay, testing it out in the analysis software.
if(var_0414/4-min(VAR_0300,VAR_0301)>2,1,0)
works fine if I just use GPS speed minus minimum of front 2 wheels. Wheel frequency x 4 is MPH.
but
if(avg(VAR_0300,VAR_0301)-min(VAR_0300,VAR_0301)>2,1,0)
is just outputting the average of the front 2 wheels. Also If I try and add the rear wheels into the average I get a syntax error.
Any help would be appreciated.
if(var_0414/4-min(VAR_0300,VAR_0301)>2,1,0)
works fine if I just use GPS speed minus minimum of front 2 wheels. Wheel frequency x 4 is MPH.
but
if(avg(VAR_0300,VAR_0301)-min(VAR_0300,VAR_0301)>2,1,0)
is just outputting the average of the front 2 wheels. Also If I try and add the rear wheels into the average I get a syntax error.
Any help would be appreciated.
-
- Posts: 19
- Joined: Tue Apr 19, 2011 1:46 am
Got another question. I've noticed that in situations where the wheel goes from say 40 mph to lockup in less than one rotation the sensor reads as if it's still at 60 mph until the wheel starts to turn again and updates.
Is there anyway to make it so it has to have a constant signal otherwise it reads as 0?
Is there anyway to make it so it has to have a constant signal otherwise it reads as 0?
the problem on the speed readings from the pulses on the wheels is that the speed is calculated from the time between pulses, if you don't have a next pulse you can't calculate a new time, so you have to decide at what piont you set the speed to zero. For example, if our theoretical wheel is 2m circumference and gives out 2 pulses per revolution, then at 50m/s we have a 20ms time between pulses, if the wheel slows down massively and we had a pulse after 1s then it would output a speed of 1m/s, if there is a 2s gap then it is 0.5m/s, but at what point do we give up waiting for a pulse and set it to 0m/s? You can't output the speed based on pulses which aren't there.
The slower the speed, the slower the updates, and in the limiting case this means no updates with no speed.
Martin
The slower the speed, the slower the updates, and in the limiting case this means no updates with no speed.
Martin
-
- Posts: 2
- Joined: Sat Mar 23, 2013 7:51 am
- Location: Australia
Return to “General software support”
Who is online
Users browsing this forum: No registered users and 187 guests