% % track forward points for history insertion % 0 !Sim.DataMsec 0 !Sim.Speed 0 !Sim.RecentMsec _Trak.Folder &"reading.cur" exec$ "map" &_Sim.Sid html oflocal dup !Sim.MapFile dup exists dup !Sim.MapExist "mapexist" log)( { % % prior map file exists, check times against most recent data record % stamp !Sim.MapStamp } { pop } ifelse false !Sim.NewMove false !Sim.NewData empty !Sim.First empty !Sim.Valid 0.0 !Sim.Vlat 0.0 !Sim.Vlon 0 !counter % % tag as first cycle % true !fircyc false !firval % % forces next value of latitude and longitude to be counted % empty !Trak.Lat empty !Trak.Lon _Trak.Folder empty { % % stack: path seed % "" textwild nextfile ? "fwd point" log)( % % will anchor on this data point to start % dup !Sim.File % % next forward in time locater data point file % dup noext dup telldate !Trak.Date !Sim.Msec empty !Trak.Lat execing _Trak.Lat any? { % % valid data in file % % un-hex the lat and lon % hex2asc !Trak.Lat _Trak.Lon hex2asc !Trak.Lon _fircyc "firstcyc" log)( { % % capture the anchor point of first available % _Trak.Lat !Sim.Vlat _Trak.Lon !Sim.Vlon % % start tracking the difference in time of points % _Sim.Msec !Trak.HasT % % final this file, we will instigate the latest file before first valid % finaled dup ".xtx" reextend !Sim.First } { % % check the next point for significant movement from anchor point % and that the difference in seconds less than 60 seconds % stack: path seed seed-content % _Sim.Vlon _Trak.Lon sub abs _Sim.Vlat _Trak.Lat sub abs add "((((diff" log)( dup !Loc.Diff _Sim.Choke gt % % check time interval last reading % _Sim.Msec _Trak.HasT from 90000 lt and { _firval { % % already had first valid % } { % % not had valid point yet % use the point before this and track its history % !Sim.Prior _Sim.First dup !Sim.File dup noext dup telldate !Trak.Date !Sim.Msec execing _Trak.Lat hex2asc !Trak.Lat _Trak.Lon hex2asc !Trak.Lon *trakhist pop _Sim.Prior dup !Sim.File dup noext dup telldate !Trak.Date !Sim.Msec execing _Trak.Lat hex2asc !Trak.Lat _Trak.Lon hex2asc !Trak.Lon } ifelse % % significant movement from last anchor point % track history point and create new anchor point % *trakhist _Trak.Lat !Sim.Vlat _Trak.Lon !Sim.Vlon _Sim.NewMove { dup noext !Sim.RecentMsec } { } ifelse true !firval } { % % not significant enough departure from original lat and lon % finaled _firval { % % already had valid pair % } { % % not had valid pair, move this into the first slot % dup ".xtx" reextend !Sim.First } ifelse } ifelse } ifelse false !fircyc } { % % no values in point file % finaled } ifelse _Sim.DataMsec %%% ">>>>>>" log)( second noext %%% "<<<<<<" log)( lt { dup noext !Sim.DataMsec 0 !Sim.Speed execing filing ".xtx" reextend exec$ _Trak.Speed hex2asc normint !Sim.Speed _Trak.Lat hex2asc !Sim.Lat _Trak.Lon hex2asc !Sim.Lon true !Sim.NewData } { } ifelse _Sim.Msec !Trak.HasT } loop filing) _Sim.First any? { % % reinstate the first anchor % ^_Trak.Folder textover } if _Sim.RecentMsec 0 gt _Sim.NewData and { % % data does exist, make a new current focus entry % '