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
86afc266
Commit
86afc266
authored
11 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
HAL_SITL: decrease wind with altitude
this prevents JSBSim crash on the runway
parent
2e75d5de
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/AP_HAL_AVR_SITL/SITL_State.cpp
+6
-1
6 additions, 1 deletion
libraries/AP_HAL_AVR_SITL/SITL_State.cpp
with
6 additions
and
1 deletion
libraries/AP_HAL_AVR_SITL/SITL_State.cpp
+
6
−
1
View file @
86afc266
...
@@ -490,7 +490,12 @@ void SITL_State::_simulator_output(void)
...
@@ -490,7 +490,12 @@ void SITL_State::_simulator_output(void)
current_pin_value
=
((
current
/
17.0
)
/
5.0
)
*
1024
;
current_pin_value
=
((
current
/
17.0
)
/
5.0
)
*
1024
;
// setup wind control
// setup wind control
control
.
speed
=
_sitl
->
wind_speed
*
100
;
float
wind_speed
=
_sitl
->
wind_speed
*
100
;
float
altitude
=
_barometer
?
_barometer
->
get_altitude
()
:
0
;
if
(
altitude
<
60
)
{
wind_speed
*=
altitude
/
60.0
f
;
}
control
.
speed
=
wind_speed
;
float
direction
=
_sitl
->
wind_direction
;
float
direction
=
_sitl
->
wind_direction
;
if
(
direction
<
0
)
{
if
(
direction
<
0
)
{
direction
+=
360
;
direction
+=
360
;
...
...
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