Skip to content

Commit 92eabb6

Browse files
Update README.md
1 parent 6e13ce0 commit 92eabb6

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,34 @@ Instantiate the 'Filter' class and provide the filter weights:
99
```c++
1010
#include "Filter.h"
1111
Filter<OUTPUT_TYPE,FITLER_SIZE> my_filter;
12-
my_filter.(input_coeffs,output_coeffs);
12+
my_filter.SetCoefficients(input_coeffs,output_coeffs);
1313
```
1414

1515
Now, every new measurement can be filtered (See examples 1,2):
1616
``` c++
17-
float new_filtered_value = my_filter.Update(new_value);
17+
OUTPUT_TYPE new_filtered_value = my_filter.Update(new_value);
1818
```
1919

20-
The Z transform coefficients can also be supplied and the library will automatically convert them to the filter weights:
20+
The Z transform numerator & denominator coefficients can also be supplied and the library will automatically convert them to the filter weights:
2121
``` c++
2222
my_filter.SetCoefficientsFromZTransform(numerator,denominator);
2323
```
24+
The state can be cleared to reinitialize the filter:
25+
``` c++
26+
my_filter.SetState();
27+
```
2428

25-
Although not recommended, it is possible to change the filter states to avoid transients:
29+
Finally although not recommended, it is possible to change the filter states:
2630
``` c++
2731
my_filter.SetState(input_state,output_state);
2832
```
2933

34+
3035
## Compilation
3136
This repository uses CMake. It is already configured for the [CMake Tools extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) and runs on the default generator.
3237

3338
## Documentation
34-
This reopsitory uses doxygen. For Windows, run `doxygen Doxyfile`.
39+
This repository uses doxygen. For Windows, run `doxygen Doxyfile`.
3540

3641
## Future Updates
3742
This repository is also a learning experience. The expected roadmap is:
@@ -42,7 +47,7 @@ This repository is also a learning experience. The expected roadmap is:
4247
- [ ] Add other standard recomendations (AUTOSAR/ C++ standards)
4348
- [X] Keep library std-free
4449
- [X] Add CMake compilation
45-
- [ ] Add google tests
50+
- [X] Add google tests
4651
- [ ] Add pre-designed filtering options
4752
- [X] Add doxygen docuemntation
4853

0 commit comments

Comments
 (0)