Skip to content

Commit

Permalink
Fix temperature gradient default value in Atmosphere DOM (#482)
Browse files Browse the repository at this point in the history
The default value in the Atmosphere SDF DOM was off by a factor of 10.

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
  • Loading branch information
iche033 and scpeters committed Feb 2, 2021
1 parent 97a2be6 commit d33b4ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ forward programmatically.
This document aims to contain similar information to those files
but with improved human-readability..

## SDFormat 10.2.0 to 10.x.x

### Modifications

1. Fixed Atmosphere DOM class's temperature default value. Changed from -0.065 to -0.0065.
* [Pull request 482](https://github.com/osrf/sdformat/pull/482)

## SDFormat 9.x to 10.0

### Modifications
Expand Down
2 changes: 1 addition & 1 deletion src/Atmosphere.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class sdf::AtmospherePrivate

/// \brief Temperature gradient with respect to increasing altitude at sea
/// level in units of K/m.
public: double temperatureGradient {-0.065};
public: double temperatureGradient {-0.0065};

/// \brief Pressure at sea level in pascals.
public: double pressure {101325};
Expand Down
2 changes: 1 addition & 1 deletion src/Atmosphere_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ TEST(DOMAtmosphere, Construction)
sdf::Atmosphere atmosphere;
EXPECT_EQ(sdf::AtmosphereType::ADIABATIC, atmosphere.Type());
EXPECT_DOUBLE_EQ(288.15, atmosphere.Temperature().Kelvin());
EXPECT_DOUBLE_EQ(-0.065, atmosphere.TemperatureGradient());
EXPECT_DOUBLE_EQ(-0.0065, atmosphere.TemperatureGradient());
EXPECT_DOUBLE_EQ(101325, atmosphere.Pressure());
}

Expand Down

0 comments on commit d33b4ae

Please sign in to comment.