|
Post by alexfish on Feb 8, 2021 18:24:44 GMT 1
If have 'gpsdecode ' on system Can try this from the terminal gpsdecode then paste this into the terminal $GPRMC,110308.00,A,5050.98050,N,00120.05352,W,7.959,318.44,300513,,,A*7D $APHDM,320.6,M*34 !AIVDM,1,1,,B,13P91WOOh7OqiApM6dK6w2b>0000,0*6A $IIHDT,318.0,T*28 $APHDM,320.6,M*34 !AIVDM,2,1,6,B,53P<A5P2@Il?8AAGP004j184Pl4pT0000000001M01S0?78@0;D3lU4kCmE2,0*4B !AIVDM,2,2,6,B,00000000002,2*23 !AIVDM,1,1,,A,B3P866h0<gvbHPW@irJWcwS7kP06,0*6C !AIVDM,1,1,,B,33M@D7@u@tOr4Q8M30O62Pn@07U@,0*53 $APHDM,320.7,M*35 $IIRMC,110308,A,5050.978,N,00120.053,W,7.9,319.0,300513,2,W,D*1C $IIRSA,-2,A,,V*48 !AIVDO,1,1,,,B3P9=>h0CovNAlWARfo73wT5sP06,0*65 !AIVDM,1,1,,B,B3P7bIh00?vOrpWAWtD03wT5oP06,0*29 $SDDBT,40.6,f,12.3,M,6.8,F*0A $SDDPT,12.3,*49 $VWMTW,0.20,C*10 $APHDM,320.7,M*35 $RARSD,,,,,,,,,0.196,358.2,0.500,N,N*53 !AIVDM,1,1,,A,33P;=j@pPnwq32LM2ILUw4L@00w0,0*78 $VWVHW,319.1,T,320.7,M,7.29,N,13.5,K*53 $VWVLW,7025.6,N,86.21,N*77
and the results look like pi@raspberrypi:~ $ gpsdecode $GPRMC,110308.00,A,5050.98050,N,00120.05352,W,7.959,318.44,300513,,,A*7D $APHDM,320.6,M*34 !AIVDM,1,1,,B,13P91WOOh7OqiApM6dK6w2b>0000,0*6A $IIHDT,318.0,T*28 $APHDM,320.6,M*34 !AIVDM,2,1,6,B,53P<A5P2@Il?8AAGP004j184Pl4pT0000000001M01S0?78@0;D3lU{"class":"AIS","device":"stdin","type":1,"repeat":0,"mmsi":235028893,"scaled":true,"status":15,"status_text":"Not defined","turn":"fastright","speed":0.7,"accuracy":false,"lon":-1.3610,"lat":50.8640,"course":178.8,"heading":85,"second":7,"maneuver":0,"raim":false,"radio":0} 4kCmE2,0*4B !AIVDM,2,2,6,B,00000000002,2*23 !AIVDM,1,1,,A,B3P866h0<gvbHPW@irJWcwS7kP06,0*6C !AIVDM,1,1,,B,33M@D7@u@tOr4Q8M30O62Pn@07U@,0*53 $APHDM,320.7,M*35 $IIRMC,110308,A,5050.978,N,00120.053,W,7{"class":"ATT","device":"stdin","heading":318.00} .9,319.0,300513,2,W,D*1C $IIRSA,-2,A,,V*48 !AIVDO,1,1,,,B3P9=>h0CovNAlWARfo73wT5sP06,0*65 !AIVDM,1,1,,B,B3P7bIh00?vOrpWAWtD03wT5oP06,0*29 $SDDBT,40.6,f,12.3,M,6.8,F*0A $SDDPT,12.3,*49 $VWMTW,0.20,C*10 $APHDM,320.7,M*35 $RARSD,,,,,,,,,0.196,{"class":"AIS","device":"stdin","type":5,"repeat":0,"mmsi":235082006,"scaled":true,"imo":9463619,"ais_version":0,"callsign":"2DTU8","shipname":"AL RAHMANI","shiptype":93,"shiptype_text":"Other Type - Hazardous category C","to_bow":0,"to_stern":99,"to_port":0,"to_starboard":15,"epfd":1,"epfd_text":"GPS","eta":"12-16T16:00Z","draught":4.5,"destination":"PORTSMOUTH","dte":0} 358.2,0.500,N,N*53 !AIVDM,1,1,,A,33P;=j@pPnwq32LM2ILUw4L@00w0,0*78 $VWVHW,319.1,T,320.7,M,7.29,N,13.5,K*53 $VWVLW,7025.6,N,86.21,N*77{"class":"AIS","device":"stdin","type":18,"repeat":0,"mmsi":235013659,"scaled":true,"reserved":0,"speed":5.0,"accuracy":true,"lon":-1.1690,"lat":50.7664,"course":268.2,"heading":511,"second":6,"regional":0,"cs":true,"display":true,"dsc":true,"band":true,"msg22":true,"raim":false,"radio":917510} {"class":"AIS","device":"stdin","type":3,"repeat":0,"mmsi":232002589,"scaled":true,"status":0,"status_text":"Under way using engine","turn":5,"speed":6.0,"accuracy":false,"lon":-1.2953,"lat":50.7633,"course":154.6,"heading":27,"second":8,"maneuver":0,"raim":false,"radio":31056} {"class":"AIS","device":"stdin","type":18,"repeat":0,"mmsi":235031867,"scaled":true,"reserved":0,"speed":7.9,"accuracy":false,"lon":-1.3342,"lat":50.8497,"course":318.4,"heading":511,"second":8,"regional":0,"cs":true,"display":false,"dsc":true,"band":true,"msg22":true,"raim":false,"radio":917510} {"class":"AIS","device":"stdin","type":18,"repeat":0,"mmsi":235006567,"scaled":true,"reserved":0,"speed":0.0,"accuracy":true,"lon":-1.3118,"lat":50.8586,"course":0.0,"heading":511,"second":8,"regional":0,"cs":true,"display":false,"dsc":true,"band":true,"msg22":true,"raim":true,"radio":917510} {"class":"TPV","device":"stdin","mode":3,"time":"2013-05-30T11:03:08.000Z","ept":0.005,"lat":50.849633333,"lon":-1.334216667,"alt":-12.300,"track":319.0000,"speed":4.064} {"class":"TPV","device":"stdin","mode":3,"time":"2013-05-30T11:03:08.000Z","ept":0.005,"lat":50.849633333,"lon":-1.334216667,"alt":-12.300,"track":319.0000,"speed":4.064,"climb":0.000} {"class":"AIS","device":"stdin","type":3,"repeat":0,"mmsi":235064777,"scaled":true,"status":0,"status_text":"Under way using engine","turn":40,"speed":5.4,"accuracy":true,"lon":-1.5188,"lat":50.7466,"course":153.2,"heading":142,"second":8,"maneuver":0,"raim":false,"radio":4032}
in there is ship name & destination + a whole bunch of other bits If I feed the last line coords lat and long into My nav app {"class":"AIS","device":"stdin","type":3,"repeat":0,"mmsi":235064777,"scaled":true,"status":0,"status_text":"Under way using engine","turn":40,"speed":5.4,"accuracy":true,"lon":-1.5188,"lat":50.7466,"course":153.2,"heading":142,"second":8,"maneuver":0,"raim":false,"radio":4032} Then here is a picky , the black rect is the position BR Alex Attachments:
|
|
|
Post by alexfish on Feb 9, 2021 0:54:46 GMT 1
Hi All using data file to parse gps & ais data AIVDM$ = " swmulti.txt " GPSD$ = " | gpsdecode" ECHO$ = "cat " & AIVDM$ & GPSD$ res$ = EXEC$(ECHO$)
res$ = REPLACE$(res$,CHR$(34),"") res$ = REPLACE$(res$,":","= ") res$ = REPLACE$(res$,"{","{\n") res$ = REPLACE$(res$,"}","\n{") LOCAL dimention TYPE int
SPLIT res$ BY "," TO ary$ SIZE dimention
FOR s = 0 TO dimention -1 a$ = ary$[s] PRINT a$ NEXT
Have Fun + BR Alex NOTE:: got error message forum has exceeded its data limit SO::cant upload archive file part of the file : save as swmulti.txt !AIVDM,1,1,,B,33HPHw0Ok<OsVd8LtsbehJv<00T@,0*2C $GPRMC,110307.00,A,5050.97880,N,00120.05125,W,8.057,318.09,300513,,,A*7B $APHDM,320.4,M*36 !AIVDM,1,1,,A,13P8kbw000wqWcrM7HvTc`N:00Ro,0*18 $APHDM,320.4,M*36 $IIGGA,110307,5050.976,N,00120.050,W,2,09,1,2,M,47,M,1,0000*68 !AIVDM,1,1,,A,13P9<@@01RwrrPhM40?6=Tv<05H<,0*7F $APHDM,320.5,M*37 $IIHSC,318.5,T,320.5,M*4A !AIVDM,1,1,,B,33c:f65wh0OqO6nM86m5Vkf@0DgJ,0*46 $IIMWD,020.0,T,022.0,M,8.8,N,4.5,M*47 !AIVDO,1,1,,,B3P9=>h0D7vNB07ARek6kwSUsP06,0*3C $APHDM,320.5,M*37 $IIVLW,7025.6,N,86.21,N*76 $APHDM,320.5,M*37 $IIVTG,319.0,T,321.0,M,7.9,N,14.6,K*6F !AIVDM,1,1,,B,33P;=khP@owq37hM2P:evc8>00u1,0*42 $IIRSA,-2,A,,V*48 $APHDM,320.5,M*37 !AIVDM,1,1,,B,13P;Qdh000wrs4RM4<pi2Jt<0H4Q,0*40 $GPGBS,110307.00,2.1,1.4,2.6,,,,*47 !AIVDM,1,1,,A,B3P;Ahh0FgvcH5W@i5hfswSUoP06,0*7A $APHDM,320.5,M*37 $IIBWC,110308,,,,,,T,,M,,N,*0A !AIVDM,1,1,,B,13M@Dw?001wqWKtM7I3TN30>0PRi,0*05 $APHDM,320.5,M*37 !AIVDM,1,1,,A,13M@GB@3UJOqvELM5gkULlH>00S3,0*16 $IIDBT,40.6,f,12.38,M,6.76,F*1C !AIVDM,1,1,,A,13P:dtHP00wqa0RM7l@h0?v>2@4b,0*1E $APHDM,320.6,M*34 !AIVDM,1,1,,B,33coU<5v@ROqs8<M5jEUKTJb0P01,0*0C !AIVDM,1,1,,B,16?UhJw000wqbPTM85w9kn0@00St,0*11 $APHDM,320.6,M*34 $IIGLL,5050.978,N,00120.053,W,110308,A,D*4F $IIHDG,320.0,,,2,W*2D $IIHDM,320.0,M*23 $GPRMC,110308.00,A,5050.98050,N,00120.05352,W,7.959,318.44,300513,,,A*7D $APHDM,320.6,M*34 !AIVDM,1,1,,B,13P91WOOh7OqiApM6dK6w2b>0000,0*6A $IIHDT,318.0,T*28 $APHDM,320.6,M*34 !AIVDM,2,1,6,B,53P<A5P2@Il?8AAGP004j184Pl4pT0000000001M01S0?78@0;D3lU4kCmE2,0*4B !AIVDM,2,2,6,B,00000000002,2*23 !AIVDM,1,1,,A,B3P866h0<gvbHPW@irJWcwS7kP06,0*6C !AIVDM,1,1,,B,33M@D7@u@tOr4Q8M30O62Pn@07U@,0*53 $APHDM,320.7,M*35 $IIRMC,110308,A,5050.978,N,00120.053,W,7.9,319.0,300513,2,W,D*1C $IIRSA,-2,A,,V*48 !AIVDO,1,1,,,B3P9=>h0CovNAlWARfo73wT5sP06,0*65 !AIVDM,1,1,,B,B3P7bIh00?vOrpWAWtD03wT5oP06,0*29 $SDDBT,40.6,f,12.3,M,6.8,F*0A $SDDPT,12.3,*49 $VWMTW,0.20,C*10 $APHDM,320.7,M*35 $RARSD,,,,,,,,,0.196,358.2,0.500,N,N*53 !AIVDM,1,1,,A,33P;=j@pPnwq32LM2ILUw4L@00w0,0*78 $VWVHW,319.1,T,320.7,M,7.29,N,13.5,K*53 $VWVLW,7025.6,N,86.21,N*77 $IIMWV,024.0,R,16.3,N,A*0F $GPGGA,110311.93,5050.980,N,00120.055,W,2,09,1.0,0.20,M,4.70,M,0.10,0*60
|
|