Docs: Update benchmark for openrouter/bert-nebulon-alpha

This commit is contained in:
github-actions[bot]
2025-11-25 21:20:48 +00:00
parent 40160415c2
commit a175f18319
12 changed files with 333 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
export const analyzeGPS = async (readings, boundary) => {
const { default: turf } = await import('https://unpkg.com/@turf/turf@6/turf.min.js')
const inside = readings.filter(({ loc }) =>
turf.booleanPointInPolygon(turf.point(loc), boundary, { ignoreBoundary: false })
)
if (inside.length < 2) return 0
const sorted = inside.sort((a, b) => a.ts - b.ts)
const line = turf.lineString(sorted.map(({ loc }) => loc))
const length = turf.length(line, { units: 'kilometers' })
return Math.round(length * 100) / 100
}
export default analyzeGPS;