colregs 0.1.0

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.
Files changed (54) hide show
  1. package/LICENSE +34 -0
  2. package/PROVENANCE.md +65 -0
  3. package/README.md +50 -0
  4. package/data/applicability.json +1108 -0
  5. package/data/facts.json +308 -0
  6. package/data/geometry.json +372 -0
  7. package/data/images.json +876 -0
  8. package/data/lights.json +229 -0
  9. package/data/rules.json +843 -0
  10. package/fixtures/applicability-fixtures.json +412 -0
  11. package/images/NRHB_23_Intl_dii.png +0 -0
  12. package/images/NRHB_23_a.png +0 -0
  13. package/images/NRHB_23_aii.png +0 -0
  14. package/images/NRHB_23_b.png +0 -0
  15. package/images/NRHB_23_di.png +0 -0
  16. package/images/NRHB_23_e.png +0 -0
  17. package/images/NRHB_24_a.png +0 -0
  18. package/images/NRHB_24_av.png +0 -0
  19. package/images/NRHB_24_d.png +0 -0
  20. package/images/NRHB_24_e.png +0 -0
  21. package/images/NRHB_24_eiii.png +0 -0
  22. package/images/NRHB_24_f.png +0 -0
  23. package/images/NRHB_24_j.png +0 -0
  24. package/images/NRHB_25_a.png +0 -0
  25. package/images/NRHB_25_b.png +0 -0
  26. package/images/NRHB_25_c.png +0 -0
  27. package/images/NRHB_25_d.png +0 -0
  28. package/images/NRHB_25_dii.png +0 -0
  29. package/images/NRHB_25_e.png +0 -0
  30. package/images/NRHB_26_b.png +0 -0
  31. package/images/NRHB_26_biii.png +0 -0
  32. package/images/NRHB_26_ciii.png +0 -0
  33. package/images/NRHB_27_a.png +0 -0
  34. package/images/NRHB_27_aiii.png +0 -0
  35. package/images/NRHB_27_biii.png +0 -0
  36. package/images/NRHB_27_biv.png +0 -0
  37. package/images/NRHB_27_c.png +0 -0
  38. package/images/NRHB_27_d.png +0 -0
  39. package/images/NRHB_27_diii.png +0 -0
  40. package/images/NRHB_27_ei.png +0 -0
  41. package/images/NRHB_27_eii.png +0 -0
  42. package/images/NRHB_27_f.png +0 -0
  43. package/images/NRHB_28.png +0 -0
  44. package/images/NRHB_29_a.png +0 -0
  45. package/images/NRHB_29_aiii.png +0 -0
  46. package/images/NRHB_30_a.png +0 -0
  47. package/images/NRHB_30_d.png +0 -0
  48. package/images/NRHB_30_dii.png +0 -0
  49. package/images/mastheadarc.gif +0 -0
  50. package/images/portarc.gif +0 -0
  51. package/images/stbdarc.gif +0 -0
  52. package/images/sternarc.gif +0 -0
  53. package/images/towingarc.gif +0 -0
  54. package/package.json +12 -0
