Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Baitboat
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
Baitboat
Commits
119ffb0f
Commit
119ffb0f
authored
12 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
SITL: fixed simulated airspeed value
parent
a5b20b4d
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
libraries/AP_HAL_AVR_SITL/sitl_ins.cpp
+2
-2
2 additions, 2 deletions
libraries/AP_HAL_AVR_SITL/sitl_ins.cpp
with
2 additions
and
2 deletions
libraries/AP_HAL_AVR_SITL/sitl_ins.cpp
+
2
−
2
View file @
119ffb0f
...
@@ -31,12 +31,12 @@ using namespace AVR_SITL;
...
@@ -31,12 +31,12 @@ using namespace AVR_SITL;
uint16_t
SITL_State
::
_airspeed_sensor
(
float
airspeed
)
uint16_t
SITL_State
::
_airspeed_sensor
(
float
airspeed
)
{
{
const
float
airspeed_ratio
=
1.9936
;
const
float
airspeed_ratio
=
1.9936
;
const
float
airspeed_offset
=
50
3
;
const
float
airspeed_offset
=
201
3
;
float
airspeed_pressure
,
airspeed_raw
;
float
airspeed_pressure
,
airspeed_raw
;
airspeed_pressure
=
(
airspeed
*
airspeed
)
/
airspeed_ratio
;
airspeed_pressure
=
(
airspeed
*
airspeed
)
/
airspeed_ratio
;
airspeed_raw
=
airspeed_pressure
+
airspeed_offset
;
airspeed_raw
=
airspeed_pressure
+
airspeed_offset
;
return
airspeed_raw
;
return
airspeed_raw
/
4
;
}
}
...
...
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