mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-07-18 05:45:46 +00:00
Docs: Update benchmark for openai/gpt-5.6-luna EFF:high
This commit is contained in:
27
tests/11_geospatial/outputs/openai_gpt-5.6-luna EFF_high.js
Normal file
27
tests/11_geospatial/outputs/openai_gpt-5.6-luna EFF_high.js
Normal file
@@ -0,0 +1,27 @@
|
||||
let turfModule;
|
||||
|
||||
async function analyzeGPS(readings, boundary) {
|
||||
turfModule ||= import("https://cdn.jsdelivr.net/npm/@turf/turf@7.2.0/+esm");
|
||||
|
||||
const {
|
||||
point,
|
||||
lineString,
|
||||
length: pathLength,
|
||||
booleanPointInPolygon
|
||||
} = await turfModule;
|
||||
|
||||
const valid = readings
|
||||
.filter(({ loc }) =>
|
||||
booleanPointInPolygon(point(loc), boundary, { ignoreBoundary: true })
|
||||
)
|
||||
.sort((a, b) => a.ts - b.ts);
|
||||
|
||||
if (valid.length < 2) return 0;
|
||||
|
||||
const path = lineString(valid.map(({ loc }) => loc));
|
||||
|
||||
return Number(pathLength(path).toFixed(2));
|
||||
}
|
||||
export default analyzeGPS;
|
||||
// Generation time: 12.391s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user