Skip to content

Main content

Compass Card Sector Boundary Policy Tool

Equal sectors beginning at north, with an explicit side assigned to exact boundary headings.

Loading tool…

Description

Normalize heading into [0, 360) and divide the circle into sectorCount equal sectors.

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.

Normalize heading into [0, 360) and divide the circle into sectorCount equal sectors.

When to use this tool

Use Compass Card Sector Boundary Policy when you need a bearing normalization, sign correction, or sector label.

How to use the tool and how it works

  1. Enter heading, sectorCount, boundaryPolicy. 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 sectorIndex, normalizedHeading. Use the output convention below.

Normalize heading into [0, 360) and divide the circle into sectorCount equal sectors. At an exact boundary, counterclockwise chooses the preceding sector; clockwise chooses the following sector.1

Input fieldMeaning and unitsAccepted input
headingHeadingRequired. Finite number.
sectorCountSector CountRequired. Safe integer; minimum 1; maximum 256.
boundaryPolicyBoundary PolicyRequired. Text; one of "clockwise", "counterclockwise"; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
sectorIndexSector IndexRequired. Safe integer.
normalizedHeadingNormalized HeadingRequired. Finite number.
json
{
  "input": {
    "heading": 90,
    "sectorCount": 4,
    "boundaryPolicy": "clockwise"
  },
  "output": {
    "sectorIndex": 1,
    "normalizedHeading": 90
  }
}

Limitations and assumptions

  • Boundary recognition uses exact arithmetic without tolerance; sector labels and navigational policy are not supplied.
  • 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/compass-card-sector-boundary-policy — tool.io

Similar or alternative tools