Skip to content

Commit

Permalink
Adjust altitude on antenna height changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsenD98 committed Sep 2, 2024
1 parent a817081 commit d6d7cc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/positioning/positioninginformationmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ void PositioningInformationModel::setAntennaHeight( double antennaHeight )
return;
mAntennaHeight = antennaHeight;
emit antennaHeightChanged();

const double distanceUnitFactor = QgsUnitTypes::fromUnitToUnitFactor( Qgis::DistanceUnit::Meters, distanceUnits() );
const QString distanceUnitAbbreviation = QgsUnitTypes::toAbbreviatedString( distanceUnits() );
const QString altitude = getAltitude( distanceUnitFactor, distanceUnitAbbreviation );
updateInfo( "Altitude", altitude );
}

Qgis::DistanceUnit PositioningInformationModel::distanceUnits() const
Expand Down

0 comments on commit d6d7cc5

Please sign in to comment.