@@ -0,0 +1,1108 @@
1
+ {
2
+ "ruleset": "international",
3
+ "conditions": "night (Rule 20(b): sunset to sunrise), and by 20(c) in restricted visibility by day. Day shapes are not in this release.",
4
+ "relations": {
5
+ "includes": "import another entry's lights only, never its predicate",
6
+ "conditional_includes": "import lights when the stated `when` holds; `one_of` is a set of legal alternatives among which the vessel picks one",
7
+ "in_lieu_of": "this entry's lights replace the referenced entries' lights",
8
+ "excludes": "the referenced entries must not be shown at the same time",
9
+ "exempts": "the referenced entries are not required"
10
+ },
11
+ "modalities": {
12
+ "shall": "mandatory",
13
+ "may": "permitted alternative",
14
+ "shall-if-practicable": "mandatory where practicable, with a stated fallback",
15
+ "conditional": "modality depends on facts; see modality_by",
16
+ "exempt": "the entry relieves a requirement rather than imposing one"
17
+ },
18
+ "known_omissions": [
19
+ {
20
+ "cite": "24(d)",
21
+ "what": "A power-driven vessel to which 24(a) or (c) applies shall also comply with 23(a)(ii) — the second masthead light.",
22
+ "why": "Not an entry in the settled table; 24a-m2/24a-m3 carry in_lieu_of against 23a1 and 23a2 instead. Recorded here rather than added unilaterally."
23
+ },
24
+ {
25
+ "cite": "24(f), 24(g), 24(h), 24(i)",
26
+ "what": "Vessels pushed or towed in a group; inconspicuous partly submerged tows; impracticability fallbacks.",
27
+ "why": "Outside the settled table. Rule text is present in rules.json."
28
+ },
29
+ {
30
+ "cite": "27(c)",
31
+ "what": "Towing operation that severely restricts the tow's ability to deviate: Rule 24(a) lights plus the 27(b)(i)/(ii) RAM display.",
32
+ "why": "Outside the settled table; expressible as activity=towing plus activity=ram."
33
+ },
34
+ {
35
+ "cite": "27(g)",
36
+ "what": "Vessels under 12 m, except when diving, need not exhibit the Rule 27 lights and shapes.",
37
+ "why": "A cross-cutting exemption over the whole 27 family; no entry in the table."
38
+ },
39
+ {
40
+ "cite": "31",
41
+ "what": "Seaplanes and WIG craft show the closest practicable equivalent.",
42
+ "why": "Not expressible as a light set."
43
+ }
44
+ ],
45
+ "entries": [
46
+ {
47
+ "id": "23a1",
48
+ "ruleset": "international",
49
+ "cite": "23(a)(i)",
50
+ "when": {
51
+ "propulsion": "power",
52
+ "activity": "none",
53
+ "position": "underway"
54
+ },
55
+ "lights": [
56
+ {
57
+ "light": "masthead",
58
+ "position": "forward",
59
+ "count": 1
60
+ }
61
+ ],
62
+ "modality": "shall",
63
+ "images": [
64
+ "NRHB_23_a.png"
65
+ ]
66
+ },
67
+ {
68
+ "id": "23a2",
69
+ "ruleset": "international",
70
+ "cite": "23(a)(ii)",
71
+ "when": {
72
+ "propulsion": "power",
73
+ "activity": "none",
74
+ "position": "underway"
75
+ },
76
+ "lights": [
77
+ {
78
+ "light": "masthead",
79
+ "position": "abaft and higher than the forward one",
80
+ "count": 1
81
+ }
82
+ ],
83
+ "modality": "conditional",
84
+ "modality_by": [
85
+ {
86
+ "when": {
87
+ "length_m": {
88
+ "gte": 50
89
+ }
90
+ },
91
+ "modality": "shall"
92
+ },
93
+ {
94
+ "when": {
95
+ "length_m": {
96
+ "lt": 50
97
+ }
98
+ },
99
+ "modality": "may"
100
+ }
101
+ ],
102
+ "images": [
103
+ "NRHB_23_aii.png"
104
+ ]
105
+ },
106
+ {
107
+ "id": "23a34",
108
+ "ruleset": "international",
109
+ "cite": "23(a)(iii)-(iv)",
110
+ "when": {
111
+ "propulsion": "power",
112
+ "activity": "none",
113
+ "position": "underway"
114
+ },
115
+ "lights": [
116
+ {
117
+ "light": "sidelights"
118
+ },
119
+ {
120
+ "light": "sternlight"
121
+ }
122
+ ],
123
+ "modality": "shall"
124
+ },
125
+ {
126
+ "id": "23b",
127
+ "ruleset": "international",
128
+ "cite": "23(b)",
129
+ "when": {
130
+ "propulsion": "power",
131
+ "activity": "none",
132
+ "position": "underway",
133
+ "non_displacement": true
134
+ },
135
+ "lights": [
136
+ {
137
+ "light": "all_round",
138
+ "color": "yellow",
139
+ "character": "flashing",
140
+ "count": 1
141
+ }
142
+ ],
143
+ "includes": [
144
+ "23a1",
145
+ "23a2",
146
+ "23a34"
147
+ ],
148
+ "modality": "shall",
149
+ "images": [
150
+ "NRHB_23_b.png"
151
+ ],
152
+ "notes": "Air-cushion vessel operating in non-displacement mode; in addition to 23(a)."
153
+ },
154
+ {
155
+ "id": "23c",
156
+ "ruleset": "international",
157
+ "cite": "23(c)",
158
+ "when": {
159
+ "propulsion": "power",
160
+ "activity": "none",
161
+ "position": "underway",
162
+ "wig": true
163
+ },
164
+ "lights": [
165
+ {
166
+ "light": "all_round",
167
+ "color": "red",
168
+ "character": "flashing",
169
+ "intensity": "high",
170
+ "count": 1
171
+ }
172
+ ],
173
+ "includes": [
174
+ "23a1",
175
+ "23a2",
176
+ "23a34"
177
+ ],
178
+ "modality": "shall",
179
+ "notes": "Only when taking off, landing and in flight near the surface."
180
+ },
181
+ {
182
+ "id": "23d1",
183
+ "ruleset": "international",
184
+ "cite": "23(d)(i)",
185
+ "when": {
186
+ "propulsion": "power",
187
+ "activity": "none",
188
+ "position": "underway",
189
+ "length_m": {
190
+ "lt": 12
191
+ }
192
+ },
193
+ "lights": [
194
+ {
195
+ "light": "all_round",
196
+ "color": "white",
197
+ "count": 1
198
+ },
199
+ {
200
+ "light": "sidelights"
201
+ }
202
+ ],
203
+ "in_lieu_of": [
204
+ "23a1",
205
+ "23a2",
206
+ "23a34"
207
+ ],
208
+ "modality": "may",
209
+ "images": [
210
+ "NRHB_23_di.png"
211
+ ]
212
+ },
213
+ {
214
+ "id": "23d2",
215
+ "ruleset": "international",
216
+ "cite": "23(d)(ii)",
217
+ "when": {
218
+ "propulsion": "power",
219
+ "activity": "none",
220
+ "position": "underway",
221
+ "length_m": {
222
+ "lt": 7
223
+ },
224
+ "max_speed_kn": {
225
+ "lte": 7
226
+ }
227
+ },
228
+ "lights": [
229
+ {
230
+ "light": "all_round",
231
+ "color": "white",
232
+ "count": 1
233
+ },
234
+ {
235
+ "light": "sidelights",
236
+ "modality": "shall-if-practicable"
237
+ }
238
+ ],
239
+ "in_lieu_of": [
240
+ "23a1",
241
+ "23a2",
242
+ "23a34"
243
+ ],
244
+ "modality": "may",
245
+ "images": [
246
+ "NRHB_23_Intl_dii.png"
247
+ ],
248
+ "notes": "The all-round white light is 'may'; the sidelights are 'shall, if practicable' — one paragraph, two modalities."
249
+ },
250
+ {
251
+ "id": "24a-m2",
252
+ "ruleset": "international",
253
+ "cite": "24(a)(i)",
254
+ "when": {
255
+ "activity": "towing",
256
+ "tow_length_m": {
257
+ "lte": 200
258
+ }
259
+ },
260
+ "lights": [
261
+ {
262
+ "light": "masthead",
263
+ "count": 2,
264
+ "arrangement": "vertical"
265
+ }
266
+ ],
267
+ "in_lieu_of": [
268
+ "23a1",
269
+ "23a2"
270
+ ],
271
+ "modality": "shall",
272
+ "images": [
273
+ "NRHB_24_a.png"
274
+ ]
275
+ },
276
+ {
277
+ "id": "24a-m3",
278
+ "ruleset": "international",
279
+ "cite": "24(a)(i)",
280
+ "when": {
281
+ "activity": "towing",
282
+ "tow_length_m": {
283
+ "gt": 200
284
+ }
285
+ },
286
+ "lights": [
287
+ {
288
+ "light": "masthead",
289
+ "count": 3,
290
+ "arrangement": "vertical"
291
+ }
292
+ ],
293
+ "in_lieu_of": [
294
+ "23a1",
295
+ "23a2"
296
+ ],
297
+ "modality": "shall",
298
+ "images": [
299
+ "NRHB_24_a.png"
300
+ ]
301
+ },
302
+ {
303
+ "id": "24a-rest",
304
+ "ruleset": "international",
305
+ "cite": "24(a)(ii)-(iv)",
306
+ "when": {
307
+ "activity": "towing"
308
+ },
309
+ "lights": [
310
+ {
311
+ "light": "towing",
312
+ "position": "in a vertical line above the sternlight",
313
+ "count": 1
314
+ }
315
+ ],
316
+ "includes": [
317
+ "23a34"
318
+ ],
319
+ "modality": "shall",
320
+ "images": [
321
+ "NRHB_24_a.png"
322
+ ]
323
+ },
324
+ {
325
+ "id": "24b",
326
+ "ruleset": "international",
327
+ "cite": "24(b)",
328
+ "when": {
329
+ "activity": "pushing",
330
+ "composite_unit": true
331
+ },
332
+ "lights": [],
333
+ "includes": [
334
+ "23a1",
335
+ "23a2",
336
+ "23a34"
337
+ ],
338
+ "modality": "shall",
339
+ "images": [
340
+ "NRHB_23_a.png"
341
+ ],
342
+ "notes": "A composite unit is regarded as a power-driven vessel."
343
+ },
344
+ {
345
+ "id": "24c",
346
+ "ruleset": "international",
347
+ "cite": "24(c)",
348
+ "when": {
349
+ "activity": "pushing",
350
+ "composite_unit": false
351
+ },
352
+ "lights": [
353
+ {
354
+ "light": "masthead",
355
+ "count": 2,
356
+ "arrangement": "vertical"
357
+ }
358
+ ],
359
+ "includes": [
360
+ "23a34"
361
+ ],
362
+ "in_lieu_of": [
363
+ "23a1",
364
+ "23a2"
365
+ ],
366
+ "modality": "shall",
367
+ "notes": "Also covers towing alongside (towed_alongside=true)."
368
+ },
369
+ {
370
+ "id": "24e",
371
+ "ruleset": "international",
372
+ "cite": "24(e)",
373
+ "when": {
374
+ "activity": "being_towed"
375
+ },
376
+ "lights": [
377
+ {
378
+ "light": "sidelights"
379
+ },
380
+ {
381
+ "light": "sternlight"
382
+ }
383
+ ],
384
+ "modality": "shall",
385
+ "images": [
386
+ "NRHB_24_e.png"
387
+ ],
388
+ "notes": "Other than the inconspicuous, partly submerged objects of 24(g)."
389
+ },
390
+ {
391
+ "id": "25a",
392
+ "ruleset": "international",
393
+ "cite": "25(a)",
394
+ "when": {
395
+ "propulsion": "sail",
396
+ "activity": "none",
397
+ "position": "underway"
398
+ },
399
+ "lights": [
400
+ {
401
+ "light": "sidelights"
402
+ },
403
+ {
404
+ "light": "sternlight"
405
+ }
406
+ ],
407
+ "modality": "shall",
408
+ "images": [
409
+ "NRHB_25_a.png"
410
+ ]
411
+ },
412
+ {
413
+ "id": "25b",
414
+ "ruleset": "international",
415
+ "cite": "25(b)",
416
+ "when": {
417
+ "propulsion": "sail",
418
+ "activity": "none",
419
+ "position": "underway",
420
+ "length_m": {
421
+ "lt": 20
422
+ }
423
+ },
424
+ "lights": [
425
+ {
426
+ "light": "sidelights",
427
+ "combined": true,
428
+ "position": "at or near the top of the mast"
429
+ },
430
+ {
431
+ "light": "sternlight",
432
+ "combined": true,
433
+ "position": "at or near the top of the mast"
434
+ }
435
+ ],
436
+ "in_lieu_of": [
437
+ "25a"
438
+ ],
439
+ "excludes": [
440
+ "25c"
441
+ ],
442
+ "modality": "may",
443
+ "images": [
444
+ "NRHB_25_b.png"
445
+ ],
446
+ "notes": "The tricolor: 25(a)'s lights combined in one lantern."
447
+ },
448
+ {
449
+ "id": "25c",
450
+ "ruleset": "international",
451
+ "cite": "25(c)",
452
+ "when": {
453
+ "propulsion": "sail",
454
+ "activity": "none",
455
+ "position": "underway"
456
+ },
457
+ "lights": [
458
+ {
459
+ "light": "all_round",
460
+ "color": "red",
461
+ "count": 1,
462
+ "position": "upper, at or near the top of the mast"
463
+ },
464
+ {
465
+ "light": "all_round",
466
+ "color": "green",
467
+ "count": 1,
468
+ "position": "lower, at or near the top of the mast"
469
+ }
470
+ ],
471
+ "includes": [
472
+ "25a"
473
+ ],
474
+ "excludes": [
475
+ "25b"
476
+ ],
477
+ "modality": "may",
478
+ "images": [
479
+ "NRHB_25_c.png"
480
+ ]
481
+ },
482
+ {
483
+ "id": "25d1",
484
+ "ruleset": "international",
485
+ "cite": "25(d)(i)",
486
+ "when": {
487
+ "propulsion": "sail",
488
+ "activity": "none",
489
+ "position": "underway",
490
+ "length_m": {
491
+ "lt": 7
492
+ }
493
+ },
494
+ "lights": [
495
+ {
496
+ "light": "torch",
497
+ "color": "white",
498
+ "count": 1,
499
+ "note": "an electric torch or lighted lantern shown in sufficient time to prevent collision"
500
+ }
501
+ ],
502
+ "in_lieu_of": [
503
+ "25a",
504
+ "25b"
505
+ ],
506
+ "modality": "shall-if-practicable",
507
+ "images": [
508
+ "NRHB_25_d.png"
509
+ ],
510
+ "notes": "25(a) or (b) shall be shown if practicable; the torch is the fallback."
511
+ },
512
+ {
513
+ "id": "25d2",
514
+ "ruleset": "international",
515
+ "cite": "25(d)(ii)",
516
+ "when": {
517
+ "propulsion": "oars"
518
+ },
519
+ "lights": [
520
+ {
521
+ "light": "torch",
522
+ "color": "white",
523
+ "count": 1,
524
+ "note": "an electric torch or lighted lantern shown in sufficient time to prevent collision"
525
+ }
526
+ ],
527
+ "conditional_includes": [
528
+ {
529
+ "one_of": [
530
+ "25a",
531
+ "25b"
532
+ ]
533
+ }
534
+ ],
535
+ "modality": "may",
536
+ "images": [
537
+ "NRHB_25_dii.png"
538
+ ],
539
+ "notes": "No length gate at all: a vessel under oars of any length may show only the torch, where a sailing vessel of 10 m may not."
540
+ },
541
+ {
542
+ "id": "26b-id",
543
+ "ruleset": "international",
544
+ "cite": "26(b)(i)",
545
+ "when": {
546
+ "activity": "trawling"
547
+ },
548
+ "lights": [
549
+ {
550
+ "light": "all_round",
551
+ "color": "green",
552
+ "count": 1,
553
+ "position": "upper"
554
+ },
555
+ {
556
+ "light": "all_round",
557
+ "color": "white",
558
+ "count": 1,
559
+ "position": "lower"
560
+ }
561
+ ],
562
+ "excludes": [
563
+ "30a",
564
+ "30b"
565
+ ],
566
+ "modality": "shall",
567
+ "images": [
568
+ "NRHB_26_b.png"
569
+ ],
570
+ "notes": "Rule 26(a): a vessel engaged in fishing shall exhibit only the lights of Rule 26, whether underway or at anchor — hence the exclusion of Rule 30."
571
+ },
572
+ {
573
+ "id": "26b-mast",
574
+ "ruleset": "international",
575
+ "cite": "26(b)(ii)",
576
+ "when": {
577
+ "activity": "trawling"
578
+ },
579
+ "lights": [
580
+ {
581
+ "light": "masthead",
582
+ "position": "abaft of and higher than the all-round green light",
583
+ "count": 1
584
+ }
585
+ ],
586
+ "modality": "conditional",
587
+ "modality_by": [
588
+ {
589
+ "when": {
590
+ "length_m": {
591
+ "gte": 50
592
+ }
593
+ },
594
+ "modality": "shall"
595
+ },
596
+ {
597
+ "when": {
598
+ "length_m": {
599
+ "lt": 50
600
+ }
601
+ },
602
+ "modality": "may"
603
+ }
604
+ ]
605
+ },
606
+ {
607
+ "id": "26b-mw",
608
+ "ruleset": "international",
609
+ "cite": "26(b)(iii)",
610
+ "when": {
611
+ "activity": "trawling",
612
+ "making_way": true
613
+ },
614
+ "lights": [],
615
+ "includes": [
616
+ "23a34"
617
+ ],
618
+ "modality": "shall",
619
+ "images": [
620
+ "NRHB_26_biii.png"
621
+ ]
622
+ },
623
+ {
624
+ "id": "26c-id",
625
+ "ruleset": "international",
626
+ "cite": "26(c)(i)",
627
+ "when": {
628
+ "activity": "fishing"
629
+ },
630
+ "lights": [
631
+ {
632
+ "light": "all_round",
633
+ "color": "red",
634
+ "count": 1,
635
+ "position": "upper"
636
+ },
637
+ {
638
+ "light": "all_round",
639
+ "color": "white",
640
+ "count": 1,
641
+ "position": "lower"
642
+ }
643
+ ],
644
+ "excludes": [
645
+ "30a",
646
+ "30b"
647
+ ],
648
+ "modality": "shall"
649
+ },
650
+ {
651
+ "id": "26c-gear",
652
+ "ruleset": "international",
653
+ "cite": "26(c)(ii)",
654
+ "when": {
655
+ "activity": "fishing",
656
+ "gear_extent_m": {
657
+ "gt": 150
658
+ }
659
+ },
660
+ "lights": [
661
+ {
662
+ "light": "all_round",
663
+ "color": "white",
664
+ "count": 1,
665
+ "position": "in the direction of the gear"
666
+ }
667
+ ],
668
+ "modality": "shall"
669
+ },
670
+ {
671
+ "id": "26c-mw",
672
+ "ruleset": "international",
673
+ "cite": "26(c)(iii)",
674
+ "when": {
675
+ "activity": "fishing",
676
+ "making_way": true
677
+ },
678
+ "lights": [],
679
+ "includes": [
680
+ "23a34"
681
+ ],
682
+ "modality": "shall",
683
+ "images": [
684
+ "NRHB_26_ciii.png"
685
+ ]
686
+ },
687
+ {
688
+ "id": "27a-id",
689
+ "ruleset": "international",
690
+ "cite": "27(a)(i)",
691
+ "when": {
692
+ "activity": "nuc",
693
+ "position": "underway"
694
+ },
695
+ "lights": [
696
+ {
697
+ "light": "all_round",
698
+ "color": "red",
699
+ "count": 2,
700
+ "arrangement": "vertical"
701
+ }
702
+ ],
703
+ "modality": "shall",
704
+ "images": [
705
+ "NRHB_27_a.png"
706
+ ]
707
+ },
708
+ {
709
+ "id": "27a-mw",
710
+ "ruleset": "international",
711
+ "cite": "27(a)(iii)",
712
+ "when": {
713
+ "activity": "nuc",
714
+ "making_way": true
715
+ },
716
+ "lights": [],
717
+ "includes": [
718
+ "23a34"
719
+ ],
720
+ "modality": "shall",
721
+ "images": [
722
+ "NRHB_27_aiii.png"
723
+ ]
724
+ },
725
+ {
726
+ "id": "27b-id",
727
+ "ruleset": "international",
728
+ "cite": "27(b)(i)",
729
+ "when": {
730
+ "activity": "ram"
731
+ },
732
+ "lights": [
733
+ {
734
+ "light": "all_round",
735
+ "color": "red",
736
+ "count": 1,
737
+ "position": "upper"
738
+ },
739
+ {
740
+ "light": "all_round",
741
+ "color": "white",
742
+ "count": 1,
743
+ "position": "middle"
744
+ },
745
+ {
746
+ "light": "all_round",
747
+ "color": "red",
748
+ "count": 1,
749
+ "position": "lower"
750
+ }
751
+ ],
752
+ "modality": "shall",
753
+ "notes": "Except a vessel engaged in mine clearance operations (27(f))."
754
+ },
755
+ {
756
+ "id": "27b-mw",
757
+ "ruleset": "international",
758
+ "cite": "27(b)(iii)",
759
+ "when": {
760
+ "activity": "ram",
761
+ "making_way": true
762
+ },
763
+ "lights": [],
764
+ "includes": [
765
+ "23a1",
766
+ "23a2",
767
+ "23a34"
768
+ ],
769
+ "modality": "shall",
770
+ "images": [
771
+ "NRHB_27_biii.png"
772
+ ]
773
+ },
774
+ {
775
+ "id": "27b-anc",
776
+ "ruleset": "international",
777
+ "cite": "27(b)(iv)",
778
+ "when": {
779
+ "activity": "ram",
780
+ "position": "anchored"
781
+ },
782
+ "lights": [],
783
+ "conditional_includes": [
784
+ {
785
+ "one_of": [
786
+ "30a",
787
+ "30b"
788
+ ]
789
+ }
790
+ ],
791
+ "modality": "shall",
792
+ "images": [
793
+ "NRHB_27_biv.png"
794
+ ]
795
+ },
796
+ {
797
+ "id": "27d",
798
+ "ruleset": "international",
799
+ "cite": "27(d)",
800
+ "when": {
801
+ "activity": "ram_underwater",
802
+ "obstruction_exists": true
803
+ },
804
+ "lights": [
805
+ {
806
+ "light": "all_round",
807
+ "color": "red",
808
+ "count": 2,
809
+ "arrangement": "vertical",
810
+ "position": "on the side on which the obstruction exists"
811
+ },
812
+ {
813
+ "light": "all_round",
814
+ "color": "green",
815
+ "count": 2,
816
+ "arrangement": "vertical",
817
+ "position": "on the side on which another vessel may pass"
818
+ }
819
+ ],
820
+ "includes": [
821
+ "27b-id"
822
+ ],
823
+ "modality": "shall",
824
+ "images": [
825
+ "NRHB_27_d.png"
826
+ ],
827
+ "notes": "27(d)(iii): when at anchor these lights are shown instead of Rule 30's."
828
+ },
829
+ {
830
+ "id": "27e",
831
+ "ruleset": "international",
832
+ "cite": "27(e)(i)",
833
+ "when": {
834
+ "activity": "diving"
835
+ },
836
+ "lights": [
837
+ {
838
+ "light": "all_round",
839
+ "color": "red",
840
+ "count": 1,
841
+ "position": "upper"
842
+ },
843
+ {
844
+ "light": "all_round",
845
+ "color": "white",
846
+ "count": 1,
847
+ "position": "middle"
848
+ },
849
+ {
850
+ "light": "all_round",
851
+ "color": "red",
852
+ "count": 1,
853
+ "position": "lower"
854
+ }
855
+ ],
856
+ "in_lieu_of": [
857
+ "27d"
858
+ ],
859
+ "modality": "shall",
860
+ "images": [
861
+ "NRHB_27_ei.png"
862
+ ],
863
+ "notes": "Only when the vessel's size makes the full 27(d) display impracticable."
864
+ },
865
+ {
866
+ "id": "27f",
867
+ "ruleset": "international",
868
+ "cite": "27(f)",
869
+ "when": {
870
+ "activity": "mine"
871
+ },
872
+ "lights": [
873
+ {
874
+ "light": "all_round",
875
+ "color": "green",
876
+ "count": 3,
877
+ "position": "one near the foremast head and one at each end of the fore yard"
878
+ }
879
+ ],
880
+ "includes": [
881
+ "23a1",
882
+ "23a2",
883
+ "23a34"
884
+ ],
885
+ "conditional_includes": [
886
+ {
887
+ "when": {
888
+ "position": "anchored"
889
+ },
890
+ "one_of": [
891
+ "30a",
892
+ "30b"
893
+ ]
894
+ }
895
+ ],
896
+ "modality": "shall",
897
+ "images": [
898
+ "NRHB_27_f.png"
899
+ ]
900
+ },
901
+ {
902
+ "id": "28",
903
+ "ruleset": "international",
904
+ "cite": "28",
905
+ "when": {
906
+ "activity": "cbd"
907
+ },
908
+ "lights": [
909
+ {
910
+ "light": "all_round",
911
+ "color": "red",
912
+ "count": 3,
913
+ "arrangement": "vertical"
914
+ }
915
+ ],
916
+ "includes": [
917
+ "23a1",
918
+ "23a2",
919
+ "23a34"
920
+ ],
921
+ "modality": "may",
922
+ "images": [
923
+ "NRHB_28.png"
924
+ ],
925
+ "notes": "The Rule 23(a) lights are 'shall' (she is a power-driven vessel underway); the three red lights are 'may'. International Rules only."
926
+ },
927
+ {
928
+ "id": "29a",
929
+ "ruleset": "international",
930
+ "cite": "29(a)",
931
+ "when": {
932
+ "activity": "pilot"
933
+ },
934
+ "lights": [
935
+ {
936
+ "light": "all_round",
937
+ "color": "white",
938
+ "count": 1,
939
+ "position": "upper, at or near the masthead"
940
+ },
941
+ {
942
+ "light": "all_round",
943
+ "color": "red",
944
+ "count": 1,
945
+ "position": "lower, at or near the masthead"
946
+ }
947
+ ],
948
+ "conditional_includes": [
949
+ {
950
+ "when": {
951
+ "position": "underway"
952
+ },
953
+ "includes": [
954
+ "23a34"
955
+ ],
956
+ "cite": "29(a)(ii)"
957
+ },
958
+ {
959
+ "when": {
960
+ "position": "anchored"
961
+ },
962
+ "one_of": [
963
+ "30a",
964
+ "30b"
965
+ ],
966
+ "cite": "29(a)(iii)"
967
+ }
968
+ ],
969
+ "modality": "shall",
970
+ "images": [
971
+ "NRHB_29_a.png",
972
+ "NRHB_29_aiii.png"
973
+ ]
974
+ },
975
+ {
976
+ "id": "30a",
977
+ "ruleset": "international",
978
+ "cite": "30(a)",
979
+ "when": {
980
+ "position": "anchored"
981
+ },
982
+ "lights": [
983
+ {
984
+ "light": "all_round",
985
+ "color": "white",
986
+ "count": 1,
987
+ "position": "in the fore part"
988
+ },
989
+ {
990
+ "light": "all_round",
991
+ "color": "white",
992
+ "count": 1,
993
+ "position": "at or near the stern, at a lower level than the fore one"
994
+ }
995
+ ],
996
+ "modality": "shall",
997
+ "images": [
998
+ "NRHB_30_a.png"
999
+ ]
1000
+ },
1001
+ {
1002
+ "id": "30b",
1003
+ "ruleset": "international",
1004
+ "cite": "30(b)",
1005
+ "when": {
1006
+ "position": "anchored",
1007
+ "length_m": {
1008
+ "lt": 50
1009
+ }
1010
+ },
1011
+ "lights": [
1012
+ {
1013
+ "light": "all_round",
1014
+ "color": "white",
1015
+ "count": 1,
1016
+ "position": "where it can best be seen"
1017
+ }
1018
+ ],
1019
+ "in_lieu_of": [
1020
+ "30a"
1021
+ ],
1022
+ "modality": "may"
1023
+ },
1024
+ {
1025
+ "id": "30c",
1026
+ "ruleset": "international",
1027
+ "cite": "30(c)",
1028
+ "when": {
1029
+ "position": "anchored"
1030
+ },
1031
+ "lights": [
1032
+ {
1033
+ "light": "deck_lights",
1034
+ "note": "available working or equivalent lights to illuminate her decks"
1035
+ }
1036
+ ],
1037
+ "modality": "conditional",
1038
+ "modality_by": [
1039
+ {
1040
+ "when": {
1041
+ "length_m": {
1042
+ "gte": 100
1043
+ }
1044
+ },
1045
+ "modality": "shall"
1046
+ },
1047
+ {
1048
+ "when": {
1049
+ "length_m": {
1050
+ "lt": 100
1051
+ }
1052
+ },
1053
+ "modality": "may"
1054
+ }
1055
+ ]
1056
+ },
1057
+ {
1058
+ "id": "30d",
1059
+ "ruleset": "international",
1060
+ "cite": "30(d)",
1061
+ "when": {
1062
+ "position": "aground",
1063
+ "length_m": {
1064
+ "gte": 12
1065
+ }
1066
+ },
1067
+ "lights": [
1068
+ {
1069
+ "light": "all_round",
1070
+ "color": "red",
1071
+ "count": 2,
1072
+ "arrangement": "vertical"
1073
+ }
1074
+ ],
1075
+ "conditional_includes": [
1076
+ {
1077
+ "one_of": [
1078
+ "30a",
1079
+ "30b"
1080
+ ]
1081
+ }
1082
+ ],
1083
+ "modality": "shall-if-practicable",
1084
+ "images": [
1085
+ "NRHB_30_d.png"
1086
+ ],
1087
+ "notes": "The Rule 30(a)/(b) anchor lights are 'shall'; the two red lights are 'shall, if practicable'. 30(f) exempts vessels under 12 m from the red lights."
1088
+ },
1089
+ {
1090
+ "id": "30e",
1091
+ "ruleset": "international",
1092
+ "cite": "30(e)",
1093
+ "when": {
1094
+ "position": "anchored",
1095
+ "length_m": {
1096
+ "lt": 7
1097
+ },
1098
+ "near_channel": false
1099
+ },
1100
+ "lights": [],
1101
+ "exempts": [
1102
+ "30a",
1103
+ "30b"
1104
+ ],
1105
+ "modality": "exempt"
1106
+ }
1107
+ ]
1108
+ }