PUD: always update transmit position when new position is better
authorFerry Huberts <f.huberts@mindef.nl>
Thu, 30 Jun 2011 15:22:50 +0000 (17:22 +0200)
committerFerry Huberts <f.huberts@mindef.nl>
Mon, 4 Jul 2011 05:42:33 +0000 (07:42 +0200)
better : new position with DOPs is fully inside transmit position
         with DOPs

Signed-off-by: Ferry Huberts <f.huberts@mindef.nl>
lib/pud/src/receiver.c

index 24f448f..576537a 100644 (file)
@@ -685,7 +685,8 @@ bool receiverUpdateGpsInformation(unsigned char * rxBuffer, size_t rxCount) {
 
        updateTransmitGpsInformation = externalStateChange
                        || (state.externalState == MOVING)
-                       || (positionValid(posAvgEntry) && !positionValid(&txPosition));
+                       || (positionValid(posAvgEntry) && !positionValid(&txPosition))
+                       || (movementResult.inside == SET);
 
        if (updateTransmitGpsInformation) {
                memcpy(&txPosition.nmeaInfo, &posAvgEntry->nmeaInfo, sizeof(nmeaINFO));