mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 11:21:00 +00:00
Docs: Update benchmark for openai/gpt-5.4
This commit is contained in:
20
tests/11_geospatial/outputs/openai_gpt-5.4.js
Normal file
20
tests/11_geospatial/outputs/openai_gpt-5.4.js
Normal file
@@ -0,0 +1,20 @@
|
||||
async function analyzeGPS(readings, boundary) {
|
||||
const turf = await import('https://cdn.skypack.dev/@turf/turf')
|
||||
const inside = readings
|
||||
.filter(({ ts, loc }) =>
|
||||
Number.isFinite(ts) &&
|
||||
Array.isArray(loc) &&
|
||||
loc.length === 2 &&
|
||||
loc.every(Number.isFinite) &&
|
||||
turf.booleanPointInPolygon(turf.point(loc), boundary, { ignoreBoundary: true })
|
||||
)
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
|
||||
if (inside.length < 2) return 0
|
||||
|
||||
const line = turf.lineString(inside.map(({ loc }) => loc))
|
||||
return +turf.length(line, { units: 'kilometers' }).toFixed(2)
|
||||
}
|
||||
export default analyzeGPS;
|
||||
// Generation time: 2.011s
|
||||
// Result: PASS
|
||||
Reference in New Issue
Block a user