UNPKG

@adventurelabs/scout-core

Version:

Core utilities and helpers for Adventure Labs Scout applications

12 lines (11 loc) 307 B
export default function get_gps_center(gpsList) { let latitude = 0; let longitude = 0; gpsList.forEach((gps) => { latitude += gps.latitude; longitude += gps.longitude; }); latitude /= gpsList.length; longitude /= gpsList.length; return { latitude, longitude }; }