cancel
Showing results for 
Search instead for 
Did you mean: 

Curve fitting libraries

matte
Associate II
Posted on April 04, 2014 at 18:31

Hi,

I am currently working on a PIR-sensor solution, where 10 PIR-sensors are mounted in an array containing lets say 300 elements, at an even spacing distance.

Looks like this:

* = PIR

♯ = array element without PIR-sensor.

*♯♯♯♯*♯♯♯♯*♯♯♯♯*♯♯♯♯*...

The PIR-sensors are supposed to detect when a person moves alongs this array. I can only use ~10 sensors and therefore need to guess whether a person is present in between 2 sensors and if so, where he/she actually is standing.

So I have 10 data points where I know the X-value (the position in the array of these sensors) and I can read the corresponding Y-values from these PIR-sensors.

Now how do I achieve a curve fitting. I am thinking that cubical spline or polynomial interpolation are the best two methods for this specific applicaiton. I need a library that can interpolate the rest of the array elements which are unknown. Any ideas of where I can find this?

I intend to use and STM32F4-Discovery board to read the sensors and perhaps the FPU/DSP to calculations.

#stm32f4 #curve-fitting
1 REPLY 1
Danish1
Lead II
Posted on April 05, 2014 at 12:53

I think that once you have read the sensors and put their values into an array of floats, you are sufficiently far from the hardware that a generic solutions book e.g. in C is the right approach.

My favourite book for such things is ''Numerical Recipes'' as they don't just give you some code, they try to explain why a given approach is good and when to choose something else. Translations are available for various different programming languages; according to amazon the C version is in its third edition.

Hope this helps,

Danish