News for hackers. Stuff that matters.
Re:Show HN: Tiny FOSS Compass and Navigation App (<2MB) by jacquesm on Wednesday January 14, 2026 @06:51AM (#46614995)
Neat. If you want to make it more practically useful you will need to include some kind of magnetic compensation map. That's one of the reason navigation apps usually are a bit larger, they require a lot of data to function well world wide. Best of luck with this, it looks very promising!
Re:Show HN: Tiny FOSS Compass and Navigation App (<2MB) by nativeforks on Wednesday January 14, 2026 @06:59AM (#46615074)
Thanks! Currently, MBCompass can show both magnetic north using Android’s sensor fusion and true north (based on WGS84 geodetic coordinates).

Adding a magnetic compensation map sounds like a great fit for improving global accuracy without changing the app’s core goals. Thanks for the suggestion.

Re:Show HN: Tiny FOSS Compass and Navigation App (<2MB) by jacquesm on Wednesday January 14, 2026 @10:37AM (#46617260)
YW, there are some pretty compact representations possible of that data but it will come at a considerable expense in computational overhead.

https://www.ncei.noaa.gov/products/earth-magnetic-model-anom...

Is a good starting point.

Re:Show HN: Tiny FOSS Compass and Navigation App (<2MB) by xavieralexandre on Thursday January 15, 2026 @03:26AM (#46629708)
You are linking to the magnetic anomaly grid, which is primarily intended for geophysical research and modeling local variations.

For a basic compass app, you can rely on the World Magnetic Model (WMM) instead: https://www.ncei.noaa.gov/products/world-magnetic-model

From that, you can pre-compute a low-resolution declination grid. NOAA even provides one here: https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml#i.... That’s only a few KB of data and requires just a simple declination subtraction based on lat/lon, similar to how it’s handled on nautical charts. This works fine as long as you stay away from the poles (and Alaska).

Re:Show HN: Tiny FOSS Compass and Navigation App (<2MB) by jacquesm on Thursday January 15, 2026 @09:22AM (#46632931)
Near ore deposits the map resolution needs to go up considerable beyond the 'few KB of data' to keep it working. Nautical charts are simpler because there is as a rule a bit more distance between the compass and any anomalies but in certain mineral rich areas of the world that definitely is not the case.
Re:Show HN: Tiny FOSS Compass and Navigation App (<2MB) by xavieralexandre on Thursday January 15, 2026 @10:40AM (#46634097)
Thanks. I was mostly basing my answer on my experience with nautical charts, where declination corrections are typically uniform over relatively large areas and local anomalies are less of a concern. I hadn’t considered how much more variable the field can be in terrestrial use.