jlacleriga
Hi, 

I'm trying to get a channel value just between two different points in the same lap. 
Here it is what I'm trying with two different math channels:

RHF EOS Cond:
register @1;

@1 = choose([Lap Distance]>[EOS1],choose([Lap Distance]<[EOS2],1,0),0);

@1

And then:

RHF EOS:
gate([RHF EOS Cond],[RHF])

Any idea??

Thanks!!
Quote 0 0
littleozfella
Hi,
       when you say between 2 points, do you mean a sample at each point for from 1 point to another??  Below is sample AT each point..

register @a1;
register @a2;
register @a3;
register @a4;


@a1 = (choose([Lap Distance]>1500,[ECT],0));
@a2 = (choose ([Lap Distance]>1502,0,@a1));
@a3 = (choose([Lap Distance]>3000,[ECT],0));
@a4 = (choose ([Lap Distance]>3002,0,@a3));


choose(@a2>1,@a2,@a4)

You need to give a small window because the maths relies on the logging sample, not interpolation so if the sample is 1499.8 and 1500.2 then the maths will not find that point. The window can be smaller or larger depending on your sample rate of Lap Distance or speed.  Please check your channel as Lap Distance or lapdistance differ depending if it is logged or generated in Toolbox.   export of channel attached.. The file has extension .txt, please rename .pxm as the fourm does not allow attachments with this extension.  You can import this into Pi Maths.
Cheers
Quote 0 0
littleozfella
This one will give the channel values BETWEEN 2 distances.. 

register @a1;
register @a2;

@a1 = (choose([Lap Distance]>1500,[ECT],0));
@a2 = (choose ([Lap Distance]> 2000,0,@a1));

@a2

In this case the channel will display ETC from 1500m to 2000m  (500m window) otherwise return 0.
Each of these are returning ECT just as a sample.  Again channel is attached, renamed .txt.  

Cheers.
Quote 0 0
littleozfella
Depending on what you are trying to achieve, you could generate 2 events, say

1500        [Lap Distance]> 1500 
2000        [Lap Distance]< 2000   

  You can then make a Excel report to give either a report of Max, Min, mean, value at start/end etc etc  for multiple channels, or you can do a Table report to give a table value of all channel values between 1500 and 2000.  beware, if you have a high logging rate and channel count, this will be a very large file.
  F1 is a very good help on this.

Cheers
Quote 0 0
jlacleriga
That’s perfect!! Thank you vert much for both different applications.
Quote 0 0