Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Boardcore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
Skyward Boardcore
Commits
1ddf962b
Commit
1ddf962b
authored
1 year ago
by
Federico Lolli
Browse files
Options
Downloads
Patches
Plain Diff
[LowPass] refactored name variables in camelCase
parent
8d726762
No related branches found
No related tags found
1 merge request
!224
Draft: Sensor Fault Detection
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/shared/algorithms/Filters/LowPass.cpp
+3
-3
3 additions, 3 deletions
src/shared/algorithms/Filters/LowPass.cpp
src/shared/algorithms/Filters/LowPass.h
+3
-3
3 additions, 3 deletions
src/shared/algorithms/Filters/LowPass.h
with
6 additions
and
6 deletions
src/shared/algorithms/Filters/LowPass.cpp
+
3
−
3
View file @
1ddf962b
...
@@ -26,14 +26,14 @@ namespace Boardcore
...
@@ -26,14 +26,14 @@ namespace Boardcore
{
{
// TODO: WARNING! initialized at 0
// TODO: WARNING! initialized at 0
LowPass
::
LowPass
(
float
gain
,
float
cutoff
_f
req
,
float
lambda
)
LowPass
::
LowPass
(
float
gain
,
float
cutoff
F
req
,
float
lambda
)
:
gain
(
gain
),
cutoff
_f
req
(
cutoff
_f
req
),
lambda
(
lambda
),
output
(
0
)
:
gain
(
gain
),
cutoff
F
req
(
cutoff
F
req
),
lambda
(
lambda
),
output
(
0
)
{
{
}
}
float
LowPass
::
filter
(
float
input
)
float
LowPass
::
filter
(
float
input
)
{
{
output
=
lambda
*
output
+
(
gain
/
cutoff
_f
req
)
*
(
1
-
lambda
)
*
input
;
output
=
lambda
*
output
+
(
gain
/
cutoff
F
req
)
*
(
1
-
lambda
)
*
input
;
return
output
;
return
output
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/shared/algorithms/Filters/LowPass.h
+
3
−
3
View file @
1ddf962b
...
@@ -32,12 +32,12 @@ public:
...
@@ -32,12 +32,12 @@ public:
* @brief Construct a new Low Pass object
* @brief Construct a new Low Pass object
*
*
* @param gain The gain of the filter
* @param gain The gain of the filter
* @param cutoff
_f
req The cutoff frequency of the filter
* @param cutoff
F
req The cutoff frequency of the filter
* @param lambda The lambda parameter of the filter
* @param lambda The lambda parameter of the filter
*
*
* @note WARNING: Initialize output at 0 at first
* @note WARNING: Initialize output at 0 at first
*/
*/
LowPass
(
float
gain
,
float
cutoff
_f
req
,
float
lambda
);
LowPass
(
float
gain
,
float
cutoff
F
req
,
float
lambda
);
/**
/**
* @brief Filter the input
* @brief Filter the input
...
@@ -47,7 +47,7 @@ public:
...
@@ -47,7 +47,7 @@ public:
float
filter
(
float
input
);
float
filter
(
float
input
);
private:
private:
float
cutoff
_f
req
;
float
cutoff
F
req
;
float
lambda
;
float
lambda
;
float
gain
;
float
gain
;
float
output
;
float
output
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment