From: Curt M. <we...@us...> - 2004-02-27 23:07:36
|
Update of /cvsroot/xastir/xastir/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1623 Modified Files: db.c Log Message: Changing the distance at which Xastir will skip a track segment, from >1 degree lat/long to >2 degrees. Any track segment less than 2 degrees in N/S and E/W length will get drawn, as long as the time between posits is less than 45 minutes. If over 45 minutes, the segment gets skipped as well. Index: db.c =================================================================== RCS file: /cvsroot/xastir/xastir/src/db.c,v retrieving revision 1.298 retrieving revision 1.299 diff -C2 -d -r1.298 -r1.299 *** db.c 26 Feb 2004 23:19:57 -0000 1.298 --- db.c 27 Feb 2004 22:58:30 -0000 1.299 *************** *** 5602,5617 **** if (ptr->prev != NULL) { // we have at least two points... ! if (abs(lon - ptr->prev->trail_long_pos) > MAX_TRAIL_SEG_LEN*60*100 || ! abs(lat - ptr->prev->trail_lat_pos) > MAX_TRAIL_SEG_LEN*60*100) { ! flag |= TR_NEWTRK; // set "new track" flag for long segments } else { if (abs(sec - ptr->prev->sec) > 2700) { ! flag |= TR_NEWTRK; // set "new track" flag for long pauses } } } else { ! flag |= TR_NEWTRK; // set "new track" flag for first point } ptr->flag = flag; --- 5602,5625 ---- if (ptr->prev != NULL) { // we have at least two points... ! if (abs(lon - ptr->prev->trail_long_pos) > MAX_TRAIL_SEG_LEN*60*2*100 || ! abs(lat - ptr->prev->trail_lat_pos) > MAX_TRAIL_SEG_LEN*60*2*100) { ! ! // Set "new track" flag if there's two degrees or more ! // distance between points (used to be one degree, may ! // bump it up a bit more soon). ! flag |= TR_NEWTRK; } else { if (abs(sec - ptr->prev->sec) > 2700) { ! ! // Set "new track" flag if long delay (45 minutes or ! // more) between reception of two points. ! flag |= TR_NEWTRK; } } } else { ! // Set "new track" flag for first point received. ! flag |= TR_NEWTRK; } ptr->flag = flag; |