Skip to content

Commit dd86682

Browse files
author
camilo
committed
doc update
1 parent 674c52e commit dd86682

File tree

4 files changed

+41
-5
lines changed

4 files changed

+41
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
cmake_minimum_required( VERSION 3.2 )
1313
project( qlibs
14-
VERSION 1.2.8
14+
VERSION 1.2.9
1515
DESCRIPTION "A collection of useful libraries for embedded systems"
1616
LANGUAGES C
1717
)
@@ -30,5 +30,6 @@ add_library( ${PROJECT_NAME}
3030
qtdl.c
3131
qtypegeneric.c
3232
qvfloat.c
33+
qinterp1.c
3334
)
3435
target_include_directories( ${PROJECT_NAME} PUBLIC include )

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ Below is the list of the modules provided and their features:
5858
- Type-generic array operations
5959
- Single precision floating-point vector(1D-Array) operations
6060
- Fast single precision floating-point math
61+
- One-dimensional interpolation
6162

6263

doc/mainpage.dox

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/** @mainpage qLibs
2-
* @image html https://user-images.githubusercontent.com/11412210/199044031-0e37f39d-5a57-4a68-9da1-fe3cdbc7c0fa.jpg
3-
* A collection of useful libraries written in C for embedded systems.
2+
* @image html https://user-images.githubusercontent.com/11412210/199044031-0e37f39d-5a57-4a68-9da1-fe3cdbc7c0fa.jpg
3+
* A collection of useful libraries written in C for embedded systems.
44
*
55
* @remark
6-
* qLibs is developed using a formal and rigorous process framed in compliance with
7-
* the MISRA C 2012 and CERT coding standard guidelines and complemented with
6+
* qLibs is developed using a formal and rigorous process framed in compliance with
7+
* the MISRA C 2012 and CERT coding standard guidelines and complemented with
88
* multiple static-analysis checks targeted to safe critical applications.
99
*
1010
* qLibs includes the following modules:
@@ -37,6 +37,7 @@
3737
* - @subpage qrms_desc "qRMS : Recursive Root Mean Square (RMS) calculation"
3838
* - @subpage qcrc_desc "qCRC : Generic Cyclic Redundancy Check (CRC) calculator"
3939
* - @subpage qtdl_desc "qTDL : Tapped Delay Line in O(1)"
40+
* - @subpage qinterp1_desc "qInterp1 : 1D Interpolation class"
4041
* - Type-generic array operations
4142
* - Single precision floating-point vector(1D-Array) operations
4243
* - Fast single-precision floating-point math

doc/qinterp1.dox

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*! @page qinterp1_desc 1D Interpolation class
2+
* The \ref qInterp1 class provides a simple, consistent interface for a set of
3+
* one-dimensional interpolators. The class recieves X-Values and Y-Values and
4+
* the size of this arrays to setup the instance. The user can later pass the
5+
* X point to interpolate, and the interpolator instance return the estimated Y
6+
* at the point X using the specified method.
7+
*
8+
* The current supported methods are:
9+
* - QINTERP1_NEXT : Return the next neighbor.
10+
* - QINTERP1_PREVIOUS : Return the previous neighbor.
11+
* - QINTERP1_NEAREST : Return the nearest neighbor.
12+
* - QINTERP1_LINEAR : Linear interpolation from nearest neighbors.
13+
* - QINTERP1_SINE : Sine interpolation.
14+
* - QINTERP1_CUBIC : Cubic interpolation.
15+
* - QINTERP1_HERMITE : Piecewise cubic Hermite interpolation.
16+
* - QINTERP1_SPLINE : Catmull spline interpolation.
17+
* - QINTERP1_CONSTRAINED_SPLINE : A special kind of spline that doesn't overshoot.
18+
*
19+
* If value is beyond the endpoints, extrapolation is performed using the current
20+
* method.
21+
*
22+
* @section qinterp1_ex1 Example : Code snippet that demonstrates the spline interpolation .
23+
*
24+
* @code{.c}
25+
* float xdat[] = { 1.0f, 6.0f, 11.0f, 16.0f, 21.0f, 26.0f, 31.0f, 36.0f };
26+
* float ydat[] = { 59.6870f, 44.5622f, -0.8642f , 0.8725f, -2.3016f, -50.3095f, -54.5966f, 37.9036f };
27+
* qInterp1_t interpolator( xdat, ydat );
28+
* qInterp1_Setup( &interpolator, xdat, ydat, sizeof(xdat)/sizeof(xdat[0]) );
29+
* qInterp1_SetMethod( &interpolator, QINTERP1_SPLINE );
30+
* float ye = qInterp1_Get( &interpolator, 18.5f ); //interpolated value at 18.5
31+
* @endcode
32+
*
33+
*/

0 commit comments

Comments
 (0)