openwatersio / openwatersio/tide-database
Include current stations in the XTide TCD build
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25
- Forks
- 6
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 10
Description
The XTide TCD build ships tide stations only. packages/tcd/build.ts filters out every station whose kind is current before writing harmonics.txt and offsets.xml, so the 2,586 NOAA current stations in the unified database never reach XTide, OpenCPN, or any other libtcd reader. Raised on https://github.com/openwatersio/tide-database/pull/131#discussion_r3996988130 and deferred to keep that PR to the data model.
libtcd has carried current stations since the original harmonics files, so this is a mapping exercise rather than a format change. A reference current is a harmonic record whose level units are knots, with flood_begins and ebb_begins for the slack times and min_direction and max_direction for the ebb and flood headings in degrees true. A subordinate current is an offsets record against a reference current, with time adds for the flood and ebb extremes and level multipliers for the speed ratios. 881 of the current stations are reference records and 856 of those carry harmonics; the 25 without are identity-only and should be skipped the same way the identity-only CHS tide ports are.
Things to settle while doing it:
- Map
flood_direction,ebb_direction, andmean_flowonto the libtcd direction and level fields, and confirm what XTide does with a reference current that has no mean flow. - Map the subordinate
offsets(slack_before_flood,slack_before_ebb,flood_time,ebb_time,flood_speed_ratio,ebb_speed_ratio) onto the offsets.xml fields, and decide what to write when a field is flagged missing. - Keep current reference stations out of the tide master constituent list where their constituent sets differ, or confirm
build_tide_dbaccepts one shared list. - Extend the tcd tests to cover a current reference and a current subordinate in both unit systems, and check the metric build reports speeds in knots rather than converting them.
- Check the result loads in XTide and OpenCPN, since #106 shows readers are stricter than
build_tide_db.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/tcd/build.ts and trace how current stations are filtered before harmonics.txt and offsets.xml are written. Read the existing tide and CHS identity-only handling, then inspect the tcd tests and build_tide_db behavior for unit systems and constituent lists. Done means current reference and subordinate records map correctly, missing fields are handled, tests cover both unit systems, and the output loads in XTide and OpenCPN.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, data, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100