- /* This is a null point. */
- MACRO_PATH_INCREMENT_TAIL(_track);
- *_track.tail = _point_null;
- }
- else
- {
- gboolean moving = FALSE;
- gboolean approaching_waypoint = FALSE;
- gint xdiff, ydiff, dopcand;
-
- announce_thres_unsquared = (20+_gps.speed) * _announce_notice_ratio*32;
-
- if(!_track.tail->unity
- || ((xdiff = _pos.unitx - _track.tail->unitx), /* comma op */
- (ydiff = _pos.unity - _track.tail->unity), /* comma op */
- /* Check if xdiff or ydiff are huge. */
- ((abs(xdiff) >> 12) || (abs(ydiff) >> 12)
- /* Okay, let's see if we've moved enough to justify adding
- * to the track. It depends on our error. I'd like to
- * make the threshold roughly linear with respect to the
- * P/HDOP (completely arbitrary, I know), but I also
- * want to keep the threshold at a minimum of 2
- * zoom-level-4 pixel, and I want dop's of less than 2 to
- * also have a 1-pixel threshold. I also throw in some
- * PDOP into the mix, just for fun. */
- || ((dopcand = 8 * (_gps.pdop - 6 +(_gps.hdop*_gps.hdop))),
- ((xdiff * xdiff) + (ydiff * ydiff)
- >= (MAX(2, dopcand) << 8))))))
- {
- /* We moved enough to actually register a move. */
- ret = TRUE;