Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CPS-VO
sitl_gazebo
Commits
b28258f1
Commit
b28258f1
authored
Feb 07, 2016
by
Lorenz Meier
Browse files
Reset initial declination to zero
parent
283aff5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gazebo_mavlink_interface.cpp
View file @
b28258f1
...
...
@@ -106,14 +106,18 @@ void GazeboMavlinkInterface::Load(physics::ModelPtr _model, sdf::ElementPtr _sdf
_rotor_count
=
5
;
last_time_
=
world_
->
GetSimTime
();
last_gps_time_
=
world_
->
GetSimTime
();
double
gps_update_interval_
=
200
*
1000000
;
// nanoseconds for 5Hz
double
gps_update_interval_
=
200
*
1000000
;
// nanoseconds for 5Hz
gravity_W_
=
world_
->
GetPhysicsEngine
()
->
GetGravity
();
// Magnetic field data for Zurich from WMM2015 (10^5xnanoTesla (N, E, D))
//mag_W_ = {, 0.00771, 0.42741};
//mag_W_ = {
0.21523
, 0.00771, 0.42741};
mag_W_
.
x
=
0.21523
;
mag_W_
.
y
=
0.00771
;
// We set the world Y component to zero because we apply
// the declination based on the global position,
// and so we need to start without any offsets.
// The real value for Zurich would be 0.00771
mag_W_
.
y
=
0.0
;
mag_W_
.
z
=
0.42741
;
//Create socket
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment