fly-js v0.0.5
A JavaScript utility library focusing on aviation.
Tests
Test can be run eith by:
npm test
; or
mocha test
Continuous Integration
Via Github's Travis. Runs tests (mocha) and linter (jshint)
API Reference
Navigation functions
fly;
Returns the distance between the two pairs of decimal latitude and longitude values in nautical miles to two decimal places (last parameter).
fly;
Returns the initial course between the two pairs of decimal latitude and longitude values in degrees to two decimal places (last parameter).
fly;
Returns a new position given true course and distance from a given point
fly;
Returns the position the two great circles intersect; using the pair of latitude, longitude and course values as radials
Convertors
Nautical miles
fly;
Returns 10000 nautical miles converted to Kilometres rounded to five decimal places.
fly;
Returns 10000 nautical miles converted to Miles rounded to five decimal places.
fly;
Returns 10000 nautical miles converted to Feet rounded to five decimal places.
fly;
Returns 10000 nautical miles converted to Meters rounded to five decimal places.
fly;
Returns 10000 nautical miles converted to Inches rounded to five decimal places.
fly;
Returns 10000 nautical miles converted to Centimeters rounded to five decimal places.
Miles
fly;
Returns 10000 miles converted to Kilometres rounded to five decimal places.
fly;
Returns 10000 miles converted to Miles rounded to five decimal places.
fly;
Returns 10000 miles converted to Feet rounded to five decimal places.
fly;
Returns 10000 miles converted to Meters rounded to five decimal places.
fly;
Returns 10000 miles converted to Inches rounded to five decimal places.
fly;
Returns 10000 miles converted to Centimeters rounded to five decimal places.
Kilometres
fly;
Returns 10000 kilometres converted to Miles rounded to five decimal places.
fly;
Returns 10000 kilometres converted to Nautical Miles rounded to five decimal places.
fly;
Returns 10000 kilometres converted to Feet rounded to five decimal places.
fly;
Returns 10000 kilometres converted to Meters rounded to five decimal places.
fly;
Returns 10000 kilometres converted to Inches rounded to five decimal places.
fly;
Returns 10000 kilometres converted to Centimeters rounded to five decimal places.
fly;
Returns 233 miles per hour converted to Knots rounded to two decimal places.
fly;
Returns 233 miles per hour converted to km/h.
Lookups
Beaufort
fly;
Returns beaufort description of a 45 knot wind e.g. 'Strong Gale'
fly;
Returns beaufort force index of a 25 knot wind e.g. 6
fly;
Returns beaufort force, description and range of a 15
Wind Cardinal Direction
flyjs;
Returns "S" (South) the cardinal direction for a wind at 180 degrees
Wake (ICAO categorisation)
fly;
Returns the ICAO wake category for an aircraft of 4500kg
Calculators
fly;
Returns head wind component, given wind speed (knots), wind direction and aircraft direction (later pair both measured in degrees). Rounded to 2 decimal places.
fly;
Returns cross wind component, given wind speed (knots), wind direction and aircraft direction (later pair both measured in degrees). Rounded to 2 decimal places.
Wind Triangle
flyjs;
Returns course and ground speed, given trueAirSpeed, heading, windSpeed and windDirection, rounded to 2 decimal places.
flyjs;
Returns heading and ground speed, given trueAirSpeed, course, windSpeed and windDirection, rounded to 2 decimal places.
flyjs;
Returns wind speed and direction, given trueAirSpeed, groundSpeed, course and heading, rounded to 2 decimal places.
Contributors
One-man-band at the moment. Contact me at twitter on @rayhammond, or, via my blog here http://geeksretreat.wordpress.com if you are interest in getting involved.
License
MIT