Skip to content

Commit

Permalink
Extend the documentation on compass points API.
Browse files Browse the repository at this point in the history
  • Loading branch information
vahancho committed Feb 21, 2024
1 parent b5a6580 commit 78b353c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/coordinate.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ class ERKIR_EXPORT Coordinate
DD ///< Decimal Degrees (D.D°)
};

/// The cardinal points types
enum class CompassPrecision
{
///< Main compass directions: north (N), south (S), east (E), west (W)
Cardinal,
///< Ordinal directions: northeast (NE), southeast (SE), southwest (SW), northwest (NW)
Intercardinal,
/*!< Secondary intercardinal directions: north - northeast(NNE), east - northeast(ENE),
east - southeast(ESE), south - southeast(SSE), south - southwest(SSW),
west - southwest(WSW), west - northwest(WNW), north - northwest(NNW)
*/
SecondaryIntercardinal
};

Expand Down Expand Up @@ -76,6 +83,13 @@ class ERKIR_EXPORT Coordinate

/// Returns compass point (to given precision) for supplied bearing.
/*!
16-wind compass rose supported - the eight principal winds and the eight half-winds
together form the 16-wind compass rose, with each compass point at a 22.5°
angle from its two neighbours. The half-winds are north-northeast (NNE),
east-northeast (ENE), east-southeast (ESE), south-southeast (SSE),
south-southwest (SSW), west-southwest (WSW), west-northwest (WNW),
and north-northwest (NNW).
@param bearing Bearing in degrees from north.
@param precision Precision (Cardinal, Intercardinal, SecondaryIntercardinal).
@returns Compass point for supplied bearing.
Expand Down

0 comments on commit 78b353c

Please sign in to comment.