npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery-flight-indicators

v1.0.0

Published

jQuery-Flight-Indicators

Downloads

35

Readme

Flight Indicators jQuery plugin GitHub version

The Flight Indicators Plugin allows you to display high quality flight indicators using html, css3, jQuery and SVG images. The methods make customization and real time implementation really easy. Further, since all the images are vector svg you can resize the indicators to your application without any quality loss !

Currently supported indicators are :

  • Attitude (artificial horizon)
  • Heading
  • Vertical speed
  • Air speed
  • Altimeter

Example & Demo

Demo can be found here : http://sebmatton.github.io/flightindicators/

Here are a few examples of currently implemented indicators :

demo_example

The image below shows a part of an 800px indicator. Vector images allows you to keep high quality render with large indicators.

demo_highres

Usage

Initialization

To use this plugin you need to import the css file in the head of your html file :

<link rel="stylesheet" type="text/css" href="css/flightindicators.css" />

Before the </body> tag, include jQuery and this plugin :

<script src="js/jquery.js"></script>
<script src="js/jquery.flightindicator.js"></script>

Using the plugin

Create a <span> section to put an indicator in :

<span id="attitude"></span>

Then, when the span is ready in the DOM (maybe you need to wait for document ready), you can run the indicator function :

var indicator = $.flightIndicator('#attitude', type, options);

Where the first argument is the selector, the type value specify the indicator type and the options overwrite the default settings.

To display the most simple indicator, as for example the attitude indicator, we use :

var indicator = $.flightIndicator('#attitude', 'attitude');

The type may be attitude, heading, variometer, airspeed or altimeter. If the type is not correct, the default type will be attitude.

Initial settings can be modified using the options parameter. Here are the valid options and the default settings :

var options = {
	size : 200,				// Sets the size in pixels of the indicator (square)
	roll : 0,				// Roll angle in degrees for an attitude indicator
	pitch : 0,				// Pitch angle in degrees for an attitude indicator
	heading: 0,				// Heading angle in degrees for an heading indicator
	vario: 0,				// Variometer in 1000 feets/min for the variometer indicator
	airspeed: 0,			// Air speed in knots for an air speed indicator
	altitude: 0,			// Altitude in feets for an altimeter indicator
	pressure: 1000,			// Pressure in hPa for an altimeter indicator
	showBox : true,			// Sets if the outer squared box is visible or not (true or false)
	img_directory : 'img/'	// The directory where the images are saved to
}

The options parameters are optionnals.

Updating the indicator informations

Some methods are used to update the indicators, giving the opportunity to create realtime GUI !

The way to use it is really simple.

var attitude = $.flightIndicator('#attitude', 'attitude');
attitude.setRoll(30); // Sets the roll to 30 degrees

Here are the valid methods :

indicator.setRoll(roll);			// Sets the roll of an attitude indicator
indicator.setPitch(pitch);			// Sets the pitch of an attitude indicator
indicator.setHeading(heading);		// Sets the heading of an heading indicator
indicator.setVario(vario);			// Sets the climb speed of an variometer indicator
indicator.setAirSpeed(speed);		// Sets the speed of an airspeed indicator
indicator.setAltitude(altitude);	// Sets the altitude of an altimeter indicator
indicator.setPressure(pressure);	// Sets the pressure of an altimeter indicator
indicator.resize(size);				// Sets the size of any indicators
indicator.showBox();				// Make the outer squared box of any instrument visible
indicator.hideBox();				// Make the outer squared box of any instrument invisible

Author and License

Author : Sébastien Matton ([email protected])

jQuery Flight Indicators plugin was developped as part of my Master's Thesis since I needed a realtime interface showing the flight datas about for a quadcopter.

The project is published under GPLv3 License. See LICENSE file for more informations

Feel free to take part in this project or/and contact me for any reason :-)

Thanks

Thanks to igneosaur for work on which this project was initialy based (Project on Bitbucket)