% % track forward points for history insertion % *traklive 0 !Sim.DataMsec 0 !Sim.Speed 0 !Sim.RecentMsec _Trak.Folder &"reading.cur" exec$ 0 !braks "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)( false !brakn filing dup read exch quoter &" !Trak.File " & _braks 3 ge { % % 4 brackets, move brackets down and process % _brakb !braka _brakc !brakb _brakd !brakc !brakd true !brakn } { % % not 4 brackets yet % _braks < |3 !brakd true !brakn |2 !brakc |1 !brakb |0 !braka > pop +:braks } ifelse % % 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? { 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 % % 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 % % 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 { _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 *trakbrak } 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 % '