UNPKG

ootk

Version:

Orbital Object Toolkit including Multiple Propagators, Initial Orbit Determination, and Maneuver Calculations.

10 lines 418 B
/** * Calculates the linear distance between two points in three-dimensional space. * @param pos1 The first position. * @param pos2 The second position. * @returns The linear distance between the two positions in kilometers. */ export function linearDistance(pos1, pos2) { return Math.sqrt((pos1.x - pos2.x) ** 2 + (pos1.y - pos2.y) ** 2 + (pos1.z - pos2.z) ** 2); } //# sourceMappingURL=linearDistance.js.map