Skip to content

@ue-too/border / index / rhumbBearing

関数: rhumbBearing() ​

rhumbBearing(startCoord, endCoord): number

定義: rhumbLine.ts:89

Calculates the constant bearing along a rhumb line.

パラメータ ​

startCoord ​

GeoCoord

The starting geographic coordinate

endCoord ​

GeoCoord

The ending geographic coordinate

戻り値 ​

number

The constant bearing in degrees (0-360)

Remarks ​

Unlike great circles where the bearing changes along the path, rhumb lines maintain a constant bearing. This makes them simpler for navigation - you can follow a single compass direction.

例 ​

typescript
const start = { latitude: 50.0, longitude: -5.0 };
const end = { latitude: 58.0, longitude: 3.0 };

const bearing = rhumbBearing(start, end);
console.log('Constant bearing:', bearing, 'degrees');

// This bearing stays constant along the entire path