Skip to content

Commit

Permalink
Fix latitude/longitude/altitude getters on Location objects (#174)
Browse files Browse the repository at this point in the history
This was due to a Units vs SIUnits confusion that other parts of this
file however handled correctly.

Fixes issue #173
Signed-off-by: Ulrich Spörlein <[email protected]>
  • Loading branch information
uqs authored Oct 7, 2023
1 parent 0026aa8 commit b55d615
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/openhab/core/types/point_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ def ==(other)
# @!attribute [r] latitude
# @return [QuantityType]
def latitude
QuantityType.new(raw_latitude.to_big_decimal, SIUnits::DEGREE_ANGLE)
QuantityType.new(raw_latitude.to_big_decimal, Units::DEGREE_ANGLE)
end

# @!attribute [r] longitude
# @return [QuantityType]
def longitude
QuantityType.new(raw_longitude.to_big_decimal, SIUnits::DEGREE_ANGLE)
QuantityType.new(raw_longitude.to_big_decimal, Units::DEGREE_ANGLE)
end

# @!attribute [r] altitude
# @return [QuantityType]
def altitude
QuantityType.new(raw_altitude.to_big_decimal, Units::METRE)
QuantityType.new(raw_altitude.to_big_decimal, SIUnits::METRE)
end

#
Expand Down

0 comments on commit b55d615

Please sign in to comment.