mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 11:21:00 +00:00
Docs: Update benchmark for openrouter/aurora-alpha
This commit is contained in:
14
tests/11_geospatial/outputs/openrouter_aurora-alpha.js
Normal file
14
tests/11_geospatial/outputs/openrouter_aurora-alpha.js
Normal file
@@ -0,0 +1,14 @@
|
||||
async function analyzeGPS(readings, boundary) {
|
||||
const turf = await import('https://cdn.skypack.dev/@turf/turf');
|
||||
const inside = readings.filter(r =>
|
||||
turf.booleanPointInPolygon(turf.point(r.loc), boundary, { ignoreBoundary: true })
|
||||
);
|
||||
if (inside.length < 2) return 0;
|
||||
inside.sort((a, b) => a.ts - b.ts);
|
||||
const line = turf.lineString(inside.map(r => r.loc));
|
||||
const km = turf.length(line, { units: 'kilometers' });
|
||||
return Math.round(km * 100) / 100;
|
||||
}
|
||||
export default analyzeGPS;
|
||||
// Generation time: 1.710s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user