flight-indicators 1.2.0 → 1.2.2

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
@@ -98,6 +98,8 @@ interface WindIndicatorProps extends InstrumentProps {
98
98
  declare function WindIndicator({ runway, runwaySide, windDirection, windSpeed, windGust, crosswindLimit, ...props }: WindIndicatorProps): react.JSX.Element;
99
99
 
100
100
  type ToFrom = 'TO' | 'FROM' | 'OFF';
101
+ /** How the course deviation needle moves: sliding sideways, or swinging from a hinge under the top index. */
102
+ type VorNeedle = 'slide' | 'swing';
101
103
  interface VorIndicatorProps extends InstrumentProps {
102
104
  /** Selected course (OBS) in degrees. The compass card turns so this course sits under the top index. */
103
105
  course?: number;
@@ -115,13 +117,57 @@ interface VorIndicatorProps extends InstrumentProps {
115
117
  toFrom?: ToFrom;
116
118
  /** `false` shows the red NAV flag, centres the needle and hides TO/FROM. Default `true`. */
117
119
  signal?: boolean;
120
+ /**
121
+ * `"slide"` (default) moves a vertical bar sideways across a straight row of dots.
122
+ * `"swing"` hinges the needle just below the top index so it swings like a pendulum over a curved row of dots,
123
+ * as on older VOR heads.
124
+ */
125
+ needle?: VorNeedle;
118
126
  }
119
127
  /** Needle deflection (°, positive = course to the right) and flag for an aircraft on `radial` with `course` selected. */
120
128
  declare function vorDeviation(course: number, radial: number): {
121
129
  deviation: number;
122
130
  toFrom: ToFrom;
123
131
  };
124
- declare function VorIndicator({ course, radial, deviation, toFrom, signal, ...props }: VorIndicatorProps): react.JSX.Element;
132
+ declare function VorIndicator({ course, radial, deviation, toFrom, signal, needle, ...props }: VorIndicatorProps): react.JSX.Element;
133
+
134
+ /**
135
+ * How the crossed needles move.
136
+ * `"slide"`: both needles move parallel to themselves over hatched scales.
137
+ * `"swing"`: the course needle is hinged near the bottom and the glideslope needle near the left, so they pivot.
138
+ */
139
+ type IlsNeedles = 'slide' | 'swing';
140
+ interface IlsIndicatorProps extends InstrumentProps {
141
+ /** Selected course (OBS) in degrees. The compass card turns so this course sits under the top index. */
142
+ course?: number;
143
+ /** Radial the aircraft is on, measured from the station, in degrees. Drives the course needle and TO/FROM. */
144
+ radial?: number;
145
+ /** Course (VOR/LOC) deviation in degrees, positive when the course lies to the right. Overrides `radial`. */
146
+ deviation?: number;
147
+ /** Deviation in degrees at full-scale deflection of the course needle (5 dots). Default `10` (VOR); use `2.5` for a localizer. */
148
+ fullScale?: number;
149
+ /** TO/FROM indication. Overrides the value computed from `radial`. */
150
+ toFrom?: ToFrom;
151
+ /** `false` drops the orange NAV flag (bottom window), centres the course needle and hides TO/FROM. Default `true`. */
152
+ signal?: boolean;
153
+ /**
154
+ * Glideslope deviation in degrees, positive when the glidepath is above the aircraft (fly up).
155
+ * Leave it out when no glideslope is received: the GS flag (right window) drops and the needle is parked.
156
+ */
157
+ glideslope?: number;
158
+ /** Glideslope deviation in degrees at full-scale deflection (5 dots). Default `0.7`. */
159
+ glideslopeFullScale?: number;
160
+ /** Overrides whether the glideslope is received. Defaults to `true` when `glideslope` is a finite number. */
161
+ glideslopeSignal?: boolean;
162
+ /** `"slide"` (default) or `"swing"`; see {@link IlsNeedles}. */
163
+ needles?: IlsNeedles;
164
+ }
165
+ /**
166
+ * Crossed-needle VOR/LOC and glideslope indicator with an OBS card, as fitted to many light aircraft.
167
+ * The vertical needle shows course deviation, the horizontal needle glideslope deviation,
168
+ * and orange flags drop into windows at the bottom (NAV) and right (GS) when a signal is lost.
169
+ */
170
+ declare function IlsIndicator({ course, radial, deviation, fullScale, toFrom, signal, glideslope, glideslopeFullScale, glideslopeSignal, needles, ...props }: IlsIndicatorProps): react.JSX.Element;
125
171
 
126
172
  interface AdfIndicatorProps extends InstrumentProps {
127
173
  /**
@@ -364,4 +410,4 @@ interface AoaIndicatorProps extends InstrumentProps {
364
410
  }
365
411
  declare function AoaIndicator({ aoa, min, optimum, max, showValue, label, ...props }: AoaIndicatorProps): react.JSX.Element;
366
412
 
367
- 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, 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, WindIndicator, type WindIndicatorProps, formatAdf, formatDme, formatNav, formatValue, parseAdf, parseNav, relativeBearing, vorDeviation };
413
+ 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, 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 };
package/dist/index.d.ts CHANGED
@@ -98,6 +98,8 @@ interface WindIndicatorProps extends InstrumentProps {
98
98
  declare function WindIndicator({ runway, runwaySide, windDirection, windSpeed, windGust, crosswindLimit, ...props }: WindIndicatorProps): react.JSX.Element;
99
99
 
100
100
  type ToFrom = 'TO' | 'FROM' | 'OFF';
101
+ /** How the course deviation needle moves: sliding sideways, or swinging from a hinge under the top index. */
102
+ type VorNeedle = 'slide' | 'swing';
101
103
  interface VorIndicatorProps extends InstrumentProps {
102
104
  /** Selected course (OBS) in degrees. The compass card turns so this course sits under the top index. */
103
105
  course?: number;
@@ -115,13 +117,57 @@ interface VorIndicatorProps extends InstrumentProps {
115
117
  toFrom?: ToFrom;
116
118
  /** `false` shows the red NAV flag, centres the needle and hides TO/FROM. Default `true`. */
117
119
  signal?: boolean;
120
+ /**
121
+ * `"slide"` (default) moves a vertical bar sideways across a straight row of dots.
122
+ * `"swing"` hinges the needle just below the top index so it swings like a pendulum over a curved row of dots,
123
+ * as on older VOR heads.
124
+ */
125
+ needle?: VorNeedle;
118
126
  }
119
127
  /** Needle deflection (°, positive = course to the right) and flag for an aircraft on `radial` with `course` selected. */
120
128
  declare function vorDeviation(course: number, radial: number): {
121
129
  deviation: number;
122
130
  toFrom: ToFrom;
123
131
  };
124
- declare function VorIndicator({ course, radial, deviation, toFrom, signal, ...props }: VorIndicatorProps): react.JSX.Element;
132
+ declare function VorIndicator({ course, radial, deviation, toFrom, signal, needle, ...props }: VorIndicatorProps): react.JSX.Element;
133
+
134
+ /**
135
+ * How the crossed needles move.
136
+ * `"slide"`: both needles move parallel to themselves over hatched scales.
137
+ * `"swing"`: the course needle is hinged near the bottom and the glideslope needle near the left, so they pivot.
138
+ */
139
+ type IlsNeedles = 'slide' | 'swing';
140
+ interface IlsIndicatorProps extends InstrumentProps {
141
+ /** Selected course (OBS) in degrees. The compass card turns so this course sits under the top index. */
142
+ course?: number;
143
+ /** Radial the aircraft is on, measured from the station, in degrees. Drives the course needle and TO/FROM. */
144
+ radial?: number;
145
+ /** Course (VOR/LOC) deviation in degrees, positive when the course lies to the right. Overrides `radial`. */
146
+ deviation?: number;
147
+ /** Deviation in degrees at full-scale deflection of the course needle (5 dots). Default `10` (VOR); use `2.5` for a localizer. */
148
+ fullScale?: number;
149
+ /** TO/FROM indication. Overrides the value computed from `radial`. */
150
+ toFrom?: ToFrom;
151
+ /** `false` drops the orange NAV flag (bottom window), centres the course needle and hides TO/FROM. Default `true`. */
152
+ signal?: boolean;
153
+ /**
154
+ * Glideslope deviation in degrees, positive when the glidepath is above the aircraft (fly up).
155
+ * Leave it out when no glideslope is received: the GS flag (right window) drops and the needle is parked.
156
+ */
157
+ glideslope?: number;
158
+ /** Glideslope deviation in degrees at full-scale deflection (5 dots). Default `0.7`. */
159
+ glideslopeFullScale?: number;
160
+ /** Overrides whether the glideslope is received. Defaults to `true` when `glideslope` is a finite number. */
161
+ glideslopeSignal?: boolean;
162
+ /** `"slide"` (default) or `"swing"`; see {@link IlsNeedles}. */
163
+ needles?: IlsNeedles;
164
+ }
165
+ /**
166
+ * Crossed-needle VOR/LOC and glideslope indicator with an OBS card, as fitted to many light aircraft.
167
+ * The vertical needle shows course deviation, the horizontal needle glideslope deviation,
168
+ * and orange flags drop into windows at the bottom (NAV) and right (GS) when a signal is lost.
169
+ */
170
+ declare function IlsIndicator({ course, radial, deviation, fullScale, toFrom, signal, glideslope, glideslopeFullScale, glideslopeSignal, needles, ...props }: IlsIndicatorProps): react.JSX.Element;
125
171
 
126
172
  interface AdfIndicatorProps extends InstrumentProps {
127
173
  /**
@@ -364,4 +410,4 @@ interface AoaIndicatorProps extends InstrumentProps {
364
410
  }
365
411
  declare function AoaIndicator({ aoa, min, optimum, max, showValue, label, ...props }: AoaIndicatorProps): react.JSX.Element;
366
412
 
367
- 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, 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, WindIndicator, type WindIndicatorProps, formatAdf, formatDme, formatNav, formatValue, parseAdf, parseNav, relativeBearing, vorDeviation };
413
+ 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, 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 };