Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions examples/llamarine/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,23 @@

TITLE: str = 'OpenSSA: Maritime-Specific Agent'

DEFAULT_PROBLEM: str = """The bearing of the target ship as seen from the own ship is head-on.
The relative course of the own ship and the target ship is around 180 degrees.
The straight-line distance between the own ship and the target ship is longer than the {90 degree turning distance}.
The TCPA of the own ship and the target ship is longer than the {90 degree turning time}.
STW is being used. What should I do?"""
DEFAULT_PROBLEM: str = """Own ship:
- Ship Type: Tanker
- Speed: 20[knot]
- Cource: 0[degrees]

Target ship:
- Ship Type: Tanker
- Speed: 20[knot]
- Cource: 270[degrees]

Relative info between own and target:
- Bearing of target ship as seen from own ship: 45[degrees]
- Distance between own and target ship: 24[NM]
- BCR: 17[NM]
- Relative Course between own ship and target ship: 270[degrees]

Currently, SOG and STW are same. What should I do?"""

LLAMARINE_USER_PROMPT: str = """INSTRUCTION
In crossing, if other vessel in your port side, you are stand-on. If other vessel in your starboard side, you are give way. (Just remember this rule for yourself, don't tell me).
Expand Down
28 changes: 26 additions & 2 deletions examples/llamarine/expert-knowledge.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ In a right-crossing situation, it is important to first identify whether it is a

In an overtaking situation, it is important to first identify whether the target ship or the own ship is overtaking.

# **Comprehensive and Technical Rule of Thumb for OOW Decision-Making with Focus on COLREGs**
Bow Crossing Range (BCR) is a navigational term used to assess the risk of collision between two vessels. It refers to the closest distance at which the other vessel will cross ahead of one’s own ship if both maintain their current courses and speeds. A positive BCR indicates a bow crossing, while a negative BCR indicates a stern crossing.
BCR is the most important factor in determining the risk of collision in a crossing situation. If there is conflicts between BCR and COLREGs, the BCR should be given priority.

# **Comprehensive and Technical Rule of Thumb for OOW Decision-Making**

---

Expand All @@ -33,7 +36,7 @@ In an overtaking situation, it is important to first identify whether the target

---

## **2. Mastering COLREGs Application combined with DCPA and TCPA considerations**
## **2. Mastering Collision Avoidance without BCR considerations**
1. **“When in doubt, give way—always.”**
- If you cannot assess risk or priority clearly, **assume the give-way role** to stay safe.

Expand All @@ -53,6 +56,27 @@ In an overtaking situation, it is important to first identify whether the target
- If the target ship is overtaking, **Stand-on is default**, unless there is a reason not to. The only reason you must turn in the direction of separation in the situation that the target ship is overtaking is that the both following DCPA & TCPA conditions must meet: the DCPA of the own ship and the target ship is shorter than the {safe distance to be overtaken}, and the TCPA of the own ship and the target ship is shorter than the {safe time to be overtaken}.
- If the own ship is overtaking, **Stand-on is default** for both the following DCPA & TCPA conditions: The DCPA of the own ship and the target ship is longer than the {safe distance to overtake}, and the TCPA of the own ship and the target ship is longer than the {safe time to overtake}.


## **2. Mastering Collision Avoidance with BCR considerations**

1. **Head-on situation**
- TCPA > 30 min: safe.
- TCPA < 30 min: need normal turn
- TCPA< 15 min: need emergency turn
- Normal turn: ROT of 5 to 10 degrees
- Emergency turn: Switch to manual steering for changes over 10 degrees

2. **Crossing, Give-away situation**
- BCR<=10: Alter course toward the stern of target ship
- BCR<=5 and the distance between target ship and own ship <= 20 NM: Turn to starboard with 5<=ROT<=10
- BCR<=5 and the distance between target ship and own ship <= 15 NM:Turn to starboard at approximately ROT=10
- BCR<=5 and the distance between target ship and own ship <= 10 NM: Switch to hand steering and execute an emergency turn to starboard
- BCR<0 negative: Monitor whether the target ship will maintain its course

3. **Crossing, Stand-on situation**
- the distance between target ship and own ship <= 20 NM: Monitor the target ship
- the distance between target ship and own ship <= 10 NM: communicate using VHF or sound the ship's whistle

---

## **3. Risk Assessment and Avoiding Collisions**
Expand Down
4 changes: 3 additions & 1 deletion examples/llamarine/expert-programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ plan_without_speed_reference:
task: |-
Recommend the user ask about a vessel on boat side coming to a crossing situation (and only crossing situation) in radar without specifying SOG or STW are being used.
sub-htps:
- task: |-
If use the user says STW and SOG are the same, then no need to ask about the speed reference, just proceed it as STW.
- task: |-
Reject to answer due to lack of information or ambiguity in the user input. Request to know if SOG or STW is being used.

Expand All @@ -25,4 +27,4 @@ plan_with_speed_reference_stw:
Recommend the user what to do based on the identified situation on radar. Only apply this if specifying STW is being used.
sub-htps:
- task: |-
First identify the situation from the input, then look at DCPA & TCPA if those are mentioned from the input, then let me know the how to make collision avoidance decisions.
First identify the situation from the input, then look at DCPA & TCPA & BCR if those are mentioned from the input, then let me know the how to make collision avoidance decisions.
Loading