colregs 0.3.0 → 0.3.2
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 +13 -11
- package/data/applicability.json +478 -503
- package/data/facts.json +22 -22
- package/data/geometry.json +8 -8
- package/data/i18n/en.json +27 -0
- package/data/i18n/fi.json +25 -0
- package/data/images.json +32 -32
- package/data/operations.json +79 -0
- package/data/rules.json +5 -0
- package/data/version.json +1 -1
- package/docs/adr/0006-json-schema-and-identifier-diff.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/0014-engine-interface-owned-by-colregs.md +103 -0
- package/docs/adr/0015-rule-ids-are-paragraph-keys.md +191 -0
- 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/budgets.json +8 -15
- package/docs/decisions.md +6 -0
- package/docs/identifiers.md +121 -109
- package/docs/maritime-sources.md +58 -0
- package/docs/normative-language.md +103 -0
- package/docs/part-b-invariants.md +48 -45
- package/docs/requirements.md +147 -138
- package/fixtures/applicability-fixtures.json +190 -190
- package/fixtures/situation-fixtures.json +870 -599
- package/package.json +1 -1
- package/schema/applicability-fixtures.schema.json +4 -13
- package/schema/applicability.schema.json +77 -77
- package/schema/conduct-evaluation.schema.json +135 -0
- package/schema/display-evaluation.schema.json +146 -0
- package/schema/encounter-evaluation.schema.json +109 -0
- package/schema/evaluation.schema.json +149 -0
- package/schema/fact-record.schema.json +30 -0
- package/schema/facts.schema.json +4 -4
- package/schema/i18n-catalog.schema.json +47 -0
- package/schema/operations.schema.json +124 -0
- package/schema/rule2-departure-finding.schema.json +72 -0
- package/schema/rule2-departure-model.schema.json +159 -0
- package/schema/situation-fixtures.schema.json +30 -127
- package/schema/situation.schema.json +72 -0
- package/schema/trace.schema.json +33 -0
- package/data/deprecated-identifiers.json +0 -7
- package/schema/deprecated-identifiers.schema.json +0 -29
package/README.md
CHANGED
|
@@ -35,7 +35,6 @@ data/facts.json the fact record, and how to decode SignalK navigation.s
|
|
|
35
35
|
data/applicability.json predicate -> lights, each entry also carrying modality, citation, jurisdiction
|
|
36
36
|
data/geometry.json Annex I: heights, spacings, colour, intensity
|
|
37
37
|
data/images.json every image, its source, and what it illustrates
|
|
38
|
-
data/deprecated-identifiers.json retired identifiers: what they denoted, when, and their replacement
|
|
39
38
|
images/ 38 USCG diagrams + 5 arc GIFs
|
|
40
39
|
fixtures/ fact records and the entries that apply to them
|
|
41
40
|
```
|
|
@@ -82,13 +81,13 @@ loses.
|
|
|
82
81
|
|
|
83
82
|
**Applicability entries.** Each is a predicate over facts, a set of lights or
|
|
84
83
|
references to other entries, a modality, a citation, and a jurisdiction. Every
|
|
85
|
-
entry has an id (`25b`, `
|
|
84
|
+
entry has an id (`rule:25b`, `rule:27a_iii`) a consumer can point at.
|
|
86
85
|
|
|
87
|
-
**Identifiers.**
|
|
88
|
-
|
|
86
|
+
**Identifiers.** Paragraph paths carry no prefix, because the path *is* the
|
|
87
|
+
citation. Every other id names its namespace: `rule:30a`,
|
|
89
88
|
`light:masthead`, `fact:activity`, `activity:nuc`, `rel:in_lieu_of`. Every
|
|
90
|
-
identifier is immutable
|
|
91
|
-
|
|
89
|
+
identifier is immutable from 1.0.0; before then it may be renamed or
|
|
90
|
+
discarded outright, and the deprecation registry is absent. See
|
|
92
91
|
[`docs/identifiers.md`](docs/identifiers.md).
|
|
93
92
|
|
|
94
93
|
## Design
|
|
@@ -144,16 +143,16 @@ paragraphs prevails is a relation.
|
|
|
144
143
|
| `rel:exempts` | the referenced requirement does not apply (30(e)) |
|
|
145
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) |
|
|
146
145
|
|
|
147
|
-
Modality is `shall`, `may`, `shall-if-practicable`, `shall-not`,
|
|
148
|
-
`shall-not-impede`, or `conditional` with a `modality_by` table when it turns
|
|
146
|
+
Modality is `modality:shall`, `modality:may`, `modality:shall-if-practicable`, `modality:shall-not`,
|
|
147
|
+
`modality:shall-not-impede`, or `modality:conditional` with a `modality_by` table when it turns
|
|
149
148
|
on a fact.
|
|
150
149
|
|
|
151
150
|
Most entries read one vessel and produce lights. The Part B entries read
|
|
152
151
|
**two**, a situation rather than a fact record, and produce an `effect`:
|
|
153
152
|
which section governs, which vessel gives way, whether the encounter is
|
|
154
|
-
`head-on`, `crossing` or `overtaking`. They address each vessel through a
|
|
155
|
-
subject segment (`
|
|
156
|
-
`pair:geo:in_sight`); a key with no subject means `
|
|
153
|
+
`encounter:head-on`, `encounter:crossing` or `encounter:overtaking`. They address each vessel through a
|
|
154
|
+
subject segment (`self:fact:activity`, `other:fact:propulsion`,
|
|
155
|
+
`pair:geo:in_sight`); a key with no subject means `self:`. The encounter
|
|
157
156
|
sectors partition relative bearing, so no crossing sector is enumerated and
|
|
158
157
|
none can drift. [`docs/identifiers.md`](docs/identifiers.md) has the
|
|
159
158
|
vocabulary, [`docs/part-b-invariants.md`](docs/part-b-invariants.md) the
|
|
@@ -178,6 +177,9 @@ both vessels give-way.
|
|
|
178
177
|
`fixtures/applicability-fixtures.json` and `fixtures/situation-fixtures.json`
|
|
179
178
|
are the cross-implementation contract: an implementation in any language
|
|
180
179
|
should reproduce those exactly.
|
|
180
|
+
[`data/operations.json`](data/operations.json) names the verbs an engine
|
|
181
|
+
implements and binds each to its input schema, its result schema and the
|
|
182
|
+
fixture file that exercises it ([ADR 0014](docs/adr/0014-engine-interface-owned-by-colregs.md)).
|
|
181
183
|
|
|
182
184
|
## Provenance and licence
|
|
183
185
|
|