@@ -619,6 +619,21 @@ static int filt_bodgu (pfstate_t *pf, char *arg)
619
619
*
620
620
*------------------------------------------------------------------------------*/
621
621
622
+ /* Telemetry metadata is a special case of message. */
623
+ /* We want to categorize it as telemetry rather than message. */
624
+
625
+ static int is_telem_metadata (char * infop )
626
+ {
627
+ if (* infop != ':' ) return (0 );
628
+ if (strlen (infop ) < 16 ) return (0 );
629
+ if (strncmp (infop + 10 , ":PARM." , 6 ) == 0 ) return (1 );
630
+ if (strncmp (infop + 10 , ":UNIT." , 6 ) == 0 ) return (1 );
631
+ if (strncmp (infop + 10 , ":EQNS." , 6 ) == 0 ) return (1 );
632
+ if (strncmp (infop + 10 , ":BITS." , 6 ) == 0 ) return (1 );
633
+ return (0 );
634
+ }
635
+
636
+
622
637
static int filt_t (pfstate_t * pf )
623
638
{
624
639
char src [AX25_MAX_ADDR_LEN ];
@@ -652,7 +667,7 @@ static int filt_t (pfstate_t *pf)
652
667
break ;
653
668
654
669
case 'm' : /* Message */
655
- if (* infop == ':' ) return (1 );
670
+ if (* infop == ':' && ! is_telem_metadata ( infop ) ) return (1 );
656
671
break ;
657
672
658
673
case 'q' : /* Query */
@@ -665,6 +680,7 @@ static int filt_t (pfstate_t *pf)
665
680
666
681
case 't' : /* Telemetry */
667
682
if (* infop == 'T' ) return (1 );
683
+ if (is_telem_metadata (infop )) return (1 );
668
684
break ;
669
685
670
686
case 'u' : /* User-defined */
@@ -1033,13 +1049,19 @@ int main ()
1033
1049
pftest (112 , "t/t" , "WM1X>APU25N:@210147z4235.39N/07106.58W_359/000g000t027r000P000p000h89b10234/WX REPORT {UIV32N}<0x0d>" , 0 );
1034
1050
pftest (113 , "t/w" , "WM1X>APU25N:@210147z4235.39N/07106.58W_359/000g000t027r000P000p000h89b10234/WX REPORT {UIV32N}<0x0d>" , 1 );
1035
1051
1052
+ /* Telemetry metadata is a special case of message. */
1053
+ pftest (114 , "t/t" , "KJ4SNT>APMI04::KJ4SNT :PARM.Vin,Rx1h,Dg1h,Eff1h,Rx10m,O1,O2,O3,O4,I1,I2,I3,I4" , 1 );
1054
+ pftest (115 , "t/m" , "KJ4SNT>APMI04::KJ4SNT :PARM.Vin,Rx1h,Dg1h,Eff1h,Rx10m,O1,O2,O3,O4,I1,I2,I3,I4" , 0 );
1055
+ pftest (116 , "t/t" , "KB1GKN-10>APRX27,UNCAN,WIDE1*:T#491,4.9,0.3,25.0,0.0,1.0,00000000" , 1 );
1056
+
1057
+
1036
1058
pftest (120 , "t/p" , "CWAPID>APRS::NWS-TTTTT:DDHHMMz,ADVISETYPE,zcs{seq#" , 0 );
1037
1059
pftest (122 , "t/p" , "CWAPID>APRS::SKYCWA :DDHHMMz,ADVISETYPE,zcs{seq#" , 0 );
1038
1060
pftest (123 , "t/p" , "CWAPID>APRS:;CWAttttz *DDHHMMzLATLONICONADVISETYPE{seq#" , 0 );
1039
1061
pftest (124 , "t/n" , "CWAPID>APRS::NWS-TTTTT:DDHHMMz,ADVISETYPE,zcs{seq#" , 1 );
1040
1062
pftest (125 , "t/n" , "CWAPID>APRS::SKYCWA :DDHHMMz,ADVISETYPE,zcs{seq#" , 1 );
1041
1063
pftest (126 , "t/n" , "CWAPID>APRS:;CWAttttz *DDHHMMzLATLONICONADVISETYPE{seq#" , 1 );
1042
- pftest (127 , "t/" , "CWAPID>APRS:;CWAttttz *DDHHMMzLATLONICONADVISETYPE{seq#" , 0 );
1064
+ pftest (127 , "t/" , "CWAPID>APRS:;CWAttttz *DDHHMMzLATLONICONADVISETYPE{seq#" , 0 );
1043
1065
1044
1066
pftest (130 , "r/42.6/-71.3/10" , "WB2OSZ-5>APDW12,WIDE1-1,WIDE2-1:!4237.14NS07120.83W#PHG7140Chelmsford MA" , 1 );
1045
1067
pftest (131 , "r/42.6/-71.3/10" , "WA1PLE-5>APWW10,W1MHL,N8VIM,WIDE2*:@022301h4208.75N/07115.16WoAPRS-IS for Win32" , 0 );
0 commit comments