Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
457526eb
Commit
457526eb
authored
8 years ago
by
Vasily Evseenko
Committed by
Lorenz Meier
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't push bad values from lidar to EKF2 (#5196)
Report terrain altitude
parent
a58c2f41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/ekf2/ekf2_main.cpp
+11
-3
11 additions, 3 deletions
src/modules/ekf2/ekf2_main.cpp
with
11 additions
and
3 deletions
src/modules/ekf2/ekf2_main.cpp
+
11
−
3
View file @
457526eb
...
...
@@ -486,6 +486,9 @@ void Ekf2::task_main()
if
(
range_finder_updated
)
{
orb_copy
(
ORB_ID
(
distance_sensor
),
_range_finder_sub
,
&
range_finder
);
if
(
range_finder
.
min_distance
>=
range_finder
.
current_distance
||
range_finder
.
max_distance
<=
range_finder
.
current_distance
)
{
range_finder_updated
=
false
;
}
}
orb_check
(
_ev_pos_sub
,
&
vision_position_updated
);
...
...
@@ -816,9 +819,14 @@ void Ekf2::task_main()
global_pos
.
eph
=
sqrt
(
pos_var
(
0
)
+
pos_var
(
1
));;
// Standard deviation of position estimate horizontally
global_pos
.
epv
=
sqrt
(
pos_var
(
2
));
// Standard deviation of position vertically
// TODO: implement terrain estimator
global_pos
.
terrain_alt
=
0.0
f
;
// Terrain altitude in m, WGS84
global_pos
.
terrain_alt_valid
=
false
;
// Terrain altitude estimate is valid
if
(
lpos
.
dist_bottom_valid
)
{
global_pos
.
terrain_alt
=
lpos
.
ref_alt
-
terrain_vpos
;
// Terrain altitude in m, WGS84
global_pos
.
terrain_alt_valid
=
true
;
// Terrain altitude estimate is valid
}
else
{
global_pos
.
terrain_alt
=
0.0
f
;
// Terrain altitude in m, WGS84
global_pos
.
terrain_alt_valid
=
false
;
// Terrain altitude estimate is valid
}
// TODO use innovatun consistency check timouts to set this
global_pos
.
dead_reckoning
=
false
;
// True if this position is estimated through dead-reckoning
...
...
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