MARSProgramming / MARS-2020

1 stars 0 forks source link

Linear Interpolation on Lookup Table #51

Closed iamr2003 closed 4 years ago

iamr2003 commented 4 years ago

Modify the flywheel lookup table VI in the trunk to linearly go between values, as opposed to just selecting the nearest one. This should not be particularly difficult, the issues that Andrew and I ran into is trying to understand the builtin Labview VIs for these purposes. There does not appear to be a floor/ceiling VI, so best bet might be to look at the Linear Interpolation palette for full solution.

Please make this as a new subVI with a different name.

aballard-mars commented 4 years ago

I checked this into a small_task within master, but I'd like to consider using target distance calculated from ty and see if we have (or can derive) a formula. A graph of the interpolation looks pretty good, but it shows that the points in the array table don't quite follow a continuous curve like I'd expect. Interpolation between points will definitely help, but tuning the speed to set distances can be vulnerable to defense because the velocity values returned will have "sweet spots" near the values in the table. Obviously, as you plot more of those spots the graph will smooth itself out, but I don't think the real-time calculation here will be any more expensive than looking the range of values up from a table and interpolating a speed from those.