export async function getAIS() {
	const {ADSB_URL} = cfg();
	if(!ADSB_URL) return {data: []};
	const r = await fetch(`${ADSB_URL}:9990/api/ships_array.json`);
	const j = await r.json();

	const {keys, values} = j;
	const boats = values.map(row => {
		const obj = {type: 'vessel'};
		keys.forEach((key, i) => obj[key] = row[i]);
		return obj;
	});

	return boats;
}
