This commit is contained in:
2026-04-05 20:27:43 -04:00
commit 32a690d85b
32 changed files with 5325 additions and 0 deletions

0
docs/library.md Executable file
View File

114
docs/maps.md Executable file
View File

@@ -0,0 +1,114 @@
# Maps
MRS comes with a self-hosted tile server to provide offline maps using [TileServer GL](https://github.com/maptiler/tileserver-gl).
While everything comes pre-configured this guide will walkthrough the setup + integration.
## Table of Contents
- [MRS](../README.md)
- [Maps](#maps)
- [Usage]()
- [Adding Maps]()
- [Adding Contours]()
## Usage
The TileServer can be viewed at http://localhost:5000
Other applications can use the tileserver by configure the application to use:
- **Raster**: http://localhost:8080/data/{id}/{z}/{x}/{y}.png
- **Vector**: http://localhost:8080/data/{id}/{z}/{x}/{y}.pbf
### Commands
- **Setup:** `docker run -d --name maps --restart unless-stopped -p 5000:8080 -v /media/maps/tiles:/data -v /media/maps/styles:/styles maptiler/tileserver-gl:v4.11.0`
- **Restart:** `docker restart maps`
- **Start:** `docker start maps`
- **Stop:** `docker stop maps`
## Adding Maps / Styles
TileServer GL works with both vector & raster map tiles.
1. [Download](https://www.maptiler.com/on-prem-datasets/planet/) map tiles
2. Upload tiles file to `/media/maps/tiles`
3. Upload styles to `/media/maps/styles`
4. Reboot TileServer GL: `docker restart maps`
## Adding Contours
All topographic maps I have found cost thousands of dollars. With that in mind, these instructions will compile our own topographic layer we can add to any tileset.
### 1. 📁 Download Topographic Data
Topography data sets can be downloaded from [OpenTopography](https://portal.opentopography.org/dataCatalog).
Follow the instructions to sign up & download **GEBCO Global Bathymetry and Topography**
### 2. 📦 Tooling Setup
```bash
sudo apt update
sudo apt install -y gdal-bin build-essential sqlite3 libsqlite3-dev git wget unzip docker.io zlib1g-dev
git clone https://github.com/mapbox/tippecanoe.git
cd tippecanoe
make -j$(nproc)
sudo make install
cd ..
```
### 3. 🌄 Generate Global 50 m Contours
> This step is heavy, dont run on Pi — expect 6090 GB raw GeoJSON before being compressed to ~2-4 GB
```bash
gdal_contour -f GeoJSONSeq
-a ele \ # elevation attribute
-i 50 \ # interval (50 m)
GEBCOIceTopo.vrt global_50.geojsonl
tippecanoe -o contours_50m.mbtiles \
-Z0 -z12 \ # min/max zoom levels
--drop-densest-as-needed \ # keep tiles small
--extend-zooms-if-still-dropping \ # avoid data loss
--layer=contour \ # layer name
--read-parallel --reorder \ # faster + optimized
global_50.geojsonl
```
### 4. 🎨 Add contours to style
Create / Modify a style.json
```json
{
"version": 8,
"name": "Terrain",
"sources": {
...
"contours": {
"type": "vector",
"url": "mbtiles://contours_50m.mbtiles"
}
},
"layers": [
...
{
"id": "contours-major",
"type": "line",
"source": "contours",
"source-layer": "contour",
"minzoom": 0,
"maxzoom": 6,
"filter": [">=", "ele", 1000],
"paint": { "line-color": "#888", "line-width": 0.4 }
},
{
"id": "contours-detailed",
"type": "line",
"source": "contours",
"source-layer": "contour",
"minzoom": 7,
"paint": { "line-color": "#666", "line-width": 0.3 }
}
]
}
```

76
docs/setup.md Executable file
View File

@@ -0,0 +1,76 @@
# Setup
### Hardware
- Raspberry Pi 5
- 4 GB - No AI
- 8 GB - Small AI
- 16GB - Medium AI
- SD card (recommended 500 GB - 1 TB)
- Gutenberg Project (~80 GB)
- Khan Academy (~180 GB)
- Satellite Maps (150-300 GB)
- Vector Maps (60 - 100 GB)
- Wikipedia (~120 GB)
- [Duel M.2 NVMe hat](https://www.amazon.ca/dp/B0D83784HS?ref=ppx_yo2ov_dt_b_fed_asin_title)
- [M.2 A+E key to M key adapter](https://www.amazon.ca/dp/B0CP7F55S8?ref=ppx_yo2ov_dt_b_fed_asin_title)
- [Intel AX210 WiFi modem](https://www.amazon.ca/dp/B0B39631G1?ref=ppx_yo2ov_dt_b_fed_asin_title)
- [M.2 HaLow modem](https://www.seeedstudio.com/Wio-WM6180-Wi-Fi-HaLow-mini-PCIe-Module-p-6394.html?srsltid=AfmBOopb8Phtr-IBBvYRn5AB5NQNuGIK2tC3we4ceaA_0QiX1JD78-Qs)
- BE-180 GPS Module or [BE-220 GPS Module](https://www.amazon.ca/Geekstory-Navigation-38400bps-Raspberry-Controller/dp/B0BV2MV2GN/ref=sr_1_16_sspa?crid=3N5GO07PGL65Y&dib=eyJ2IjoiMSJ9.Co3Uo8H4Xww9Sh693R4fJJokreDApWile1X8epOqTfZqvQbix_mZr566DdLs_cTuWwurRGQZHlt2nFhdAiW4SZZ1HvsdLlBsqUWOEF7gav47G8Z6xFNT97E1jQLuc0j-PuSRGgMPd0gktZenNz4PkQ.Jma35qmqkNfqByw4Rdk4N7H0eM4CILfcf67G4gV2CD4&dib_tag=se&keywords=gms%2Buart&qid=1758982047&sprefix=gms%2Buart%2Caps%2C84&sr=8-16-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9idGY&th=1)
- [Lora WisBlock Mini](https://www.amazon.ca/RAKwireless-WisBlock-Meshtastic-Starter-RAK19003/dp/B0DFMMTQZM/ref=sr_1_3?crid=QS5X4FYBC5H4&dib=eyJ2IjoiMSJ9.yzgzN2wMOGRfrwlfFeUwsCia4FERbPXPTBnq2WddC2An9Ni_Z2GAgGhquS96QFbSDzvlGu2X070zss9ggbEKGSLgrvRwvmF_mueX5aukwK_xB3S0VFJCsagWRIXdIIrX3k5cF0Seo_NoyuhmfD5wZkR9b0MInx5oRSrJ37Pd0BjERXpxZ3udlIJYf4mBgaGjNDrWc5rYu31deOGOdBfD54lbsrogePm4lb1nhz5Bs81wZTuCCDIm7V0QzO-2mq3Aj2_TLjY-F4F09C1zUm7_fYs9bGPEFmZ6N-syZFNoV6A.oUArviz-pLwgnF9wPrvf-MNKLIyQxwe0hy7uWhXqOVo&dib_tag=se&keywords=wisblock&qid=1758982932&s=electronics&sprefix=wisblock%2Celectronics%2C79&sr=1-3&th=1)
- [E-ink display & momentary switch](https://www.amazon.ca/dp/B0D5DGZXG3?ref=ppx_yo2ov_dt_b_fed_asin_title)
- Rotary Encoder
- USB C 4-pin breakout + 22 AWG wire
- 4x SMA connectors + pigtails 6"
- *Optional: Power bank - Off grid power*
- *Optional: Copper tape - Increases reception*
- *Optional: [SDR](https://www.amazon.ca/dp/B0747LVW59/ref=sspa_dk_detail_1?psc=1&pd_rd_i=B0747LVW59&pd_rd_w=N68sx&content-id=amzn1.sym.516c2169-755e-413a-a38a-68230f4ab66f&pf_rd_p=516c2169-755e-413a-a38a-68230f4ab66f&pf_rd_r=Z9QJD2SRSYTG0HNFHKWP&pd_rd_wg=NBvG6&pd_rd_r=32aa78ce-63df-481d-bc40-f802b5dbd8f2&sp_csd=d2lkZ2V0TmFtZT1zcF9kZXRhaWw) - RF/ADS-B Monitoring*
- *Optional: [Extra WiFi Dongle](https://www.amazon.ca/dp/B01GC8XH0S?ref=ppx_yo2ov_dt_b_fed_asin_title) - Wireless monitoring without sacrificing mesh or AP*
- *Optional: [NRF24LU1 2.4GHz transceiver](https://www.amazon.ca/dp/B09GCLCWYL?ref=ppx_yo2ov_dt_b_fed_asin_title) - HID hacking*
### Instructions
1) Flash your wisblock with meshtastic: https://flasher.meshtastic.org/
2) Flash SD card with Raspbian, ensure Hostname/User/Wifi/SSH is setup
3) Configure OS/Kernal & reboot: `raspi-config`
1) Update
2) Interface Options > SSH > Enable
3) Interface Options > VNC > Disable
4) Interface Options > SPI > Enable
5) Interface Options > Serial Port > Disable Login Shell > Enable Hardware
6) Advanced > Wayland > X11
7) Advanced > Expand Filesystem
4) Run setup script: 'chmod +x setup.sh && ./setup.sh'
5) Configure Guacamole
1) Login: `guacadmin/guacadmin`
2) guacadmin > settings
3) Users > Create user & delete guacadmin
4) Connections
1) Desktop
- Name: `Desktop`
- Protocol: `RDP`
- Network > Host: `127.0.0.1`
- Network > Port: `3389`
- Authentication > Security mode: `RDP Encryption`
- Performance > Disable Graphics Pipeline Extension: `true`
- *Optional: username / password*
2) Terminal
- Name: `Terminal`
- Protocol: `SSH`
- Network > Host: `127.0.0.1`
- Network > Port: `22`
- *Optional: username / password*
6) Update filebrowser password
7) Create open-webui admin account & allow registration
8) Create element admin account
9) Download [Kiwix](https://library.kiwix.com) zims
##
## TODO
- Create a captive portal with onboarding, PWA, links to all tools
- Create settings page for managing lora, mesh, wifi & AP
- Create a proxy for the [kiwix library](https://library.kiwix.org) that downloads zim files straight to the archive
- Also create a page for making custom zim files and uploading them straight to the archive
```bash
docker run --rm -it -v $(pwd)/output:/output openzim/zimit https://example.com mysite
```