3 releases

new 0.1.2 Dec 17, 2024
0.1.1 Dec 17, 2024
0.1.0 Dec 17, 2024

#7 in #flight

30 downloads per month

GPL-3.0 AND CC-BY-SA-3…

120KB
384 lines

yew_flight_indicators

Documentation crates.io Build Test Page

Like jQuery Flight Indicators and react-flight-indicators but for Yew.

example

Usage

use yew_flight_indicators::component::*;

yew::html!{
    <div style="display: grid; grid-template-columns: repeat(3,1fr); width: min-content;">
        <AirspeedIndicator
            airspeed={80.0} // Knots.
            max_airspeed={160.0} // Knots; default can be omitted.
        />
        <Altimeter
            altitude={50.0} // Feet.
            pressure={1013.25} // mmHg; default can be omitted.
        />
        <AttitudeIndicator
            pitch={50.0} // Degrees.
            roll={30.0} // Degrees.
        />
        <TurnCoordinator
            turn={30.0} // Degrees.
        />
        <HeadingIndicator
            heading={200.0} // Degrees.
        />
        <Variometer
            vertical_speed={500.0} // Feet per minute.
        />
    </div>
}

Changes

  • Configurable max air speed, instead of it being fixed to 160 knots.
  • SVG's are optimized in advance (see Makefile).
  • Remove extraneous filter:url(#filter7320) from fi_tc_airplane.svg.
  • Showing a box around an indicator is not supported.

Authors

Danny Edwards created the original attitude-indicator in HTML.

Sébastien Matton added SVG's and adapted it into a jQuery plugin, as part of his master's for showing realtime flight information from a quadcopter.

Corstian Boerman adapted the project by Sébastien into a React library.

Finn Bear has adapted the project by Corstian into a Yew library.

License

The SVG's, with the following exception(s), are due to Sébastien Matton and are redistributed under the GPLv3 license. See the LICENSE file for more information.

The turn coordinator SVG's are due to Mysid, and are redistributed under the CC BY-SA 3.0 license.

To the extent that the remainder of the code is a new expression, it is licensed under either of Apache License, Version 2.0 or MIT license at your option.

Dependencies

~11–20MB
~268K SLoC