I took sort of a first pass at #ReverseEngineering the binary format used by the #Java 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... 🤷♀️
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.
@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"
@PurpleJillybeans Do you have some more of these correspondences?
@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.
@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.
@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.
@PurpleJillybeans I might be able to get a Java-capable browser up and running, it turns out.