import { ConnectedAircraft } from "@repo/db";

export const checkSimulatorConnected = (a: ConnectedAircraft) => {
	if (!a.lastHeartbeat || Date.now() - new Date(a.lastHeartbeat).getTime() > 30_000) return false; // 30 seconds
	if (!a.posLat || !a.posLng) return false;
	return true;
};
