javAPRSlib icon indicating copy to clipboard operation
javAPRSlib copied to clipboard

WX Parser fails on certain formats

Open na7q opened this issue 11 months ago • 5 comments

One example. KA7MYM>APRS,TCPIP*,qAC,AMBCWOP-2:@081706z4322.78N/12416.81W_187/000g002t...r000p028P028h...b10295L063AmbientCWOP.com"

na7q avatar Feb 08 '25 22:02 na7q

I just got back in the country. Let me take a look at this and see what's going on. That's a pretty complex object, but should be at least mostly decoded.

ab0oo avatar Feb 11 '25 15:02 ab0oo

It's complex and mostly there for sure. I'm attempting to get APRSdroid up to date with decoding abilities, and ran into this issue. Lots of work to do every which way!

na7q avatar Feb 12 '25 00:02 na7q

I added this to src/test/resources/cwop.txt and then ran src/test/java/net/ab0oo/aprs/parser/TestFile against that entire CWOP dump, and it spit this back: KA7MYM>APRS Via Digis: TCPIP*,QAC,AMBCWOP-2 Raw Bytes: @081706z4322.78N/12416.81W_187/000g002t...r000p028P028h...b10295L063AmbientCWOP.com Data Type Identifier: @ Create Timestamp: Wed Feb 12 08:41:54 PST 2025 Comment:
Class net.ab0oo.aprs.parser.PositionField ---POSITION--- Position Source Uncompressed Is Compressed: false Latitude: 43.37967 Longitude: -124.28017 Comment: null Class net.ab0oo.aprs.parser.WeatherField ---WEATHER--- Wind Direction: 187 Wind Speed: 0 Wind Gust: 2 Temperature: null Rain last hour: 0.0 Rain 24 hours: 0.28 Rain since 00:00: 0.28 Humidity: null Pressure: 10295.0 Class net.ab0oo.aprs.parser.TimeField ---TIMESTAMP--- Reported Timestamp: 08 09:02

No errors, and the only thing the library is missing is the Luminosity > 1000 watts/meter^2, whcih looks like it should be 1063 in this case. This is off trunk, btw. this line should be extracting that info, and it looks like it's not... https://vscode.dev/github/ab0oo/javAPRSlib/blob/v3.1.1/src/main/java/net/ab0oo/aprs/parser/WeatherParser.java#L124

I'll bang on it a bit and see if I can figure out why it's failing to parse that. 25 years ago, the PCRE and I were best friends. I think those memory cells were overwritten by several years of having to sit through middle school girls basketball games in the mid 2000s.

Did you see anything else that was Not Right?

ab0oo avatar Feb 12 '25 16:02 ab0oo

Something I would like to see fixed as well might be the Q construct. Making it all uppercase gives the appearance of it as a digipath and not a Q construct.

na7q avatar Feb 13 '25 02:02 na7q

Ok, I just pushed a massive set of changes. Most of it was formatting and documentation (javadocs), but there are also some pretty important parsing fixes. I'm going to pull your working fork and see what I can do.

ab0oo avatar Feb 13 '25 03:02 ab0oo