5 releases

0.2.1 Dec 31, 2024
0.2.0 Dec 31, 2024
0.1.2 Dec 17, 2024
0.1.1 Dec 17, 2024
0.1.0 Dec 17, 2024

#756 in Science

Download history 137/week @ 2024-12-11 213/week @ 2024-12-18 91/week @ 2024-12-25 128/week @ 2025-01-01 10/week @ 2025-01-08

579 downloads per month

MIT/Apache

295KB
507 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); gap: 0.5rem; width: min-content;"
    >
        <AirspeedIndicator
            airspeed={80.0} // Knots.
            stall_airspeed={70.0} // Knots; optional.
            caution_airspeed={130.0} // Knots; optional.
            never_exceed_airspeed={150.0} // Knots; optional.
            max_airspeed={160.0} // Knots; optional.
        />
        <Altimeter
            altitude={50.0} // Feet.
            pressure={29.92} // inHg; optional.
        />
        <AttitudeIndicator
            pitch={50.0} // Degrees.
            roll={30.0} // Degrees.
        />
        <TurnCoordinator
            turn={30.0} // Degrees.
            slip={20.0} // Degrees; optional.
        />
        <HeadingIndicator
            heading={200.0} // Degrees.
            autopilot_heading={160.0} // Degrees; optional.
        />
        <Variometer
            vertical_speed={500.0} // Feet per minute.
        />
    </div>
}

Acknowledgement

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. As of version 0.2, the SVG's and code were re-drawn, re-written, and distributed under a new license.

License

Code and SVG's licensed under either of:

at your option.

Additionally, SVG's can be licensed under the CC BY 4.0 License (CC BY 4.0 or https://creativecommons.org/licenses/by/4.0/legalcode.en) at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual or triple licensed as above, without any additional terms or conditions.

Dependencies

~11–20MB
~270K SLoC