/** * Shared utilities for MechJeb maneuver operations */ import type { KosConnection } from '../../transport/kos-connection.js'; /** * Delay between sequential kOS commands (milliseconds). * kOS telnet needs time to process commands; without delays, * commands can be lost or return garbled output. */ export declare const KOS_COMMAND_DELAY_MS = 500; export interface ManeuverResult { success: boolean; deltaV?: number; timeToNode?: number; nodesCreated?: number; error?: string; } /** * Parse a numeric value from kOS output * Looks for patterns like "23.80 m/s" or just bare numbers */ export declare function parseNumber(output: string): number; /** * Parse time string like "31m 10s" or "5h 23m 10s" to seconds */ export declare function parseTimeString(output: string): number; export declare function delay(ms: number): Promise; /** * Standard delay between kOS commands. * Use this between sequential kOS execute calls. */ export declare function kosDelay(): Promise; /** * Query a numeric value from MechJeb (e.g., "23.80 m/s") */ export declare function queryNumber(conn: KosConnection, suffix: string): Promise; /** * Query a numeric value with retry - useful after node creation * Retries until non-zero value or max attempts reached */ export declare function queryNumberWithRetry(conn: KosConnection, suffix: string, maxAttempts?: number, retryDelayMs?: number): Promise; /** * Query maneuver node info using kOS native commands * Returns deltaV and timeToNode for the next maneuver node * * Uses kOS's NEXTNODE instead of MechJeb INFO suffixes which return "N/A" * Optimized: single command instead of 3 sequential queries */ export declare function queryNodeInfo(conn: KosConnection): Promise<{ deltaV: number; timeToNode: number; }>; /** * Query a time value from MechJeb (e.g., "31m 10s") */ export declare function queryTime(conn: KosConnection, suffix: string): Promise; /** * Execute a maneuver planning command and return the result with node info */ export declare function executeManeuverCommand(conn: KosConnection, cmd: string, timeout?: number): Promise; //# sourceMappingURL=shared.d.ts.map