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
- Enter heading, sectorCount, boundaryPolicy. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| heading | Heading | Required. Finite number. |
| sectorCount | Sector Count | Required. Safe integer; minimum 1; maximum 256. |
| boundaryPolicy | Boundary Policy | Required. Text; one of "clockwise", "counterclockwise"; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sectorIndex | Sector Index | Required. Safe integer. |
| normalizedHeading | Normalized Heading | Required. Finite number. |
{
"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
Similar or alternative tools
- Nautical: Compass Point Halfwind Label
Accept bearings from 0 through 360 degrees and normalize 360 to zero.
- Bearing Quadrant Token
For exact multiples of 90 return the caller's boundaryToken; otherwise select NE, SE, SW, or NW.