colregs 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -14
- package/data/applicability.json +295 -276
- package/data/facts.json +19 -19
- package/data/i18n/en.json +73 -7
- package/data/i18n/fi.json +5 -5
- package/data/lights.json +10 -20
- package/data/version.json +1 -1
- package/docs/adr/0010-text-withheld-jurisdictions.md +2 -0
- package/docs/adr/0011-api-shape.md +7 -7
- package/docs/adr/0012-trace-and-rule2-departure-api.md +2 -2
- package/docs/adr/0016-encounter-roles-are-pooled-across-frames.md +82 -0
- package/docs/adr/0017-closed-vocabularies-are-prefixed-identifiers.md +105 -0
- package/docs/adr/0018-jurisdiction-delta-is-a-merge-patch.md +102 -0
- package/docs/adr/0019-relation-reach-and-import-reads.md +106 -0
- package/docs/budgets.json +6 -1
- package/docs/decisions.md +8 -0
- package/docs/identifiers.md +77 -60
- package/docs/part-b-invariants.md +41 -38
- package/docs/requirements.md +137 -137
- package/fixtures/applicability-fixtures.json +42 -0
- package/fixtures/situation-fixtures.json +600 -329
- package/package.json +4 -1
- package/schema/applicability.schema.json +74 -59
- package/schema/conduct-evaluation.schema.json +1 -1
- package/schema/encounter-evaluation.schema.json +6 -6
- package/schema/evaluation.schema.json +2 -2
- package/schema/facts.schema.json +4 -4
- package/schema/i18n-catalog.schema.json +26 -5
- package/schema/lights.schema.json +2 -3
- package/schema/situation-fixtures.schema.json +39 -0
- package/schema/situation.schema.json +3 -3
package/README.md
CHANGED
|
@@ -56,7 +56,10 @@ lights and shapes, Part D sound and light signals, and Annex I geometry.
|
|
|
56
56
|
[`docs/requirements.md`](docs/requirements.md) is the numbered contract for
|
|
57
57
|
all of it. One case the Convention cannot state, a vessel made fast to a
|
|
58
58
|
mooring buoy, lives only under `us/inland`
|
|
59
|
-
([ADR 0008](docs/adr/0008-mooring-buoy-modifier.md))
|
|
59
|
+
([ADR 0008](docs/adr/0008-mooring-buoy-modifier.md)); two the Inland Rules
|
|
60
|
+
deliberately lack, Rule 28 and 23(d)(ii), are tombstoned there
|
|
61
|
+
([ADR 0018](docs/adr/0018-jurisdiction-delta-is-a-merge-patch.md)). That is
|
|
62
|
+
the whole of `us/inland` today: four records, not a model of the Inland Rules.
|
|
60
63
|
|
|
61
64
|
## The layers
|
|
62
65
|
|
|
@@ -104,7 +107,12 @@ same thing.
|
|
|
104
107
|
|
|
105
108
|
**Jurisdiction is a dimension, not a fork.** Every record carries a
|
|
106
109
|
`jurisdiction`: `intl`, or `<country-or-body>/<waters>` as a delta on it.
|
|
107
|
-
Entries a jurisdiction doesn't override are inherited, not restated.
|
|
110
|
+
Entries a jurisdiction doesn't override are inherited, not restated. The
|
|
111
|
+
delta is an [RFC 7396](https://www.rfc-editor.org/rfc/rfc7396) merge patch
|
|
112
|
+
over `intl` keyed by entry id: the jurisdiction's own entries are its keys,
|
|
113
|
+
its `suppressions` are the keys set to `null`, and silence inherits
|
|
114
|
+
([ADR 0018](docs/adr/0018-jurisdiction-delta-is-a-merge-patch.md)). Any
|
|
115
|
+
conformant merge-patch library reproduces the resolved rule set.
|
|
108
116
|
|
|
109
117
|
**Predicates, not enumerations.** Gates are `fact:length_m < 7`, never a
|
|
110
118
|
pre-built list of configurations. Enumerated tables are where prior art
|
|
@@ -136,23 +144,23 @@ paragraphs prevails is a relation.
|
|
|
136
144
|
|
|
137
145
|
| relation | meaning |
|
|
138
146
|
|---|---|
|
|
139
|
-
| `rel:includes` | import the referenced entry's
|
|
140
|
-
| `rel:conditional_includes` | import lights when the stated `when` holds; `one_of` is a set of legal alternatives |
|
|
141
|
-
| `rel:in_lieu_of` | this entry's lights replace the referenced entries' lights |
|
|
142
|
-
| `rel:excludes` | must not be shown together: a pick-one between alternatives, never one obligation vetoing another |
|
|
143
|
-
| `rel:exempts` | the referenced requirement does not apply (30(e)) |
|
|
144
|
-
| `rel:overrides` | this paragraph's requirement prevails over the referenced one's when both apply (Rule 18; Rule 26(a) over Rule 30's anchor lights) |
|
|
145
|
-
|
|
146
|
-
Modality is `shall`, `may`, `shall-if-practicable`, `shall-not`,
|
|
147
|
-
`shall-not-impede`, or `conditional` with a `modality_by` table when it turns
|
|
147
|
+
| `rel:includes` | import the referenced entry's lights, their modality and its scalar gates — never its axes (ADR 0019) |
|
|
148
|
+
| `rel:conditional_includes` | import lights when the stated `when` holds; `one_of` is a set of legal alternatives, exactly one per display, or none under a `may` carrier |
|
|
149
|
+
| `rel:in_lieu_of` | this entry's lights replace the referenced entries' lights; two entries replacing overlapping sets are alternatives to each other |
|
|
150
|
+
| `rel:excludes` | must not be shown together: a pick-one between alternatives, never one obligation vetoing another; a constraint on one display, never a removal |
|
|
151
|
+
| `rel:exempts` | the referenced requirement does not apply (30(e)); reaches an entry in force, never an import |
|
|
152
|
+
| `rel:overrides` | this paragraph's requirement prevails over the referenced one's when both apply (Rule 18; Rule 26(a) over Rule 30's anchor lights); reaches an entry in force, never an import |
|
|
153
|
+
|
|
154
|
+
Modality is `modality:shall`, `modality:may`, `modality:shall-if-practicable`, `modality:shall-not`,
|
|
155
|
+
`modality:shall-not-impede`, or `modality:conditional` with a `modality_by` table when it turns
|
|
148
156
|
on a fact.
|
|
149
157
|
|
|
150
158
|
Most entries read one vessel and produce lights. The Part B entries read
|
|
151
159
|
**two**, a situation rather than a fact record, and produce an `effect`:
|
|
152
160
|
which section governs, which vessel gives way, whether the encounter is
|
|
153
|
-
`head-on`, `crossing` or `overtaking`. They address each vessel through a
|
|
154
|
-
subject segment (`
|
|
155
|
-
`pair:geo:in_sight`); a key with no subject means `
|
|
161
|
+
`encounter:head-on`, `encounter:crossing` or `encounter:overtaking`. They address each vessel through a
|
|
162
|
+
subject segment (`self:fact:activity`, `other:fact:propulsion`,
|
|
163
|
+
`pair:geo:in_sight`); a key with no subject means `self:`. The encounter
|
|
156
164
|
sectors partition relative bearing, so no crossing sector is enumerated and
|
|
157
165
|
none can drift. [`docs/identifiers.md`](docs/identifiers.md) has the
|
|
158
166
|
vocabulary, [`docs/part-b-invariants.md`](docs/part-b-invariants.md) the
|