73 lines
2.9 KiB
Markdown
73 lines
2.9 KiB
Markdown
# harbour-tide
|
||
|
||
**Universal tide predictions** for Sailfish OS — native Silica client with a
|
||
local harmonic engine (no tide API: offline computation, forever).
|
||
|
||
## Features
|
||
|
||
- **7-constituent harmonic engine** (M2, S2, N2, K1, O1, P1, K2):
|
||
`h(t) = Z₀ + Σ Aᵢ·cos(ωᵢt + φᵢ)`, computed locally
|
||
- **16 known ports** with realistic constants (Italy + London, New York,
|
||
San Francisco, Tokyo, Sydney, Honolulu)
|
||
- **Free city search**: OpenStreetMap geocoding via Photon with offline
|
||
fallback on the local dataset; constants are taken from the known port
|
||
within 222 km, otherwise from a synthetic lat/lon estimate (labelled)
|
||
- **"Nearest port" card** highlighted when opening a searched city
|
||
- **24/48/72 h chart** with high/low tides marked with times, tap for the
|
||
height at a given point
|
||
- **Moon phase and sunrise/sunset** computed
|
||
- **English by default, Italian and English** (language selector in settings:
|
||
English / Italiano / System; `.qm` catalogue in the app data dir)
|
||
- **Saved preferences**: language, preferred port (opened at startup and
|
||
shown on the cover), unit (m/ft), chart range
|
||
|
||
## Build
|
||
|
||
Requires the [Sailfish SDK](https://sailfishos.org/wiki/Sailfish_SDK).
|
||
|
||
```sh
|
||
sfdk target install SailfishOS-5.0.0.62-aarch64 # or your device target
|
||
sfdk target use SailfishOS-5.0.0.62-aarch64
|
||
sfdk build # produces the RPM in RPMS/
|
||
sfdk deploy # installs on the connected device
|
||
```
|
||
|
||
Recommended targets: `aarch64` (Jolla Phone 2026, Xperia 10 II/III),
|
||
`armv7hl` (Xperia X, Jolla C), `x86_64` (emulator).
|
||
|
||
## Structure
|
||
|
||
```
|
||
src/ C++: main.cpp (language + translator), settings
|
||
(QSettings: language, preferredPort, unit, days)
|
||
qml/js/tides.js harmonic engine (pure ES5, Qt 5.6 compatible):
|
||
constants, prediction, extrema, synthetic estimate,
|
||
local geocoding, moon, sun
|
||
qml/pages/ MainPage (ports + free city search), DetailPage
|
||
(canvas chart, events, nearest-port card, astro),
|
||
SettingsPage (language, unit, range, port)
|
||
qml/cover/ cover with preferred port and next tide
|
||
translations/ harbour-tide.ts (EN source), harbour-tide_it.ts
|
||
icons/ icons 86/108/128/172 (make_icons.py, harbour style)
|
||
rpm/ spec and desktop file (SailJail: Internet)
|
||
```
|
||
|
||
## Configuration
|
||
|
||
File: `~/.config/harbour/tide/tide.conf` (QSettings, persistent zone of the
|
||
SailJail sandbox). Keys: `language` (system/en/it), `preferredPort`,
|
||
`unit` (m/ft), `days` (1/2/3).
|
||
|
||
## Known limitations
|
||
|
||
- Port constants are synthetic but realistic; the lat/lon estimate does not
|
||
distinguish closed basins (Mediterranean) from open ocean.
|
||
- Accuracy of a real global model (FES2014/TPXO9): ~10–20 cm in open ocean;
|
||
the engine is ready to receive grid constants.
|
||
- Not for navigation.
|
||
- Language is applied on app restart.
|
||
|
||
## License
|
||
|
||
MIT
|