Open AIP

The "to-do" list for Virtual Radar Server is as long as my arm, but if you want to pile more work onto it then this is for you.
nitro999
Posts: 34
Joined: Tue Feb 09, 2016 7:32 pm
Location: UK
Contact:

Open AIP

Postby nitro999 » Sun Apr 10, 2016 2:49 pm

Sorry if this has been raised before. I did a search but couldn't find any mention.

Would it be possible to have OpenAIP as a map option? It seems to use Open StreetMap as a base layer and then overlay onto it nav aids, aviation charts, etc. Would be really cool to have this as an option in VRS. Links below:

Map with overlays: http://maps.openaip.net
Website: http://www.openaip.net
http://www.virtualradaruk.com
Radarcape, Swindon (UK) | FR24: T-EGVA10 | Flightaware 16984

agw
Posts: 1883
Joined: Fri Feb 17, 2012 3:20 am

Re: Open AIP

Postby agw » Mon Apr 11, 2016 12:58 am

Open StreetMap might be a problem, having lots of VRS users all fetching from the same tile server could hammer it a bit. If a Google Maps overlay could be built from the data then that would be easier to integrate into VRS.

nitro999
Posts: 34
Joined: Tue Feb 09, 2016 7:32 pm
Location: UK
Contact:

Re: Open AIP

Postby nitro999 » Wed Apr 27, 2016 9:42 pm

If anyone's interested, I have got this working now:

Image

The airspace and airport data comes from http://www.openaip.net

You'll need to register and then download the AIP format files from their webpage. There's then several bits of software on their apps page to convert AIP format to KML format, which can then be used as a layer on Google maps per the instructions here.

Hope that helps others who might be looking for ways to add airspace and airport data to their VRS.
http://www.virtualradaruk.com
Radarcape, Swindon (UK) | FR24: T-EGVA10 | Flightaware 16984

amlink
Posts: 1
Joined: Sun May 01, 2016 11:43 pm

Re: Open AIP

Postby amlink » Sun May 01, 2016 11:47 pm

Your overlay is exactly what I have been looking for. I've downloaded the aip files and converted them to kml but I'm not sure how to adjust VRS to use the overlay. Am I right in assuming you have written content for the custom plugin? Any help would be much appreciated.

nitro999
Posts: 34
Joined: Tue Feb 09, 2016 7:32 pm
Location: UK
Contact:

Re: Open AIP

Postby nitro999 » Mon May 02, 2016 6:36 pm

Here's the code to make it work using the custom content plugin. You'll need to change the URL to wherever you are hosting your KML files:

Code: Select all

<script type="text/javascript">
    if(VRS && VRS.globalDispatch && VRS.serverConfig) {
        VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function(bootStrap) {
         
            if(bootStrap.hookMapInitialised) {

                bootStrap.hookMapInitialised(function(pageSettings) {

                    if(pageSettings.mapPlugin && pageSettings.mapPlugin.getNativeType() === 'GoogleMaps') {

                        var map = pageSettings.mapPlugin.getNative();
                       
                   
//Add airports layer

        var ctaLayer = new google.maps.KmlLayer({
          url: 'http://webpage.com/Airports.kml',
          map: map
        });

//Add hotspots layer

        var ctaLayer = new google.maps.KmlLayer({
          url: 'http://webpage.com/Hotspot.kml',
          map: map
        });

//Add airspace layer


        var ctaLayer = new google.maps.KmlLayer({
        url: 'http://webpage.com/Airspace.kml',
        map: map
        });



                    }
                });
            }
        });
    }
</script>


The above puts the overlay on all the time. If anyone knows how to write a function to toggle them on / off then please do let me know.
http://www.virtualradaruk.com
Radarcape, Swindon (UK) | FR24: T-EGVA10 | Flightaware 16984

Falcon_viper55
Posts: 25
Joined: Sun Nov 01, 2015 6:55 pm

Re: Open AIP

Postby Falcon_viper55 » Mon Aug 08, 2016 12:51 am

Hi,

You have more info for this?
With what program you convert the files.

Thanks

nitro999
Posts: 34
Joined: Tue Feb 09, 2016 7:32 pm
Location: UK
Contact:

Re: Open AIP

Postby nitro999 » Mon Aug 08, 2016 8:22 pm

Falcon_viper55 wrote:With what program you convert the files.


Hello! I used this program to convert the AIP files to KML files, which can then be displayed on the VRS map using the code above

http://afterflight.org/qopenaip2kml/releases-downloads/
http://www.virtualradaruk.com
Radarcape, Swindon (UK) | FR24: T-EGVA10 | Flightaware 16984

Falcon_viper55
Posts: 25
Joined: Sun Nov 01, 2015 6:55 pm

Re: Open AIP

Postby Falcon_viper55 » Tue Aug 09, 2016 12:01 am

nitro999 wrote:
Falcon_viper55 wrote:With what program you convert the files.


Hello! I used this program to convert the AIP files to KML files, which can then be displayed on the VRS map using the code above

http://afterflight.org/qopenaip2kml/releases-downloads/


I have now convert the file and save the code as (html) put i custom plugin and the kml files are i root map of custom plug.

But noting to display...
I see missing something?

And the airport and hotspot file i get not convert only the airspace file are convert to kml.

nitro999
Posts: 34
Joined: Tue Feb 09, 2016 7:32 pm
Location: UK
Contact:

Re: Open AIP

Postby nitro999 » Tue Aug 09, 2016 7:45 pm

Falcon_viper55 wrote:I have now convert the file and save the code as (html) put i custom plugin and the kml files are i root map of custom plug.


I couldn't get it to work by putting the KML files in the VRS root folder, so mine are hosted somewhere else. You could try putting the KML files in a public Dropbox or Onedrive folder, change the URL in the code, and see if that works temporarily. At least then you'll know what the problem is and you can look to fix it.

Be careful though, as the Dropbox or Onedrive folder location will then be visible in the webpage source code for the world to see...
http://www.virtualradaruk.com
Radarcape, Swindon (UK) | FR24: T-EGVA10 | Flightaware 16984

Mac
Posts: 84
Joined: Tue Mar 19, 2013 11:49 am

Re: Open AIP

Postby Mac » Fri Aug 12, 2016 7:44 am

Hi,

Amazing work getting these overlays working.
I have attempted it myself but haven't had much success to be honest ! :?

I have created a Site root folder called "Overlays" on the C:\ of my VRS machine and put the KML files in there and the HTML code you posted in this thread into into a .html file there.

I've tried editing the html file URL's to look for /Airspace.kml and also tried uploading the kml to a publicly available URL and editing the HTML file to look for this address but still nothing...

On the plugin screen I have the "Inject File" filed set to the path of the HTML in C:\Overlays
AT is set to END of HEAD
Address is set to *
Its enabled.
Site root folder is set to C:\Overlays

I'm probably missing something obvious.. Any help appreciated! :)


Return to “Feature Suggestions”

Who is online

Users browsing this forum: Google [Bot] and 1 guest