PUD: force stationary when the position is invalid
authorFerry Huberts <f.huberts@mindef.nl>
Wed, 2 Nov 2011 11:37:21 +0000 (12:37 +0100)
committerFerry Huberts <f.huberts@mindef.nl>
Wed, 2 Nov 2011 11:38:00 +0000 (12:38 +0100)
Signed-off-by: Ferry Huberts <f.huberts@mindef.nl>
lib/pud/src/receiver.c

index 0d65118..2e184c7 100644 (file)
@@ -404,13 +404,15 @@ static void detemineMoving(PositionUpdateEntry * avg,
         */
 
        if (!positionValid(avg)) {
-               /* everything is unknown */
+               /* force stationary when the position is invalid */
+               result->moving = UNSET;
                return;
        }
 
        /* avg is valid here */
 
        if (!positionValid(lastTx)) {
+               /* the position just became valid: force moving */
                result->moving = SET;
                /* the rest is unknown */
                return;