rt-2 / canotapi Goto Github PK
View Code? Open in Web Editor NEWThe Canadian Notams API
The Canadian Notams API
The regular expression on line:
preg_replace('/(Local NOTAM only\s+C[A-Z]{3})/',' ', $html);
should be replaced with:
preg_replace('/(Local NOTAM only\s+C[A-Z0-9]{3})/',' ', $html);
To allow NOTAMs for smaller airports (like CNZ8 and CNC4) to not include the "Local NOTAM only" string.
Yeah basically I'd create a Notam
objects that could be played with.
I think I would add that in the background of the existing 2 functions and add CANotAPI_GetNotamsObjectList
to get an array of NOTAMs objects.
rt-2
Basically CANotAPI_GetNotamsString
would return an associative array with all kind of separated information including the whole line of text.
Hello. I see in the code you're directly accessing a plan.navcanada.ca API. Do you have docs for this API? I would like to use it as well.
In the fall of 2019, NAV CANADA will transition to
the ICAO NOTAM format. All Canadian NOTAMs
will be distributed using this format, and the
information will be divided into eight sections:
Discord Please Problems Help
You don't have to do all these issues yourself, when I get around to it I would be happy to help you. In the meantime, I think you should stop using the find/replace method with using the DOM. With a script this size we could probably evaluate exactly how much more efficient the two methods are but I am going to guess the DOM method will be much faster.
Looking at the website http://www.zuluforpilots.com/Map it appears they pull all NOTAMs directly from NavCanada through AFTN... and I believe there has to be an API directly from NavCanada somewhere to pull this data from. Foreflight is doing it, other organizations are doing it. The problem is this limits us to 6 airports it would be great to figure a way to get as many airports or a region if we wanted.
I will star and follow the code :)
The usefulness of API is limited as it returns a concatenated string of the NOTAMs with HTML interspersed. The formatting and presentation should not be dictated by the API, this should be done by the application calling the API. The suggestion is to remove all HTML from the response and return an array of the NOTAMs instead to the application.
For example, the following line:
$ret .= '<span class="'.$classes.'">'.$this_notam_text.'</span><br><br>';
should be changed to:
$ret[] = $this_notam_text
And $showfooter should be permanently set to false and/or removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.