Boat Position

Àpèjúwe

Boat Position turns your WordPress site into a live tracking and logbook service for your boat.

The plugin is designed around the Teltonika RUTX50 router (*), a compact Linux-based 5G router with built-in GPS.
A shell script on the router sends a position to your site every minute. The plugin stores each position, runs a state machine to group positions into trips and legs, and serves two public pages:

  • Live map (/boat-position/map) — shows the current position on an OpenStreetMap/OpenSeaMap map with a rotating arrow icon when underway and an idle indicator when stopped.
  • Logbook (/boat-position/history) — calendar sidebar with trip history. Click any day to see the full route on the map. Logged-in editors can label harbour names and merge incorrectly split trips.

Over 150 Danish harbours are included as seed data so harbour names are detected automatically from GPS coordinates.

No third-party services or API keys are required beyond your own WordPress site. Maps are rendered using the free Leaflet.js library with OpenStreetMap and OpenSeaMap tiles.

(*) There are other alternatives to using the RTUTX50 router, any device that has access to a GPS and the internet can be configured as the source of position data.
E.g. a linux machine like Rasberry PI connected to either its own GPS or the boat NMEA data.

Àwọn àwòrán ìbòjú

  • Live map — current boat position with directional arrow on OpenSeaMap.
  • Logbook — calendar sidebar, trip list, and route drawn on the map.

Ìgbéwọlẹ̀

  1. Upload the boat-position directory to /wp-content/plugins/.
  2. Activate the plugin in Plugins in the WordPress admin.
  3. Go to Settings Boat Position to set a secret API key and find the router configuration instructions.
  4. Follow the router setup guide in Plugins Boat Position About to configure your routerÌtumọ̀ Yorùbá: ’s sendgps.sh script and cron job.
  5. Send a test position from a command prompt to verify the endpoint is working before installing on the boat.

After activation, if /boat-position/map returns a 404, go to Settings Permalinks and click Save Changes to flush the rewrite rules.

FAQ

How do I use this plugin?

Install and activate the plugin, then go to Settings Boat Position. Set a secret API key, then follow the router configuration guide in the About page to set up your routerÌtumọ̀ Yorùbá: ’s cron job.

Does it only work with the RUTX50 router?

No. Any device that can send an HTTP POST request with lat, lon, speed, course, and gps_time fields to the REST endpoint will work. The About page documents the exact format.

Where are the public pages?

The plugin registers two pages automatically — no WordPress pages or shortcodes are needed:

  • Live map: https://yoursite.com/boat-position/map
  • Logbook: https://yoursite.com/boat-position/history

Can I avoid storing the secret key in the database?

Yes. Define the key as a constant in wp-config.php:

define( ‘PCIO_BOAT_POSITION_API_KEY’, ‘your-secret-key-here’ );

When this constant is present, the database option is ignored and the settings field is shown as read-only.

The logbook is empty — no trips appear.

Check that the router is sending data by looking at your databaseÌtumọ̀ Yorùbá: ’s wp_boat_positions table. If rows are present but no trips appear, the trip engine may not have processed them yet — visit the ingest endpoint directly or check the About page for the manual trigger curl command.

Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

Àwọn Olùkópa & Olùgbéejáde

“Boat Position” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

Túmọ̀ “Boat Position” sí èdè rẹ.

Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.

Àkọsílẹ̀ àwọn àyípadà

1.0

  • Initial release.