<?php

require_once __DIR__ . '/db.php';

function telemetry_db_for_vessel(array $vessel): PDO
{
    if (empty($vessel['telemetry_db_name'])) {
        throw new RuntimeException('Keine Telemetry-Datenbank für Vessel definiert');
    }

    return telemetry_db_by_name($vessel['telemetry_db_name']);
}
