mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-82 Removed a bug which caused the displayed speed to be off by 10% (result of too much optimization of the PFD display routines...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1280 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
68f7120c89
commit
57525bc81d
@ -240,14 +240,14 @@ void PFDGadgetWidget::updateHeading(UAVObject *object1) {
|
||||
if (field) {
|
||||
// The speed scale represents 30km/h (6 * 5)
|
||||
// 3.6 : convert m/s to km/h
|
||||
double val = field->getDouble();
|
||||
groundspeedTarget = floor(360*val*speedScaleHeight/(30))/100;
|
||||
double val = floor(field->getDouble()*100)/100;
|
||||
groundspeedTarget = 3.6*val*speedScaleHeight/30;
|
||||
}
|
||||
fieldname = QString("Altitude");
|
||||
field = object1->getField(fieldname);
|
||||
if (field) {
|
||||
// The altitude scale represents 30 meters
|
||||
altitudeTarget = floor(field->getDouble()*altitudeScaleHeight*3)/100;
|
||||
altitudeTarget = floor(field->getDouble()*100)/100*altitudeScaleHeight/30;
|
||||
}
|
||||
|
||||
// GPS Stats
|
||||
|
Loading…
Reference in New Issue
Block a user