USA.
*/
-const int ACCURATE_LIMIT = 250; // this and lower values (in meters) are considered as accurate
-
#include <QDebug>
#include <QGraphicsPixmapItem>
setPos(scenePosition);
- if (accuracy != GPS_ACCURACY_UNDEFINED // accuracy must be defined
- && accuracy <= ACCURATE_LIMIT // and smaller than limit
- && m_currentAccuracy != ACCURATE) { // and accurate pixmap not yet set
+ if (accuracy == GPS_ACCURACY_UNDEFINED) { // fix is NOT accurate
+ if (m_currentAccuracy != COARSE) { // coarse pixmap not yet set
+ setPixmap(m_coarsePixmap);
+ m_currentAccuracy = COARSE;
+ }
+ }
+ else { // fix is accurate
+ if (m_currentAccuracy != ACCURATE) { // accurate pixmap not yet set
setPixmap(m_accuratePixmap);
m_currentAccuracy = ACCURATE;
- }
- else if (m_currentAccuracy != COARSE) { // coarse pixmap not yet set
- setPixmap(m_coarsePixmap);
- m_currentAccuracy = COARSE;
+ }
}
}