Open szsun opened 1 year ago
This is a sample code ported directly from Android. It is used to display the heat map as a picture. The data range from the radar is -128~128
I've found this confusing too and it is not necessary. There is nothing wrong with negative X coordinate, chart libraries capable of displaying 3D heat map (like e-charts) handle it just fine.
https://github.com/AeroSenseSw/AeroSenseAssure/blob/48b6de882c4f221aae86c9ec9de3aff9780073ed/src/main/java/com/aerosense/radar/tcp/service/fromRadar/ReportHeatMapHandler.java#L64
I think this line should use the AND logic: if (x < 128 && -x < 128)
Question: why does the method return x-256 for cases when x>=128 or x<=-128?