flight-indicators 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -447,4 +447,268 @@ interface AoaIndicatorProps extends InstrumentProps {
447
447
  }
448
448
  declare function AoaIndicator({ aoa, min, optimum, max, showValue, label, ...props }: AoaIndicatorProps): react.JSX.Element;
449
449
 
450
- export { AdfIndicator, type AdfIndicatorProps, Airspeed, type AirspeedArcs, type AirspeedProps, Altimeter, type AltimeterProps, AoaIndicator, type AoaIndicatorProps, AttitudeIndicator, type AttitudeIndicatorProps, DEFAULT_BAR_GAUGES, DEFAULT_MANIFOLD, DEFAULT_RPM, type DataField, DataPanel, type DataPanelProps, type EngineBarGauge, type EngineGauge, EngineIndicator, type EngineIndicatorProps, FlapIndicator, type FlapIndicatorProps, type FlapSpeedLimit, FuelIndicator, type FuelIndicatorProps, type FuelTank, HeadingIndicator, type HeadingIndicatorProps, HsiIndicator, type HsiIndicatorProps, IlsIndicator, type IlsIndicatorProps, type IlsNeedles, type InstrumentProps, MAX_BAR_GAUGES, MAX_CYLINDERS, MAX_FIELDS, MAX_TANKS, type PressureUnit, type RadioFrequency, RadioPanel, type RadioPanelProps, RadioStack, type RadioStackProps, type RunwaySide, type ToFrom, TurnCoordinator, type TurnCoordinatorProps, VerticalSpeed, type VerticalSpeedProps, VorIndicator, type VorIndicatorProps, type VorNeedle, WindIndicator, type WindIndicatorProps, formatAdf, formatDme, formatNav, formatValue, parseAdf, parseNav, relativeBearing, vorDeviation };
450
+ /** Clock / timer shown on the lower display: universal time, local time, flight time or elapsed time. */
451
+ type ClockMode = 'UT' | 'LT' | 'FT' | 'ET';
452
+ /** Reading shown on the upper display: bus voltage, or outside air temperature in °F or °C. */
453
+ type UpperDisplay = 'volts' | 'F' | 'C';
454
+ /** Alarms the clock raises. Each one flashes its display until any button is pressed. */
455
+ type ClockAlarm = 'voltage' | 'flightTime' | 'countdown';
456
+ interface DigitalClockProps extends InstrumentProps {
457
+ /** Outside air temperature in °C. Leave out (or pass `NaN`) to show dashes. */
458
+ oat?: number;
459
+ /** Bus voltage. Leave out (or pass `NaN`) to show dashes. */
460
+ volts?: number;
461
+ /** Upper display reading. Pass it to control the component; leave it out and the O.A.T / VOLTS button cycles it. */
462
+ upperDisplay?: UpperDisplay;
463
+ /** Starting upper display reading when `upperDisplay` is not controlled. Default `"volts"`. */
464
+ defaultUpperDisplay?: UpperDisplay;
465
+ /** Called when the O.A.T / VOLTS button picks the next reading. */
466
+ onUpperDisplayChange?: (next: UpperDisplay) => void;
467
+ /** Lower display mode. Pass it to control the component; leave it out and the SELECT button cycles it. */
468
+ mode?: ClockMode;
469
+ /** Starting lower display mode when `mode` is not controlled. Default `"UT"`. */
470
+ defaultMode?: ClockMode;
471
+ /** Called when SELECT picks the next mode, or an alarm brings its mode up. */
472
+ onModeChange?: (next: ClockMode) => void;
473
+ /** Current time. Leave out to run from the system clock; pass simulator time to run the clock, FT and ET from it. */
474
+ now?: number | Date;
475
+ /** Local time offset from UT in minutes, e.g. `120` for UTC+2. Pass it to control the component. */
476
+ localOffset?: number;
477
+ /** Starting local time offset when `localOffset` is not controlled. Default: the browser's time zone. */
478
+ defaultLocalOffset?: number;
479
+ /** Called when local time is set with the buttons. */
480
+ onLocalOffsetChange?: (minutes: number) => void;
481
+ /** Called with the new universal time after UT is set with the buttons. */
482
+ onTimeSet?: (utc: Date) => void;
483
+ /** Whether flight time is counting, e.g. `airspeed > 50` or engine running. Default `true`. */
484
+ flightTimeRunning?: boolean;
485
+ /** Flight time already logged when the component mounts, in seconds. Default `0`. */
486
+ defaultFlightTime?: number;
487
+ /** Flight time in seconds at which the flight time alarm goes off. `0` turns it off. Can also be set with the buttons. Default `0`. */
488
+ defaultFlightTimeAlarm?: number;
489
+ /** Starting count-down time for ET in seconds. `0` makes ET count up. Can also be set with the buttons. Default `0`. */
490
+ defaultCountdown?: number;
491
+ /** Voltage below which the low voltage alarm goes off. Default `24.5` on a 28 V system, `12.4` on a 14 V system. */
492
+ lowVoltage?: number;
493
+ /** Voltage above which the high voltage alarm goes off. Default `32` on a 28 V system, `16` on a 14 V system. */
494
+ highVoltage?: number;
495
+ /** Called when an alarm goes off. */
496
+ onAlarm?: (alarm: ClockAlarm) => void;
497
+ }
498
+ /** How long a button must be held for its second function, in ms. */
499
+ declare const HOLD_TIME = 2000;
500
+ /** Formats a timer in seconds the way the clock shows it: `MM:SS` under an hour, `HH:MM` from then on. */
501
+ declare function formatTimer(seconds: number): string;
502
+ /**
503
+ * A panel clock with an outside air temperature and voltmeter display, in the style of the
504
+ * two-window digital clocks fitted to many light aircraft.
505
+ *
506
+ * - O.A.T / VOLTS cycles the upper display: volts → °F → °C. Hold it for a display test.
507
+ * - SELECT cycles the lower display: UT → LT → FT → ET.
508
+ * - CONTROL in ET starts, stops and resets the timer. Hold it in FT or ET to reset that timer.
509
+ * - SELECT and CONTROL together (or holding SELECT) enters set mode in UT, LT, FT (alarm) and ET (count-down):
510
+ * CONTROL steps the flashing digit, SELECT moves to the next one and confirms after the last.
511
+ */
512
+ declare function DigitalClock({ oat, volts, upperDisplay, defaultUpperDisplay, onUpperDisplayChange, mode, defaultMode, onModeChange, now, localOffset, defaultLocalOffset, onLocalOffsetChange, onTimeSet, flightTimeRunning, defaultFlightTime, defaultFlightTimeAlarm, defaultCountdown, lowVoltage, highVoltage, onAlarm, ...props }: DigitalClockProps): react.JSX.Element;
513
+
514
+ /** One half of a dual-needle gauge: its scale, coloured bands and current value. */
515
+ interface DualGaugeScale {
516
+ value?: number;
517
+ /** Bottom of the scale. Default `0`. */
518
+ min?: number;
519
+ /** Top of the scale. Default `100`. */
520
+ max?: number;
521
+ /** Caption at the top of this half, e.g. `"OIL PRESS"` or `"L"`. */
522
+ label?: string;
523
+ /** Unit printed at the bottom of this half, e.g. `"PSI"`. */
524
+ unit?: string;
525
+ /** Numbered scale marks. A number is printed as is; `{ value, text }` prints `text` at `value`. Default: `min` and `max`. Pass `[]` for an unnumbered scale. */
526
+ marks?: Array<number | {
527
+ value: number;
528
+ text: string;
529
+ }>;
530
+ /** Number of minor tick intervals between `min` and `max`. Default `10`. Marks get a longer tick of their own. */
531
+ ticks?: number;
532
+ /** Normal operating band `[from, to]`, drawn green. */
533
+ green?: [number, number];
534
+ /** Caution band `[from, to]`, drawn yellow. */
535
+ yellow?: [number, number];
536
+ /** Low limit, drawn as a red radial line. */
537
+ low?: number;
538
+ /** High limit, drawn as a red radial line. */
539
+ high?: number;
540
+ /** Decimal places in the accessible label. Default `0`. */
541
+ decimals?: number;
542
+ }
543
+ interface DualGaugeProps extends InstrumentProps {
544
+ /** Scale and needle on the left half. The needle pivots at the left edge of the dial. */
545
+ left?: DualGaugeScale;
546
+ /** Scale and needle on the right half. The needle pivots at the right edge of the dial. */
547
+ right?: DualGaugeScale;
548
+ /** Caption across the top of the dial, e.g. `"FUEL QTY"`. */
549
+ label?: string;
550
+ /** Second caption across the bottom of the dial, e.g. `"GALLONS"`. */
551
+ sublabel?: string;
552
+ }
553
+ /**
554
+ * Small dual-needle engine gauge in the style of the Cessna 172 / 182 panel: two independent scales,
555
+ * each with a needle pivoting at its own edge of the dial, so the two needles meet in the middle.
556
+ * Both scales read upwards. Used for fuel quantity, oil temperature / pressure, vacuum / ammeter and so on;
557
+ * see the preset gauges for ready-made scales.
558
+ */
559
+ declare function DualGauge({ left, right, label, sublabel, ...props }: DualGaugeProps): react.JSX.Element;
560
+ type ScaleOverride = Omit<DualGaugeScale, 'value'>;
561
+ interface PresetProps extends InstrumentProps {
562
+ /** Overrides for the left scale (range, bands, marks, unit...). */
563
+ leftScale?: ScaleOverride;
564
+ /** Overrides for the right scale. */
565
+ rightScale?: ScaleOverride;
566
+ }
567
+ declare const FUEL_QUANTITY_SCALE: ScaleOverride;
568
+ declare const OIL_TEMPERATURE_SCALE: ScaleOverride;
569
+ declare const OIL_PRESSURE_SCALE: ScaleOverride;
570
+ declare const VACUUM_SCALE: ScaleOverride;
571
+ declare const AMMETER_SCALE: ScaleOverride;
572
+ declare const EGT_SCALE: ScaleOverride;
573
+ declare const FUEL_FLOW_SCALE: ScaleOverride;
574
+ declare const MANIFOLD_SCALE: ScaleOverride;
575
+ interface FuelQuantityGaugeProps extends PresetProps {
576
+ /** Fuel in the left tank. */
577
+ leftQuantity?: number;
578
+ /** Fuel in the right tank. */
579
+ rightQuantity?: number;
580
+ }
581
+ /** Dual fuel quantity gauge: left tank on the left needle, right tank on the right. Default scale 0–44 gal with a yellow 0–5 band. */
582
+ declare function FuelQuantityGauge({ leftQuantity, rightQuantity, leftScale, rightScale, ...props }: FuelQuantityGaugeProps): react.JSX.Element;
583
+ interface OilGaugeProps extends PresetProps {
584
+ /** Oil temperature, left needle. Default scale 75–250 °F. */
585
+ temperature?: number;
586
+ /** Oil pressure, right needle. Default scale 0–115 PSI. */
587
+ pressure?: number;
588
+ }
589
+ /** Oil temperature (left) and oil pressure (right) dual gauge. */
590
+ declare function OilGauge({ temperature, pressure, leftScale, rightScale, ...props }: OilGaugeProps): react.JSX.Element;
591
+ interface VacuumAmmeterGaugeProps extends PresetProps {
592
+ /** Vacuum (suction) in inHg, left needle. Default scale 3–7 with a green 4.5–5.5 band. */
593
+ vacuum?: number;
594
+ /** Alternator current in amps, right needle. Centre-zero scale −60…+60. */
595
+ amps?: number;
596
+ }
597
+ /** Vacuum (suction) on the left and a centre-zero ammeter on the right. */
598
+ declare function VacuumAmmeterGauge({ vacuum, amps, leftScale, rightScale, ...props }: VacuumAmmeterGaugeProps): react.JSX.Element;
599
+ interface EgtFuelFlowGaugeProps extends PresetProps {
600
+ /** Exhaust gas temperature, left needle. Unnumbered 1250–1650 °F scale, as EGT is read relative to peak. */
601
+ egt?: number;
602
+ /** Fuel flow in gallons per hour, right needle. Default scale 0–20. */
603
+ fuelFlow?: number;
604
+ }
605
+ /** Exhaust gas temperature (left) and fuel flow (right) dual gauge. */
606
+ declare function EgtFuelFlowGauge({ egt, fuelFlow, leftScale, rightScale, ...props }: EgtFuelFlowGaugeProps): react.JSX.Element;
607
+ interface ManifoldFuelFlowGaugeProps extends PresetProps {
608
+ /** Manifold pressure in inHg, left needle. Default scale 10–35 with a green 15–23 band. */
609
+ manifold?: number;
610
+ /** Fuel flow in gallons per hour, right needle. Default scale 0–20. */
611
+ fuelFlow?: number;
612
+ }
613
+ /** The constant-speed propeller panel's combined manifold pressure (left) and fuel flow (right) gauge. */
614
+ declare function ManifoldFuelFlowGauge({ manifold, fuelFlow, leftScale, rightScale, ...props }: ManifoldFuelFlowGaugeProps): react.JSX.Element;
615
+
616
+ interface TachometerProps extends InstrumentProps {
617
+ /** Engine speed in RPM. Clamped to `0…max`. */
618
+ rpm?: number;
619
+ /** Top of the scale in RPM. Default `3500`. */
620
+ max?: number;
621
+ /** Normal operating band `[from, to]` in RPM, drawn green. Default `[2000, 2400]` (Cessna 182T). `null` hides it. */
622
+ green?: [number, number] | null;
623
+ /** Red line in RPM. Default `2400`. `null` hides it. */
624
+ redline?: number | null;
625
+ /** Engine hours shown on the hour meter in the dial. Leave it out to hide the meter. */
626
+ hours?: number;
627
+ }
628
+ /**
629
+ * Analog tachometer, marked in hundreds of RPM, with a green operating arc, a red line and an optional
630
+ * engine hour meter in the lower half of the dial.
631
+ */
632
+ declare function Tachometer({ rpm, max, green, redline, hours, ...props }: TachometerProps): react.JSX.Element;
633
+
634
+ interface MagneticCompassProps extends InstrumentProps {
635
+ /** Magnetic heading in degrees. */
636
+ heading?: number;
637
+ /** Compass correction card rows, printed under the window: `{ for, steer }` in degrees. Leave it out to hide the card. */
638
+ deviationCard?: Array<{
639
+ for: number;
640
+ steer: number;
641
+ }>;
642
+ }
643
+ /**
644
+ * Wet ("whiskey") magnetic compass: the card floats behind a window with a vertical lubber line.
645
+ * The pilot reads the back of the card, so the numbers grow to the left: on a heading of north,
646
+ * east (3, 6, E) is to the left of the lubber line and west to the right.
647
+ */
648
+ declare function MagneticCompass({ heading, deviationCard, ...props }: MagneticCompassProps): react.JSX.Element;
649
+
650
+ interface TrimIndicatorProps extends InstrumentProps {
651
+ /** Elevator trim from `-1` (full nose down) to `1` (full nose up). `0` is neutral. */
652
+ trim?: number;
653
+ /** Take-off range `[from, to]` on the same −1…1 scale, drawn as a white band. Default `[0.05, 0.35]`. `null` hides it. */
654
+ takeoff?: [number, number] | null;
655
+ }
656
+ /**
657
+ * Elevator trim wheel and position indicator, as on the pedestal: NOSE DOWN at the top, NOSE UP at the bottom,
658
+ * a pointer on the scale and a white TAKE OFF band. The wheel's ribs roll with the trim.
659
+ */
660
+ declare function TrimIndicator({ trim, takeoff, ...props }: TrimIndicatorProps): react.JSX.Element;
661
+
662
+ interface HobbsMeterProps extends InstrumentProps {
663
+ /** Hours run. The last drum shows tenths. Negative values are read as `0`. */
664
+ hours?: number;
665
+ /** Number of drums, tenths included. Default `6` (99999.9 hours). */
666
+ digits?: number;
667
+ /** Turns the running indicator. Default `false`. */
668
+ running?: boolean;
669
+ /** Caption above the counter. Default `"HOURS"`. */
670
+ label?: string;
671
+ }
672
+ /**
673
+ * Hobbs (hour) meter: a rolling-drum hour counter with tenths on a white drum, and a small
674
+ * indicator wheel that turns while the meter is running.
675
+ */
676
+ declare function HobbsMeter({ hours, digits, running, label, ...props }: HobbsMeterProps): react.JSX.Element;
677
+
678
+ /**
679
+ * Drum positions for a mechanical counter. Drum 0 (rightmost, tenths) turns smoothly; each higher drum
680
+ * stands still until every drum to its right reads 9, then rolls over with them (a Geneva drive).
681
+ * Position `p` means the drum shows digit `p`, partly rolled towards `p + 1`; `10` is the extra 0 at the bottom of the drum.
682
+ */
683
+ declare function drumPositions(value: number, digits: number): number[];
684
+
685
+ /** One annunciator legend. */
686
+ interface Annunciator {
687
+ /** Key used in `lights`. */
688
+ id: string;
689
+ /** Legend text, e.g. `"OIL PRESS"`. */
690
+ label: string;
691
+ /** `"warning"` lights red, `"caution"` amber, `"advisory"` green. Default `"caution"`. */
692
+ level?: 'warning' | 'caution' | 'advisory';
693
+ /** Draws `L` and `R` either side of the legend, lit separately (e.g. `L FUEL R`). */
694
+ split?: boolean;
695
+ }
696
+ /** State of one light: `true` lights it; for split legends `"left"`, `"right"` or `"both"` choose the side. */
697
+ type AnnunciatorState = boolean | 'left' | 'right' | 'both';
698
+ interface AnnunciatorPanelProps extends InstrumentProps {
699
+ /** Legends, laid out left to right in up to two rows. Defaults to the Cessna 182T set, see `DEFAULT_ANNUNCIATORS`. */
700
+ annunciators?: Annunciator[];
701
+ /** Which lights are on, by annunciator `id`. Missing ids are off. */
702
+ lights?: Record<string, AnnunciatorState | undefined>;
703
+ /** Lamp test: lights every legend. Default `false`. */
704
+ test?: boolean;
705
+ }
706
+ /** The Cessna 182T annunciator: L FUEL R, PITCH TRIM, OIL PRESS, L VAC R and VOLTS. */
707
+ declare const DEFAULT_ANNUNCIATORS: Annunciator[];
708
+ /**
709
+ * Annunciator strip: legends that are dark until lit in red (warning), amber (caution) or green (advisory).
710
+ * Split legends such as `L FUEL R` light the side that has the fault.
711
+ */
712
+ declare function AnnunciatorPanel({ annunciators, lights, test, ...props }: AnnunciatorPanelProps): react.JSX.Element;
713
+
714
+ export { AMMETER_SCALE, AdfIndicator, type AdfIndicatorProps, Airspeed, type AirspeedArcs, type AirspeedProps, Altimeter, type AltimeterProps, type Annunciator, AnnunciatorPanel, type AnnunciatorPanelProps, type AnnunciatorState, AoaIndicator, type AoaIndicatorProps, AttitudeIndicator, type AttitudeIndicatorProps, type ClockAlarm, type ClockMode, DEFAULT_ANNUNCIATORS, DEFAULT_BAR_GAUGES, DEFAULT_MANIFOLD, DEFAULT_RPM, type DataField, DataPanel, type DataPanelProps, DigitalClock, type DigitalClockProps, DualGauge, type DualGaugeProps, type DualGaugeScale, EGT_SCALE, EgtFuelFlowGauge, type EgtFuelFlowGaugeProps, type EngineBarGauge, type EngineGauge, EngineIndicator, type EngineIndicatorProps, FUEL_FLOW_SCALE, FUEL_QUANTITY_SCALE, FlapIndicator, type FlapIndicatorProps, type FlapSpeedLimit, FuelIndicator, type FuelIndicatorProps, FuelQuantityGauge, type FuelQuantityGaugeProps, type FuelTank, HOLD_TIME, HeadingIndicator, type HeadingIndicatorProps, HobbsMeter, type HobbsMeterProps, HsiIndicator, type HsiIndicatorProps, IlsIndicator, type IlsIndicatorProps, type IlsNeedles, type InstrumentProps, MANIFOLD_SCALE, MAX_BAR_GAUGES, MAX_CYLINDERS, MAX_FIELDS, MAX_TANKS, MagneticCompass, type MagneticCompassProps, ManifoldFuelFlowGauge, type ManifoldFuelFlowGaugeProps, OIL_PRESSURE_SCALE, OIL_TEMPERATURE_SCALE, OilGauge, type OilGaugeProps, type PressureUnit, type RadioFrequency, RadioPanel, type RadioPanelProps, RadioStack, type RadioStackProps, type RunwaySide, Tachometer, type TachometerProps, type ToFrom, TrimIndicator, type TrimIndicatorProps, TurnCoordinator, type TurnCoordinatorProps, type UpperDisplay, VACUUM_SCALE, VacuumAmmeterGauge, type VacuumAmmeterGaugeProps, VerticalSpeed, type VerticalSpeedProps, VorIndicator, type VorIndicatorProps, type VorNeedle, WindIndicator, type WindIndicatorProps, drumPositions, formatAdf, formatDme, formatNav, formatTimer, formatValue, parseAdf, parseNav, relativeBearing, vorDeviation };
package/dist/index.d.ts CHANGED
@@ -447,4 +447,268 @@ interface AoaIndicatorProps extends InstrumentProps {
447
447
  }
