PX4 / PX4-SITL_gazebo-classic

Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.
http://dev.px4.io/simulation-gazebo.html
367 stars 787 forks source link

GPS bias integration mistake #816

Open robin-shaun opened 2 years ago

robin-shaun commented 2 years ago

Hello, I think the expression of the GPS bias integration mistake in gazebo_gps_plugin.cpp is wrong.

  // gps bias integration
  gps_bias_.X() += random_walk_gps_.X() * dt - gps_bias_.X() / gps_corellation_time_;
  gps_bias_.Y() += random_walk_gps_.Y() * dt - gps_bias_.Y() / gps_corellation_time_;
  gps_bias_.Z() += random_walk_gps_.Z() * dt - gps_bias_.Z() / gps_corellation_time_;

It should be

  // gps bias integration
  gps_bias_.X() += random_walk_gps_.X() - gps_bias_.X() / gps_corellation_time_ * dt;
  gps_bias_.Y() += random_walk_gps_.Y() - gps_bias_.Y() / gps_corellation_time_ * dt;
  gps_bias_.Z() += random_walk_gps_.Z() - gps_bias_.Z() / gps_corellation_time_ * dt;

or the base unit doesn't match

Jaeyoung-Lim commented 2 years ago

@robin-shaun Thank you for your insights.

If you think this can be improved, it would be great if you can create a pull request