1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Changed altitude/speed units to the standard units prefered for the project (http://www.openpilot.org/Unit_Standards).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@945 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2010-06-30 09:25:58 +00:00 committed by pip
parent f9e49e480f
commit 0a1d6ac7ed
2 changed files with 7 additions and 7 deletions

View File

@ -213,7 +213,7 @@
<item row="3" column="3">
<widget class="QLabel" name="label_6">
<property name="text">
<string>feet</string>
<string>meters</string>
</property>
</widget>
</item>

View File

@ -444,15 +444,15 @@ void OPMapGadgetWidget::updatePosition()
PositionActual::DataFields data = m_positionActual->getData(); // get current UAV data
internals::PointLatLng uav_pos = internals::PointLatLng(data.Latitude, data.Longitude); // current UAV position
double uav_heading = data.Heading; // current UAV heading
double uav_height_feet = data.Altitude * 3.2808399; // current UAV height
double uav_ground_speed = data.Groundspeed; // current UAV ground speed
double uav_height_meters = data.Altitude; // current UAV height
double uav_ground_speed_meters_per_second = data.Groundspeed; // current UAV ground speed
// display the UAV lat/lon position
QString str = " lat:" + QString::number(uav_pos.Lat(), 'f', 7) +
" lon:" + QString::number(uav_pos.Lng(), 'f', 7) +
QString str = " lat: " + QString::number(uav_pos.Lat(), 'f', 7) +
" lon: " + QString::number(uav_pos.Lng(), 'f', 7) +
" " + QString::number(uav_heading, 'f', 1) + "deg" +
" " + QString::number(uav_height_feet, 'f', 1) + "feet" +
" " + QString::number(uav_ground_speed, 'f', 1) + "mph";
" " + QString::number(uav_height_meters, 'f', 1) + "meters" +
" " + QString::number(uav_ground_speed_meters_per_second, 'f', 1) + "meters/second";
if (m_widget) m_widget->labelUAVPos->setText(str);
if (m_map && followUAVpositionAct && followUAVheadingAct)