448
448
  declare function AoaIndicator({ aoa, min, optimum, max, showValue, label, ...props }: AoaIndicatorProps): react.JSX.Element;
449
449
 
450
- export { AdfIndicator, type AdfIndicatorProps, Airspeed, type AirspeedArcs, type AirspeedProps, Altimeter, type AltimeterProps, AoaIndicator, type AoaIndicatorProps, AttitudeIndicator, type AttitudeIndicatorProps, DEFAULT_BAR_GAUGES, DEFAULT_MANIFOLD, DEFAULT_RPM, type DataField, DataPanel, type DataPanelProps, type EngineBarGauge, type EngineGauge, EngineIndicator, type EngineIndicatorProps, FlapIndicator, type FlapIndicatorProps, type FlapSpeedLimit, FuelIndicator, type FuelIndicatorProps, type FuelTank, HeadingIndicator, type HeadingIndicatorProps, HsiIndicator, type HsiIndicatorProps, IlsIndicator, type IlsIndicatorProps, type IlsNeedles, type InstrumentProps, MAX_BAR_GAUGES, MAX_CYLINDERS, MAX_FIELDS, MAX_TANKS, type PressureUnit, type RadioFrequency, RadioPanel, type RadioPanelProps, RadioStack, type RadioStackProps, type RunwaySide, type ToFrom, TurnCoordinator, type TurnCoordinatorProps, VerticalSpeed, type VerticalSpeedProps, VorIndicator, type VorIndicatorProps, type VorNeedle, WindIndicator, type WindIndicatorProps, formatAdf, formatDme, formatNav, formatValue, parseAdf, parseNav, relativeBearing, vorDeviation };
450
+ /** Clock / timer shown on the lower display: universal time, local time, flight time or elapsed time. */
451
+ type ClockMode = 'UT' | 'LT' | 'FT' | 'ET';
452
+ /** Reading shown on the upper display: bus voltage, or outside air temperature in °F or °C. */
453
+ type UpperDisplay = 'volts' | 'F' | 'C';
454
+ /** Alarms the clock raises. Each one flashes its display until any button is pressed. */
455
+ type ClockAlarm = 'voltage' | 'flightTime' | 'countdown';
456
+ interface DigitalClockProps extends InstrumentProps {
457
+ /** Outside air temperature in °C. Leave out (or pass `NaN`) to show dashes. */
458
+ oat?: number;
459
+ /** Bus voltage. Leave out (or pass `NaN`) to show dashes. */
460
+ volts?: number;
461
+ /** Upper display reading. Pass it to control the component; leave it out and the O.A.T / VOLTS button cycles it. */
462
+ upperDisplay?: UpperDisplay;
463
+ /** Starting upper display reading when `upperDisplay` is not controlled. Default `"volts"`. */
464
+ defaultUpperDisplay?: UpperDisplay;
465
+ /** Called when the O.A.T / VOLTS button picks the next reading. */
466
+ onUpperDisplayChange?: (next: UpperDisplay) => void;
467
+ /** Lower display mode. Pass it to control the component; leave it out and the SELECT button cycles it. */
468
+ mode?: ClockMode;
469
+ /** Starting lower display mode when `mode` is not controlled. Default `"UT"`. */
470
+ defaultMode?: ClockMode;
471
+ /** Called when SELECT picks the next mode, or an alarm brings its mode up. */
472
+ onModeChange?: (next: ClockMode) => void;
473
+ /** Current time. Leave out to run from the system clock; pass simulator time to run the clock, FT and ET from it. */
474
+ now?: number | Date;
475
+ /** Local time offset from UT in minutes, e.g. `120` for UTC+2. Pass it to control the component. */
476
+ localOffset?: number;
477
+ /** Starting local time offset when `localOffset` is not controlled. Default: the browser's time zone. */
478
+ defaultLocalOffset?: number;
479
+ /** Called when local time is set with the buttons. */
480
+ onLocalOffsetChange?: (minutes: number) => void;
481
+ /** Called with the new universal time after UT is set with the buttons. */
482
+ onTimeSet?: (utc: Date) => void;
483
+ /** Whether flight time is counting, e.g. `airspeed > 50` or engine running. Default `true`. */
484
+ flightTimeRunning?: boolean;
485
+ /** Flight time already logged when the component mounts, in seconds. Default `0`. */
486
+ defaultFlightTime?: number;
487
+ /** Flight time in seconds at which the flight time alarm goes off. `0` turns it off. Can also be set with the buttons. Default `0`. */
488
+ defaultFlightTimeAlarm?: number;
489
+ /** Starting count-down time for ET in seconds. `0` makes ET count up. Can also be set with the buttons. Default `0`. */
490
+ defaultCountdown?: number;
491
+ /** Voltage below which the low voltage alarm goes off. Default `24.5` on a 28 V system, `12.4` on a 14 V system. */
492
+ lowVoltage?: number;
493
+ /** Voltage above which the high voltage alarm goes off. Default `32` on a 28 V system, `16` on a 14 V system. */
494
+ highVoltage?: number;
495
+ /** Called when an alarm goes off. */
496
+ onAlarm?: (alarm: ClockAlarm) => void;
497
+ }
498
+ /** How long a button must be held for its second function, in ms. */
499
+ declare const HOLD_TIME = 2000;
500
+ /** Formats a timer in seconds the way the clock shows it: `MM:SS` under an hour, `HH:MM` from then on. */
501
+ declare function formatTimer(seconds: number): string;
502
+ /**
503
+ * A panel clock with an outside air temperature and voltmeter display, in the style of the
504
+ * two-window digital clocks fitted to many light aircraft.
505
+ *
506
+ * - O.A.T / VOLTS cycles the upper display: volts → °F → °C. Hold it for a display test.
507
+ * - SELECT cycles the lower display: UT → LT → FT → ET.
508
+ * - CONTROL in ET starts, stops and resets the timer. Hold it in FT or ET to reset that timer.
509
+ * - SELECT and CONTROL together (or holding SELECT) enters set mode in UT, LT, FT (alarm) and ET (count-down):
510
+ * CONTROL steps the flashing digit, SELECT moves to the next one and confirms after the last.
511
+ */
512
+ declare function DigitalClock({ oat, volts, upperDisplay, defaultUpperDisplay, onUpperDisplayChange, mode, defaultMode, onModeChange, now, localOffset, defaultLocalOffset, onLocalOffsetChange, onTimeSet, flightTimeRunning, defaultFlightTime, defaultFlightTimeAlarm, defaultCountdown, lowVoltage, highVoltage, onAlarm, ...props }: DigitalClockProps): react.JSX.Element;
513
+
514
+ /** One half of a dual-needle gauge: its scale, coloured bands and current value. */
515
+ interface DualGaugeScale {
516
+ value?: number;
517
+ /** Bottom of the scale. Default `0`. */
518
+ min?: number;
519
+ /** Top of the scale. Default `100`. */
520
+ max?: number;
521
+ /** Caption at the top of this half, e.g. `"OIL PRESS"` or `"L"`. */
522
+ label?: string;
523
+ /** Unit printed at the bottom of this half, e.g. `"PSI"`. */
524
+ unit?: string;
525
+ /** Numbered scale marks. A number is printed as is; `{ value, text }` prints `text` at `value`. Default: `min` and `max`. Pass `[]` for an unnumbered scale. */
526
+ marks?: Array<number | {
527
+ value: number;
528
+ text: string;
529
+ }>;
530
+ /** Number of minor tick intervals between `min` and `max`. Default `10`. Marks get a longer tick of their own. */
531
+ ticks?: number;
532
+ /** Normal operating band `[from, to]`, drawn green. */
533
+ green?: [number, number];
534
+ /** Caution band `[from, to]`, drawn yellow. */
535
+ yellow?: [number, number];
536
+ /** Low limit, drawn as a red radial line. */
537
+ low?: number;
538
+ /** High limit, drawn as a red radial line. */
539
+ high?: number;
540
+ /** Decimal places in the accessible label. Default `0`. */
541
+ decimals?: number;
542
+ }
543
+ interface DualGaugeProps extends InstrumentProps {
544
+ /** Scale and needle on the left half. The needle pivots at the left edge of the dial. */
545
+ left?: DualGaugeScale;
546
+ /** Scale and needle on the right half. The needle pivots at the right edge of the dial. */
547
+ right?: DualGaugeScale;
548
+ /** Caption across the top of the dial, e.g. `"FUEL QTY"`. */
549
+ label?: string;
550
+ /** Second caption across the bottom of the dial, e.g. `"GALLONS"`. */
551
+ sublabel?: string;
552
+ }
553
+ /**
554
+ * Small dual-needle engine gauge in the style of the Cessna 172 / 182 panel: two independent scales,
555
+ * each with a needle pivoting at its own edge of the dial, so the two needles meet in the middle.
556
+ * Both scales read upwards. Used for fuel quantity, oil temperature / pressure, vacuum / ammeter and so on;
557
+ * see the preset gauges for ready-made scales.
558
+ */
559
+ declare function DualGauge({ left, right, label, sublabel, ...props }: DualGaugeProps): react.JSX.Element;
560
+ type ScaleOverride = Omit<DualGaugeScale, 'value'>;
561
+ interface PresetProps extends InstrumentProps {
562
+ /** Overrides for the left scale (range, bands, marks, unit...). */
563
+ leftScale?: ScaleOverride;
564
+ /** Overrides for the right scale. */
565
+ rightScale?: ScaleOverride;
566
+ }
567
+ declare const FUEL_QUANTITY_SCALE: ScaleOverride;
568
+ declare const OIL_TEMPERATURE_SCALE: ScaleOverride;
569
+ declare const OIL_PRESSURE_SCALE: ScaleOverride;
570
+ declare const VACUUM_SCALE: ScaleOverride;
571
+ declare const AMMETER_SCALE: ScaleOverride;
572
+ declare const EGT_SCALE: ScaleOverride;
573
+ declare const FUEL_FLOW_SCALE: ScaleOverride;
574
+ declare const MANIFOLD_SCALE: ScaleOverride;
575
+ interface FuelQuantityGaugeProps extends PresetProps {
576
+ /** Fuel in the left tank. */
577
+ leftQuantity?: number;
578
+ /** Fuel in the right tank. */
579
+ rightQuantity?: number;
580
+ }
581
+ /** Dual fuel quantity gauge: left tank on the left needle, right tank on the right. Default scale 0–44 gal with a yellow 0–5 band. */
582
+ declare function FuelQuantityGauge({ leftQuantity, rightQuantity, leftScale, rightScale, ...props }: FuelQuantityGaugeProps): react.JSX.Element;
583
+ interface OilGaugeProps extends PresetProps {
584
+ /** Oil temperature, left needle. Default scale 75–250 °F. */
585
+ temperature?: number;
586
+ /** Oil pressure, right needle. Default scale 0–115 PSI. */
587
+ pressure?: number;
588
+ }
589
+ /** Oil temperature (left) and oil pressure (right) dual gauge. */
590
+ declare function OilGauge({ temperature, pressure, leftScale, rightScale, ...props }: OilGaugeProps): react.JSX.Element;
591
+ interface VacuumAmmeterGaugeProps extends PresetProps {
592
+ /** Vacuum (suction) in inHg, left needle. Default scale 3–7 with a green 4.5–5.5 band. */
593
+ vacuum?: number;
594
+ /** Alternator current in amps, right needle. Centre-zero scale −60…+60. */
595
+ amps?: number;
596
+ }
597
+ /** Vacuum (suction) on the left and a centre-zero ammeter on the right. */
598
+ declare function VacuumAmmeterGauge({ vacuum, amps, leftScale, rightScale, ...props }: VacuumAmmeterGaugeProps): react.JSX.Element;
599
+ interface EgtFuelFlowGaugeProps extends PresetProps {
600
+ /** Exhaust gas temperature, left needle. Unnumbered 1250–1650 °F scale, as EGT is read relative to peak. */
601
+ egt?: number;
602
+ /** Fuel flow in gallons per hour, right needle. Default scale 0–20. */
603
+ fuelFlow?: number;
604
+ }
605
+ /** Exhaust gas temperature (left) and fuel flow (right) dual gauge. */
606
+ declare function EgtFuelFlowGauge({ egt, fuelFlow, leftScale, rightScale, ...props }: EgtFuelFlowGaugeProps): react.JSX.Element;
607
+ interface ManifoldFuelFlowGaugeProps extends PresetProps {
608
+ /** Manifold pressure in inHg, left needle. Default scale 10–35 with a green 15–23 band. */
609
+ manifold?: number;
610
+ /** Fuel flow in gallons per hour, right needle. Default scale 0–20. */
611
+ fuelFlow?: number;
612
+ }
613
+ /** The constant-speed propeller panel's combined manifold pressure (left) and fuel flow (right) gauge. */
614
+ declare function ManifoldFuelFlowGauge({ manifold, fuelFlow, leftScale, rightScale, ...props }: ManifoldFuelFlowGaugeProps): react.JSX.Element;
615
+
616
+ interface TachometerProps extends InstrumentProps {
617
+ /** Engine speed in RPM. Clamped to `0…max`. */
618
+ rpm?: number;
619
+ /** Top of the scale in RPM. Default `3500`. */
620
+ max?: number;
621
+ /** Normal operating band `[from, to]` in RPM, drawn green. Default `[2000, 2400]` (Cessna 182T). `null` hides it. */
622
+ green?: [number, number] | null;
623
+ /** Red line in RPM. Default `2400`. `null` hides it. */
624
+ redline?: number | null;
625
+ /** Engine hours shown on the hour meter in the dial. Leave it out to hide the meter. */
626
+ hours?: number;
627
+ }
628
+ /**
629
+ * Analog tachometer, marked in hundreds of RPM, with a green operating arc, a red line and an optional
630
+ * engine hour meter in the lower half of the dial.
631
+ */
632
+ declare function Tachometer({ rpm, max, green, redline, hours, ...props }: TachometerProps): react.JSX.Element;
633
+
634
+ interface MagneticCompassProps extends InstrumentProps {
635
+ /** Magnetic heading in degrees. */
636
+ heading?: number;
637
+ /** Compass correction card rows, printed under the window: `{ for, steer }` in degrees. Leave it out to hide the card. */
638
+ deviationCard?: Array<{
639
+ for: number;
640
+ steer: number;
641
+ }>;
642
+ }
643
+ /**
644
+ * Wet ("whiskey") magnetic compass: the card floats behind a window with a vertical lubber line.
645
+ * The pilot reads the back of the card, so the numbers grow to the left: on a heading of north,
646
+ * east (3, 6, E) is to the left of the lubber line and west to the right.
647
+ */
648
+ declare function MagneticCompass({ heading, deviationCard, ...props }: MagneticCompassProps): react.JSX.Element;
649
+
650
+ interface TrimIndicatorProps extends InstrumentProps {
651
+ /** Elevator trim from `-1` (full nose down) to `1` (full nose up). `0` is neutral. */
652
+ trim?: number;
653
+ /** Take-off range `[from, to]` on the same −1…1 scale, drawn as a white band. Default `[0.05, 0.35]`. `null` hides it. */
654
+ takeoff?: [number, number] | null;
655
+ }
656
+ /**
657
+ * Elevator trim wheel and position indicator, as on the pedestal: NOSE DOWN at the top, NOSE UP at the bottom,
658
+ * a pointer on the scale and a white TAKE OFF band. The wheel's ribs roll with the trim.
659
+ */
660
+ declare function TrimIndicator({ trim, takeoff, ...props }: TrimIndicatorProps): react.JSX.Element;
661
+
662
+ interface HobbsMeterProps extends InstrumentProps {
663
+ /** Hours run. The last drum shows tenths. Negative values are read as `0`. */
664
+ hours?: number;
665
+ /** Number of drums, tenths included. Default `6` (99999.9 hours). */
666
+ digits?: number;
667
+ /** Turns the running indicator. Default `false`. */
668
+ running?: boolean;
669
+ /** Caption above the counter. Default `"HOURS"`. */
670
+ label?: string;
671
+ }
672
+ /**
673
+ * Hobbs (hour) meter: a rolling-drum hour counter with tenths on a white drum, and a small
674
+ * indicator wheel that turns while the meter is running.
675
+ */
676
+ declare function HobbsMeter({ hours, digits, running, label, ...props }: HobbsMeterProps): react.JSX.Element;
677
+
678
+ /**
679
+ * Drum positions for a mechanical counter. Drum 0 (rightmost, tenths) turns smoothly; each higher drum
680
+ * stands still until every drum to its right reads 9, then rolls over with them (a Geneva drive).
681
+ * Position `p` means the drum shows digit `p`, partly rolled towards `p + 1`; `10` is the extra 0 at the bottom of the drum.
682
+ */
683
+ declare function drumPositions(value: number, digits: number): number[];
684
+
685
+ /** One annunciator legend. */
686
+ interface Annunciator {
687
+ /** Key used in `lights`. */
688
+ id: string;
689
+ /** Legend text, e.g. `"OIL PRESS"`. */
690
+ label: string;
691
+ /** `"warning"` lights red, `"caution"` amber, `"advisory"` green. Default `"caution"`. */
692
+ level?: 'warning' | 'caution' | 'advisory';
693
+ /** Draws `L` and `R` either side of the legend, lit separately (e.g. `L FUEL R`). */
694
+ split?: boolean;
695
+ }
696
+ /** State of one light: `true` lights it; for split legends `"left"`, `"right"` or `"both"` choose the side. */
697
+ type AnnunciatorState = boolean | 'left' | 'right' | 'both';
698
+ interface AnnunciatorPanelProps extends InstrumentProps {
699
+ /** Legends, laid out left to right in up to two rows. Defaults to the Cessna 182T set, see `DEFAULT_ANNUNCIATORS`. */
700
+ annunciators?: Annunciator[];
701
+ /** Which lights are on, by annunciator `id`. Missing ids are off. */
702
+ lights?: Record<string, AnnunciatorState | undefined>;
703
+ /** Lamp test: lights every legend. Default `false`. */
704
+ test?: boolean;
705
+ }
706
+ /** The Cessna 182T annunciator: L FUEL R, PITCH TRIM, OIL PRESS, L VAC R and VOLTS. */
707
+ declare const DEFAULT_ANNUNCIATORS: Annunciator[];
708
+ /**
709
+ * Annunciator strip: legends that are dark until lit in red (warning), amber (caution) or green (advisory).
710
+ * Split legends such as `L FUEL R` light the side that has the fault.
711
+ */
712
+ declare function AnnunciatorPanel({ annunciators, lights, test, ...props }: AnnunciatorPanelProps): react.JSX.Element;
713
+
714
+ export { AMMETER_SCALE, AdfIndicator, type AdfIndicatorProps, Airspeed, type AirspeedArcs, type AirspeedProps, Altimeter, type AltimeterProps, type Annunciator, AnnunciatorPanel, type AnnunciatorPanelProps, type AnnunciatorState, AoaIndicator, type AoaIndicatorProps, AttitudeIndicator, type AttitudeIndicatorProps, type ClockAlarm, type ClockMode, DEFAULT_ANNUNCIATORS, DEFAULT_BAR_GAUGES, DEFAULT_MANIFOLD, DEFAULT_RPM, type DataField, DataPanel, type DataPanelProps, DigitalClock, type DigitalClockProps, DualGauge, type DualGaugeProps, type DualGaugeScale, EGT_SCALE, EgtFuelFlowGauge, type EgtFuelFlowGaugeProps, type EngineBarGauge, type EngineGauge, EngineIndicator, type EngineIndicatorProps, FUEL_FLOW_SCALE, FUEL_QUANTITY_SCALE, FlapIndicator, type FlapIndicatorProps, type FlapSpeedLimit, FuelIndicator, type FuelIndicatorProps, FuelQuantityGauge, type FuelQuantityGaugeProps, type FuelTank, HOLD_TIME, HeadingIndicator, type HeadingIndicatorProps, HobbsMeter, type HobbsMeterProps, HsiIndicator, type HsiIndicatorProps, IlsIndicator, type IlsIndicatorProps, type IlsNeedles, type InstrumentProps, MANIFOLD_SCALE, MAX_BAR_GAUGES, MAX_CYLINDERS, MAX_FIELDS, MAX_TANKS, MagneticCompass, type MagneticCompassProps, ManifoldFuelFlowGauge, type ManifoldFuelFlowGaugeProps, OIL_PRESSURE_SCALE, OIL_TEMPERATURE_SCALE, OilGauge, type OilGaugeProps, type PressureUnit, type RadioFrequency, RadioPanel, type RadioPanelProps, RadioStack, type RadioStackProps, type RunwaySide, Tachometer, type TachometerProps, type ToFrom, TrimIndicator, type TrimIndicatorProps, TurnCoordinator, type TurnCoordinatorProps, type UpperDisplay, VACUUM_SCALE, VacuumAmmeterGauge, type VacuumAmmeterGaugeProps, VerticalSpeed, type VerticalSpeedProps, VorIndicator, type VorIndicatorProps, type VorNeedle, WindIndicator, type WindIndicatorProps, drumPositions, formatAdf, formatDme, formatNav, formatTimer, formatValue, parseAdf, parseNav, relativeBearing, vorDeviation };