Skip to content

Main content

Nautical: Bearing Relative To Vessel Heading Tool

Compute clockwise vessel-relative bearing and geometric port/starboard/ahead/astern labels from same-reference headings, not collision-avoidance advice.

Loading tool…

Description

Subtract headingDegrees from bearingDegrees and normalize modulo 360.

Bearings are circular coordinates, so zero and 360 degrees represent the same direction. Sector boundaries and true, magnetic, compass, or relative references need explicit conventions.

Subtract headingDegrees from bearingDegrees and normalize modulo 360.

When to use this tool

Use Nautical: Bearing Relative To Vessel Heading when you need a bearing normalization, sign correction, or sector label.

How to use the tool and how it works

  1. Enter bearingDegrees, headingDegrees. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Subtract headingDegrees from bearingDegrees and normalize modulo 360. Label zero ahead, 180 astern, the intervening clockwise half starboard, and the remaining half port.1

Input fieldMeaning and unitsAccepted input
bearingDegreesBearing DegreesRequired. Finite number.
headingDegreesHeading DegreesRequired. Finite number.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.relativeBearingDegreesRelative Bearing DegreesCalculated result member: number.
result.sideSideCalculated result member: string.
json
{
  "input": {
    "bearingDegrees": 350,
    "headingDegrees": 10
  },
  "output": {
    "result": {
      "relativeBearingDegrees": 340,
      "side": "port"
    }
  }
}

Limitations and assumptions

  • Both inputs must use the same true or magnetic reference; no collision risk or maneuver is determined.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use current heading and magnetic information and a complete navigation process when interpreting an actual course or contact.

References

  1. Calculation and input contract: nautical/bearing-relative-to-vessel-heading — tool.io

Similar or alternative tools