% % decode and record location points % % process remote data collections, % every 10 seconds nodejs TkApp generates a new time-stamped file for log append % do every file existing of wildard, tkapp works with other file % them renames it when it switches to a new name (time interval) % % %%% (087076885445BP00352887076885445HSOP5D) %%% (087076885445BR00181104A3759.4630N08542.4971W000.0153822000.00,00000000L00000000) % % run number, always 0 % % device partial (11 last characters of 15) imei: 352887076885445 received: 87076885445 % 0 !Sim.LastOp 0 !Sim.LastShake 0 !Sim.LastData empty !Sim.DataGap empty !Sim.ShakeGap { empty "Dev??_*" conntext File.NextOf isnull { pop true } { dup ofconn !Dev.File dup term2 !Dev.Minute !Dev.Froot _Dev.File read % % stack: incoming-data % { "(" right$ ")" slicex isnull ? second "[" right$ "]" left$ !Sim.Msec % % stack: remaining-data message-data % dup 1 left !Sim.Run -1 left dup 11 left !Sim.PartImei -11 left dup 4 left !Sim.Record -4 left _Sim.Record < |BP00 %%% 352887076885445HSOP5D % % up data handshake from device % dup 4 left !Sim.Device -4 left dup 11 left !Sim.PartImei2 -11 left dup 4 left !Sim.Operating -4 left dup 2 left !Sim.BatHex _Sim.Msec !Sim.Shake -2 left !Sim.Flags % % check battery percentage, report change % _Sim.PartImei ^"Bat." _ _Sim.BatHex eq$ { % % no change in battery percentage % } { % % battery percentage change % _Sim.BatHex _Sim.PartImei ^"Bat." ! } ifelse |BR00 % % data delivery from device % % 181104 A 3759.4630N 08542.4971W 000.0 153822 000.00 , 00000000L 00000000 % % GPS data acquisition time is Nov 4, 2018 % "A" shows the data is available % 37 degrees and 59.4630 minutes North latitude % 085 degrees and 42.4971 minutes West longitude % speed is 000.0km/h, % Universal time is 15:38:22 % the bearing angle is 000.00 degrees, from due north % ”L” means the sum of distance, unit is meter,mileage statistic % aux info is 00000000, two or more additional letters would show alarm status % dup 6 left dup 2 left ^"20" exch -2 left dup 2 left &"/" exch -2 left & &"/" ^ !Sim.Date -6 left dup 1 left !Sim.DataValid -1 left dup 10 left !Sim.RawLat -10 left dup 11 left !Sim.RawLon -11 left dup 5 left !Sim.Speed -5 left dup 6 left dup 2 left exch -2 left dup 2 left exch -2 left ^":" & ^":" & !Sim.Utc -6 left dup 6 left !Sim.Bearing -6 left dup 1 left !Sim.Comma -1 left dup 9 left !Sim.Distance -9 left dup 8 left !Sim.Aux -8 left !Sim.Flags _Sim.Msec _Sim.LastData sub 140000 gt { _Sim.Msec _Sim.LastData sub !Sim.DataGap } if _Sim.Msec !Sim.LastData *traku103 > { } { "record " &_Sim.Record &" " &_Dev.File log# pop } ifelse % % stack: remaining-data % } loop pop2 _Dev.File ".xdx" overext false } ifelse ? } loop