Coder Social home page Coder Social logo

nasr-airport-parser's Introduction

NASR-airport-parser

NASR-airport-parser is a simple utility for parsing airport data from the FAA's 28-day subscription (available here).

Getting Started

Usage

Clone the repository

git clone https://github.com/andydeforest/nasr-airport-parser.git

Create a file and import the parser. The parser takes the location of the APT.txt file as a parameter. Example:

require './src/Parser.php';

$parser = new Parser('./APT.txt');

$parser->forEach(function($airport) {
	$name = $airport->getName();
	$runways = $airport->getRunways();
});

Available Airport Methods

Method Returns Description Example
getIcao() string Gets the ICAO code for the airport KORD
getIdentifier() string Gets the FAA identifier for the airport ORD
getName() string Gets the name of the airport CHICAGO O'HARE INTL
getCity() string Gets the city the airport is in CHICAGO
getCounty() string Gets the county the airport is in COOK
getState() string Gets the state the airport is in ILLINOIS
getLatitude() float Gets the latitude of the airport in decimal format 41.974521944444
getLongitude() float Gets the longitude of the airport in decimal format -87.906597222222
getElevation() float Gets the elevation of the airport 680.0
getType() string Gets the type of airport AIRPORT
getRegionCode() string Gets the FAA region code for the airport AGL
getOwnership() string Gets the ownership of the airport PUBLICLY OWNED
getArtcc() string Gets the ARTCC code for the governing ARTCC body ZAU
hasControlTower() bool Gets whether or not the airport has a control tower true
getCtaf() string Gets common traffic advisory frequency for the airport 122.8

Available Runway Methods

Method Returns Description Example
getIdentifier() string Gets the runway identifier for an airport 09/27
getLength() integer Gets the length of the runway to the nearest foot 5000
getWidth() integer Gets the width of the runway to the nearest foot 150
getMarkings() string Gets the runway markings PIR

License

This project is licensed under the MIT License - see the LICENSE.md file for details

nasr-airport-parser's People

Contributors

andydeforest avatar

Watchers

 avatar

nasr-airport-parser's Issues

Implementation

How do I implement the parser? You mention to create new file, but can you please provide an example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.