Skip to content

Commit

Permalink
use consistant value of 1000 kg/m^3 for density of water
Browse files Browse the repository at this point in the history
  • Loading branch information
acxz committed Aug 3, 2022
1 parent 4f65321 commit 3baba7b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace gazebo
/// <boatArea>: Horizontal surface area [m^2]. Default value is 0.48.
/// <boatLength>: Boat length [m]. Default value is 1.35.
/// <boatWidth>: Boat width [m]. Default value is 1.
/// <waterDensity>: Water density [kg/m^3]. Default value is 997.7735.
/// <waterDensity>: Water density [kg/m^3]. Default value is 1000.
/// <waterLevel>: Water height [m]. Default value is 0.5.
/// <xDotU>: Added mass coeff, surge.
/// <yDotV>: Added mass coeff, sway.
Expand Down
2 changes: 1 addition & 1 deletion usv_gazebo_plugins/src/buoyancy_gazebo_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ std::string BuoyancyObject::Disp()

/////////////////////////////////////////////////
BuoyancyPlugin::BuoyancyPlugin()
: fluidDensity(997),
: fluidDensity(1000),
fluidLevel(0.0),
linearDrag(0.0),
angularDrag(0.0),
Expand Down
2 changes: 1 addition & 1 deletion usv_gazebo_plugins/src/usv_gazebo_dynamics_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void UsvDynamicsPlugin::Load(physics::ModelPtr _model, sdf::ElementPtr _sdf)
}

this->waterLevel = this->SdfParamDouble(_sdf, "waterLevel" , 0.5);
this->waterDensity = this->SdfParamDouble(_sdf, "waterDensity", 997.7735);
this->waterDensity = this->SdfParamDouble(_sdf, "waterDensity", 1000);
this->paramXdotU = this->SdfParamDouble(_sdf, "xDotU" , 5);
this->paramYdotV = this->SdfParamDouble(_sdf, "yDotV" , 5);
this->paramZdotW = this->SdfParamDouble(_sdf, "zDotW" , 0.1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<bodyName>${namespace}/base_link</bodyName>
<!-- Must be same as the ocean model!-->
<waterLevel>0</waterLevel>
<waterDensity>997.8</waterDensity>
<waterDensity>1000</waterDensity>
<!-- Added mass -->
<xDotU>0.0</xDotU>
<yDotV>0.0</yDotV>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace asv

/// \brief Density of water.
///
/// \return 998.6 [kg m-3].
/// \return 1000 [kg m-3].
public: static double WaterDensity();

/// \brief Kinematic viscosity of water at 18 dgree C.
Expand Down
2 changes: 1 addition & 1 deletion wave_gazebo_plugins/src/PhysicalConstants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace asv
/////////////////////////////////////////////////////////////////////////////
double PhysicalConstants::WaterDensity()
{
return 998.6;
return 1000.;
}

/////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 3baba7b

Please sign in to comment.