flight-indicators 1.2.1 → 1.2.3
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/README.md +56 -1
- package/dist/index.cjs +643 -266
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -1
- package/dist/index.d.ts +76 -1
- package/dist/index.js +642 -267
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,8 @@ interface InstrumentProps {
|
|
|
7
7
|
size?: number | string;
|
|
8
8
|
/** Draw the square mounting plate with screws behind the dial. Default `true`. */
|
|
9
9
|
showBox?: boolean;
|
|
10
|
+
/** Draw the instrument's setting knobs (OBS, baro, heading set...) on instruments that have them. Default `true`. */
|
|
11
|
+
showKnobs?: boolean;
|
|
10
12
|
/** Needle/card animation duration in ms. `0` disables animation. Default `300`. */
|
|
11
13
|
animationDuration?: number;
|
|
12
14
|
className?: string;
|
|
@@ -131,6 +133,79 @@ declare function vorDeviation(course: number, radial: number): {
|
|
|
131
133
|
};
|
|
132
134
|
declare function VorIndicator({ course, radial, deviation, toFrom, signal, needle, ...props }: VorIndicatorProps): react.JSX.Element;
|
|
133
135
|
|
|
136
|
+
/**
|
|
137
|
+
* How the crossed needles move.
|
|
138
|
+
* `"slide"`: both needles move parallel to themselves over hatched scales.
|
|
139
|
+
* `"swing"`: the course needle is hinged near the bottom and the glideslope needle near the left, so they pivot.
|
|
140
|
+
*/
|
|
141
|
+
type IlsNeedles = 'slide' | 'swing';
|
|
142
|
+
interface IlsIndicatorProps extends InstrumentProps {
|
|
143
|
+
/** Selected course (OBS) in degrees. The compass card turns so this course sits under the top index. */
|
|
144
|
+
course?: number;
|
|
145
|
+
/** Radial the aircraft is on, measured from the station, in degrees. Drives the course needle and TO/FROM. */
|
|
146
|
+
radial?: number;
|
|
147
|
+
/** Course (VOR/LOC) deviation in degrees, positive when the course lies to the right. Overrides `radial`. */
|
|
148
|
+
deviation?: number;
|
|
149
|
+
/** Deviation in degrees at full-scale deflection of the course needle (5 dots). Default `10` (VOR); use `2.5` for a localizer. */
|
|
150
|
+
fullScale?: number;
|
|
151
|
+
/** TO/FROM indication. Overrides the value computed from `radial`. */
|
|
152
|
+
toFrom?: ToFrom;
|
|
153
|
+
/** `false` drops the orange NAV flag (bottom window), centres the course needle and hides TO/FROM. Default `true`. */
|
|
154
|
+
signal?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Glideslope deviation in degrees, positive when the glidepath is above the aircraft (fly up).
|
|
157
|
+
* Leave it out when no glideslope is received: the GS flag (right window) drops and the needle is parked.
|
|
158
|
+
*/
|
|
159
|
+
glideslope?: number;
|
|
160
|
+
/** Glideslope deviation in degrees at full-scale deflection (5 dots). Default `0.7`. */
|
|
161
|
+
glideslopeFullScale?: number;
|
|
162
|
+
/** Overrides whether the glideslope is received. Defaults to `true` when `glideslope` is a finite number. */
|
|
163
|
+
glideslopeSignal?: boolean;
|
|
164
|
+
/** `"slide"` (default) or `"swing"`; see {@link IlsNeedles}. */
|
|
165
|
+
needles?: IlsNeedles;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Crossed-needle VOR/LOC and glideslope indicator with an OBS card, as fitted to many light aircraft.
|
|
169
|
+
* The vertical needle shows course deviation, the horizontal needle glideslope deviation,
|
|
170
|
+
* and orange flags drop into windows at the bottom (NAV) and right (GS) when a signal is lost.
|
|
171
|
+
*/
|
|
172
|
+
declare function IlsIndicator({ course, radial, deviation, fullScale, toFrom, signal, glideslope, glideslopeFullScale, glideslopeSignal, needles, ...props }: IlsIndicatorProps): react.JSX.Element;
|
|
173
|
+
|
|
174
|
+
interface HsiIndicatorProps extends InstrumentProps {
|
|
175
|
+
/** Aircraft heading in degrees. The compass card turns so it sits under the lubber line at the top. */
|
|
176
|
+
heading?: number;
|
|
177
|
+
/** Heading bug in degrees, set with the HDG knob. Leave it out to hide the bug. */
|
|
178
|
+
headingBug?: number;
|
|
179
|
+
/** Selected course in degrees, set with the CRS knob. The course pointer turns with the card to point at it. */
|
|
180
|
+
course?: number;
|
|
181
|
+
/** Radial the aircraft is on, measured from the station, in degrees. Drives the deviation bar and TO/FROM. */
|
|
182
|
+
radial?: number;
|
|
183
|
+
/** Course deviation in degrees, positive when the course lies to the right. Overrides `radial`. */
|
|
184
|
+
deviation?: number;
|
|
185
|
+
/** Deviation in degrees at full-scale deflection of the bar (2 dots). Default `10` (VOR); use `2.5` for a localizer. */
|
|
186
|
+
fullScale?: number;
|
|
187
|
+
/** TO/FROM indication. Overrides the value computed from `radial`. */
|
|
188
|
+
toFrom?: ToFrom;
|
|
189
|
+
/** `false` shows the red NAV flag, centres the deviation bar and hides TO/FROM. Default `true`. */
|
|
190
|
+
signal?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Glideslope deviation in degrees, positive when the glidepath is above the aircraft (fly up).
|
|
193
|
+
* Leave it out when no glideslope is received: the GS flag covers the scale and the pointers are hidden.
|
|
194
|
+
*/
|
|
195
|
+
glideslope?: number;
|
|
196
|
+
/** Glideslope deviation in degrees at full-scale deflection (2 dots). Default `0.7`. */
|
|
197
|
+
glideslopeFullScale?: number;
|
|
198
|
+
/** Overrides whether the glideslope is received. Defaults to `true` when `glideslope` is a finite number. */
|
|
199
|
+
glideslopeSignal?: boolean;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Horizontal situation indicator: a heading indicator and a VOR / ILS head in one.
|
|
203
|
+
* The compass card turns with the heading under a fixed aircraft symbol. The course pointer and its
|
|
204
|
+
* deviation bar turn with the selected course, so the bar shows where the course line lies relative to the aircraft.
|
|
205
|
+
* A heading bug, TO/FROM triangle, glideslope pointers and red NAV / GS flags complete the picture.
|
|
206
|
+
*/
|
|
207
|
+
declare function HsiIndicator({ heading, headingBug, course, radial, deviation, fullScale, toFrom, signal, glideslope, glideslopeFullScale, glideslopeSignal, ...props }: HsiIndicatorProps): react.JSX.Element;
|
|
208
|
+
|
|
134
209
|
interface AdfIndicatorProps extends InstrumentProps {
|
|
135
210
|
/**
|
|
136
211
|
* Relative bearing to the station in degrees, measured clockwise from the aircraft's nose.
|
|
@@ -372,4 +447,4 @@ interface AoaIndicatorProps extends InstrumentProps {
|
|
|
372
447
|
}
|
|
373
448
|
declare function AoaIndicator({ aoa, min, optimum, max, showValue, label, ...props }: AoaIndicatorProps): react.JSX.Element;
|
|
374
449
|
|
|
375
|
-
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, type VorNeedle, WindIndicator, type WindIndicatorProps, formatAdf, formatDme, formatNav, formatValue, parseAdf, parseNav, relativeBearing, vorDeviation };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ interface InstrumentProps {
|
|
|
7
7
|
size?: number | string;
|
|
8
8
|
/** Draw the square mounting plate with screws behind the dial. Default `true`. */
|
|
9
9
|
showBox?: boolean;
|
|
10
|
+
/** Draw the instrument's setting knobs (OBS, baro, heading set...) on instruments that have them. Default `true`. */
|
|
11
|
+
showKnobs?: boolean;
|
|
10
12
|
/** Needle/card animation duration in ms. `0` disables animation. Default `300`. */
|
|
11
13
|
animationDuration?: number;
|
|
12
14
|
className?: string;
|
|
@@ -131,6 +133,79 @@ declare function vorDeviation(course: number, radial: number): {
|
|
|
131
133
|
};
|
|
132
134
|
declare function VorIndicator({ course, radial, deviation, toFrom, signal, needle, ...props }: VorIndicatorProps): react.JSX.Element;
|
|
133
135
|
|
|
136
|
+
/**
|
|
137
|
+
* How the crossed needles move.
|
|
138
|
+
* `"slide"`: both needles move parallel to themselves over hatched scales.
|
|
139
|
+
* `"swing"`: the course needle is hinged near the bottom and the glideslope needle near the left, so they pivot.
|
|
140
|
+
*/
|
|
141
|
+
type IlsNeedles = 'slide' | 'swing';
|
|
142
|
+
interface IlsIndicatorProps extends InstrumentProps {
|
|
143
|
+
/** Selected course (OBS) in degrees. The compass card turns so this course sits under the top index. */
|
|
144
|
+
course?: number;
|
|
145
|
+
/** Radial the aircraft is on, measured from the station, in degrees. Drives the course needle and TO/FROM. */
|
|
146
|
+
radial?: number;
|
|
147
|
+
/** Course (VOR/LOC) deviation in degrees, positive when the course lies to the right. Overrides `radial`. */
|
|
148
|
+
deviation?: number;
|
|
149
|
+
/** Deviation in degrees at full-scale deflection of the course needle (5 dots). Default `10` (VOR); use `2.5` for a localizer. */
|
|
150
|
+
fullScale?: number;
|
|
151
|
+
/** TO/FROM indication. Overrides the value computed from `radial`. */
|
|
152
|
+
toFrom?: ToFrom;
|
|
153
|
+
/** `false` drops the orange NAV flag (bottom window), centres the course needle and hides TO/FROM. Default `true`. */
|
|
154
|
+
signal?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Glideslope deviation in degrees, positive when the glidepath is above the aircraft (fly up).
|
|
157
|
+
* Leave it out when no glideslope is received: the GS flag (right window) drops and the needle is parked.
|
|
158
|
+
*/
|
|
159
|
+
glideslope?: number;
|
|
160
|
+
/** Glideslope deviation in degrees at full-scale deflection (5 dots). Default `0.7`. */
|
|
161
|
+
glideslopeFullScale?: number;
|
|
162
|
+
/** Overrides whether the glideslope is received. Defaults to `true` when `glideslope` is a finite number. */
|
|
163
|
+
glideslopeSignal?: boolean;
|
|
164
|
+
/** `"slide"` (default) or `"swing"`; see {@link IlsNeedles}. */
|
|
165
|
+
needles?: IlsNeedles;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Crossed-needle VOR/LOC and glideslope indicator with an OBS card, as fitted to many light aircraft.
|
|
169
|
+
* The vertical needle shows course deviation, the horizontal needle glideslope deviation,
|
|
170
|
+
* and orange flags drop into windows at the bottom (NAV) and right (GS) when a signal is lost.
|
|
171
|
+
*/
|
|
172
|
+
declare function IlsIndicator({ course, radial, deviation, fullScale, toFrom, signal, glideslope, glideslopeFullScale, glideslopeSignal, needles, ...props }: IlsIndicatorProps): react.JSX.Element;
|
|
173
|
+
|
|
174
|
+
interface HsiIndicatorProps extends InstrumentProps {
|
|
175
|
+
/** Aircraft heading in degrees. The compass card turns so it sits under the lubber line at the top. */
|
|
176
|
+
heading?: number;
|
|
177
|
+
/** Heading bug in degrees, set with the HDG knob. Leave it out to hide the bug. */
|
|
178
|
+
headingBug?: number;
|
|
179
|
+
/** Selected course in degrees, set with the CRS knob. The course pointer turns with the card to point at it. */
|
|
180
|
+
course?: number;
|
|
181
|
+
/** Radial the aircraft is on, measured from the station, in degrees. Drives the deviation bar and TO/FROM. */
|
|
182
|
+
radial?: number;
|
|
183
|
+
/** Course deviation in degrees, positive when the course lies to the right. Overrides `radial`. */
|
|
184
|
+
deviation?: number;
|
|
185
|
+
/** Deviation in degrees at full-scale deflection of the bar (2 dots). Default `10` (VOR); use `2.5` for a localizer. */
|
|
186
|
+
fullScale?: number;
|
|
187
|
+
/** TO/FROM indication. Overrides the value computed from `radial`. */
|
|
188
|
+
toFrom?: ToFrom;
|
|
189
|
+
/** `false` shows the red NAV flag, centres the deviation bar and hides TO/FROM. Default `true`. */
|
|
190
|
+
signal?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Glideslope deviation in degrees, positive when the glidepath is above the aircraft (fly up).
|
|
193
|
+
* Leave it out when no glideslope is received: the GS flag covers the scale and the pointers are hidden.
|
|
194
|
+
*/
|
|
195
|
+
glideslope?: number;
|
|
196
|
+
/** Glideslope deviation in degrees at full-scale deflection (2 dots). Default `0.7`. */
|
|
197
|
+
glideslopeFullScale?: number;
|
|
198
|
+
/** Overrides whether the glideslope is received. Defaults to `true` when `glideslope` is a finite number. */
|
|
199
|
+
glideslopeSignal?: boolean;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Horizontal situation indicator: a heading indicator and a VOR / ILS head in one.
|
|
203
|
+
* The compass card turns with the heading under a fixed aircraft symbol. The course pointer and its
|
|
204
|
+
* deviation bar turn with the selected course, so the bar shows where the course line lies relative to the aircraft.
|
|
205
|
+
* A heading bug, TO/FROM triangle, glideslope pointers and red NAV / GS flags complete the picture.
|
|
206
|
+
*/
|
|
207
|
+
declare function HsiIndicator({ heading, headingBug, course, radial, deviation, fullScale, toFrom, signal, glideslope, glideslopeFullScale, glideslopeSignal, ...props }: HsiIndicatorProps): react.JSX.Element;
|
|
208
|
+
|
|
134
209
|
interface AdfIndicatorProps extends InstrumentProps {
|
|
135
210
|
/**
|
|
136
211
|
* Relative bearing to the station in degrees, measured clockwise from the aircraft's nose.
|
|
@@ -372,4 +447,4 @@ interface AoaIndicatorProps extends InstrumentProps {
|
|
|
372
447
|
}
|
|
373
448
|
declare function AoaIndicator({ aoa, min, optimum, max, showValue, label, ...props }: AoaIndicatorProps): react.JSX.Element;
|
|
374
449
|
|
|
375
|
-
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, type VorNeedle, WindIndicator, type WindIndicatorProps, formatAdf, formatDme, formatNav, formatValue, parseAdf, parseNav, relativeBearing, vorDeviation };
|
|
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 };
|