Consider Navit and OpenCPN
Navit is a navigation app mainly used for roads, it's open source and cross platform, it's using OpenStreetMap maps. https://www.navit-project.org/
OpenCPN is a marine navigation map, it's open source and can be used for example with a Raspberry Pi. The project webpage provides some free charts https://opencpn.org/index.html