Conversation

I took sort of a first pass at the binary format used by the METAR viewer applet I dumped last month. Got as far as identifying the bytes that encode latitude and longitude before concluding I was out of my league. The disassembly implies they're encoded as (presumably signed) floats, but I wasn't able to work out the details.

Doesn't help that I know next to nothing about Java... 🤷‍♀️

2
0
0

For instance, the sequence 0x422B0000 C2AC3333 should be encoding a latitude and longitude of 42.7429N -86.1074E or something close to it, but I'm not sure of exactly what the format is.

2
0
0

@PurpleJillybeans How do you figure they're floats? Floats really don't make much sense for representing geographic coördinates[1], but fixed-point fractions might.

[1] although a lazy engineer might use those anyway, because "they're the Real:s"

1
0
0

@PurpleJillybeans Do you have some more of these correspondences?

0
0
0
@PurpleJillybeans There are pretty good Java decompilers out there (e.g. jd-gui), so you don't have to mess with the bytecode.
0
0
2

@riley I'm seeing stuff like this in the disassembly:

78 aload 4
80 aload_1
81 invokevirtual java.io.DataInputStream.readFloat()
84 invokevirtual edu.ucar.rap.datacanvasWeb.DetailDisplayer.setLat(float)
87 aload 4
89 aload_1
90 invokevirtual java.io.DataInputStream.readFloat()
93 invokevirtual edu.ucar.rap.datacanvasWeb.DetailDisplayer.setLon(float)

The original data server is still up so I'm able to get current data, and the locations of METAR sites are public info.

1
0
0

@PurpleJillybeans Okay, then makes sense to look for a float-based representation.

I'm afraid I'm not familiar with METAR. But I have dealt with some pretty weird numeric representations. If you helped me get a bunch of mappings, I might be able to recognise the representation pattern.

1
0
0

@riley https://archive.org/details/java_metars

Look for the "metars_cgi.cgi" files for the encoded data, and "stations.txt" for the site coordinates (in DMS; you'll likely have to convert to decimal degrees)

If you have a browser with Java applet support, the original site is still up.

1
0
0

@PurpleJillybeans I might be able to get a Java-capable browser up and running, it turns out.

0
0
0