mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
OP-52 Ground/GPS Display: Maybe this works better
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1532 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
70715ba0e2
commit
d457781173
@ -105,12 +105,16 @@ void GpsDisplayWidget::setSVs(int sv)
|
||||
|
||||
void GpsDisplayWidget::setPosition(double lat, double lon, double alt)
|
||||
{
|
||||
lat *= 1E-7;
|
||||
lon *= 1E-7;
|
||||
//lat *= 1E-7;
|
||||
//lon *= 1E-7;
|
||||
double deg = (lat>0) ? floor(lat):ceil(lat);
|
||||
double min = fabs(lat-deg)*60;
|
||||
QString str;
|
||||
str.sprintf("%.0f%c%.3f'", deg,0x00b0, min);
|
||||
if (lat>0)
|
||||
str.append("N");
|
||||
else
|
||||
str.append("S");
|
||||
lat_value->setText(str);
|
||||
lat_value->adjustSize();
|
||||
deg = floor(fabs(lon)); // ABS takes an int.
|
||||
|
Loading…
x
Reference in New Issue
Block a user