Radarspotting

Mode-S Software => Virtual Radar Server => Topic started by: Sketco on August 06, 2022, 06:07:08 PM

Title: Open AIP missing
Post by: Sketco on August 06, 2022, 06:07:08 PM
About 1 week ago Open AIP graphics disappeared from from my VRS map.

The Menu> Map layers shows AIP ticked and transparency slider is present.
Chrome and Edge do not show Open AIP either.

Using:
Firefox 103.0.1 (64bit)
Virtual Radar server v 2.4.4.36598
Windows 10 (all latest updates installed)
All graphics drivers up to date.

Advice appreciated


Title: Re: Open AIP missing
Post by: Anmer on August 07, 2022, 07:42:48 AM
Unfortunately I'm away for another week so can't take a look at this.

Does VRS get the AIP data from a remote source?  Maybe it's not available for some reason and nothing to do with your VRS setup?
Title: Re: Open AIP missing
Post by: jonboy1081 on August 07, 2022, 08:10:59 AM
I have the same issue on Linux and Windows versions, this also happened around a year ago but it came back after a week or so.

According to a post on the FB VRS group the OpenAIP source data has changed.

https://www.facebook.com/groups/VirtualRadarServer/permalink/5244053688975549/
Title: Re: Open AIP missing
Post by: Sketco on August 07, 2022, 10:27:57 AM
Quote from: Anmer on August 07, 2022, 07:42:48 AM
Unfortunately I'm away for another week so can't take a look at this.

Does VRS get the AIP data from a remote source?  Maybe it's not available for some reason and nothing to do with your VRS setup?

Thanks, I was wondering this also. The disappearance was quite sudden. jonboy1081 makes reference to changes, so I guess just sit and wait.
Title: Re: Open AIP missing
Post by: Sketco on August 07, 2022, 10:31:24 AM
Quote from: jonboy1081 on August 07, 2022, 08:10:59 AM
I have the same issue on Linux and Windows versions, this also happened around a year ago but it came back after a week or so.

According to a post on the FB VRS group the OpenAIP source data has changed.

https://www.facebook.com/groups/VirtualRadarServer/permalink/5244053688975549/

Ah, Thanks for this. Makes sense that a source has changed. No idea how I can get it back, just wait and see. I couldn't view the Facebook reference, I don't use Facebook, but if it doesn't come back, I guess i'll have to join and see what's happening.
Title: Re: Open AIP missing
Post by: Anmer on August 07, 2022, 11:19:25 AM
There's nothing much on the Facebook page other that similar reports of OpenAIP not working.

There's also a mention of it on the OpenAIP discussion group:

https://groups.google.com/g/openaip/c/nEthzceXv4E

I suspect this issue will either get solved or not.  But it doesn't look to be anything with your local VRS setup.
Title: Re: Open AIP missing
Post by: Sketco on August 07, 2022, 02:18:09 PM
Quote from: Anmer on August 07, 2022, 11:19:25 AM
There's nothing much on the Facebook page other that similar reports of OpenAIP not working.

There's also a mention of it on the OpenAIP discussion group:

https://groups.google.com/g/openaip/c/nEthzceXv4E

I suspect this issue will either get solved or not.  But it doesn't look to be anything with your local VRS setup.

Thanks very much for looking into this.

It's a shame about the AIP loss, but I think more important is the integrity of my VRS, and now I can be rest assured and carry on rewardless.

All help has been greatly appreciated.
Again, thanks for your time.
Title: OpenAIP Layer on VRS - replacement OpenAIP layer
Post by: rikgale on August 10, 2022, 10:25:04 PM
Currently the OpenAIP layer on VRS doesn't work. Something about changes to the way tiles are served and end-points etc etc., but that is not the point of this post - You want them back, right?

Easy (ish)

1- Read this post. https://groups.google.com/g/openaip/c/sG8GlccNS6w/m/U8OJiGGHAgAJ
2- Download vrs_openaip_layers.html from the above.
3- Ensure that you have CustomContent plugin installed for VRS.
4- Create an OpenAIP account, verify* and log in.
5- After logging in, from the top right menu (click the weird looking circularish icon)
6- Open </> API Clients
7- Create new API Client ("Request New API Client") - the name must all be lower case and at least 5 letters long and the description can be what ever you like.
8- Save the new API Client and then you should be presented with a screen displaying the Client ID Token.
9- Copy this token into the vrs_openaip_layers.html replacing const OPENAIP_API_KEY = 'MY_OPENAIP_CLIENT_ID_HERE'; with const OPENAIP_API_KEY = 'f87f8s8f8g8ghjdjsdjjfjwjefwjfj';
where f87f8s8f8g8ghjdjsdjjfjwjefwjfj is your valid OpenAIP Client ID. Also, ensure that you keep the ' '

10- Save file.
11- Copy file into /home/pi/VirtualRadarServer/VRS-Extras/CustomContent/CustomInjectedFiles/ or whereever your CustomContent plugin store the files. I use VRS on linux and the above is where my set up wants me to put things, but your location may vary. There are some images in the post linked in 1-, which may be of some use to Windows VRS users.
12- Set up a new Custom Content injection using the location where you saved vrs_openaip_layers.html and then inject at the end of Body of all webpages and save.
13- Refresh your VRS page and it should look like the attached (depending on zoom level)
14- End. Make tea, have biscuit come back and enjoy watching planes moving over your OpenAIP marked map.

I have found if you dim the map a bit on VRS the OpenAIP stuff stands out more clearly. YMMV.

If anyone tries this let me know how you get on.


* - you may get a 2nd email from OpenAIP a couple of hours later asking you to confirm your email address - do this otherwise you lose access and your API Client ID stops working, but you can set up the API Client ID after the initial verification email which is delivered fairly quickly.

[attachment deleted reduce file load]
Title: Re: Open AIP missing
Post by: Sketco on August 11, 2022, 09:37:56 AM
Thank you Rik.
What a great detailed response.
I appreciate the time you took to reply and provide a workaround.
I will follow up on this.

Cheers
Title: Re: Open AIP missing
Post by: rikgale on August 11, 2022, 10:21:01 AM
No problem :)

The workaround credit should really go to the poster in the linked thread who came up with the vrs_openaip_layers.html
All I did was a step-by-step guide to save some head scratching.

If you can see anyway of improving the instructions to make them clearer, or if you think I have missed anything please let me know and I will make the necessary changes so that it is easy to follow for anyone else who wants OpenAIP layer back.
Title: Re: Open AIP missing
Post by: JXB on August 30, 2022, 09:21:33 AM
I have tried it step by step and I can confirm that it works, great to have it back. The only thing that doesn´t work is the opacity of the OpenAIP layer.
Title: Re: Open AIP missing
Post by: rikgale on August 30, 2022, 10:42:45 AM
Great that is works for you :)

The opacity slider in the menu does not affect this process as this would only affect the OpenAIP layer set by VRS and not by this process.

If you were to delete from vrs_openaip_layers.html
                        L.tileLayer(`https://{s}.api.tiles.openaip.net/api/data/airspaces/{z}/{x}/{y}.png?apiKey=${OPENAIP_API_KEY}`).addTo(map);
                        L.tileLayer(`https://{s}.api.tiles.openaip.net/api/data/airports/{z}/{x}/{y}.png?apiKey=${OPENAIP_API_KEY}`).addTo(map);
                        L.tileLayer(`https://{s}.api.tiles.openaip.net/api/data/navaids/{z}/{x}/{y}.png?apiKey=${OPENAIP_API_KEY}`).addTo(map);
                        L.tileLayer(`https://{s}.api.tiles.openaip.net/api/data/reporting-points/{z}/{x}/{y}.png?apiKey=${OPENAIP_API_KEY}`).addTo(map);


and replace with

                        L.tileLayer(`https://{s}.api.tiles.openaip.net/api/data/airspaces/{z}/{x}/{y}.png?apiKey=${OPENAIP_API_KEY}`,{
                    opacity: 0.6,}).addTo(map);
                        L.tileLayer(`https://{s}.api.tiles.openaip.net/api/data/airports/{z}/{x}/{y}.png?apiKey=${OPENAIP_API_KEY}`,{
                    opacity: 0.6,}).addTo(map);
                        L.tileLayer(`https://{s}.api.tiles.openaip.net/api/data/navaids/{z}/{x}/{y}.png?apiKey=${OPENAIP_API_KEY}`,{
                    opacity: 0.6,}).addTo(map);
                        L.tileLayer(`https://{s}.api.tiles.openaip.net/api/data/reporting-points/{z}/{x}/{y}.png?apiKey=${OPENAIP_API_KEY}`,{
                    opacity: 0.6,}).addTo(map);


Assuming I have got my code right, this should set the opacity to 60%. Change the 0.6 to any value between 0 and 1 in 0.1 increments.

Back up your file before making the changes!

One thing to point out. There is a rate limit on the amount of OpenAIP tiles that can be downloaded in 24 hours for each registered API key, so if you move about the map alot/refresh the page/zoom a lot then they OpenAIP layer may stop showing. It will come back the next day.
Title: Re: Open AIP missing
Post by: JXB on August 30, 2022, 11:35:25 PM
Thank you, rikgale! What is the file called that I should paste this text into?
Title: Re: Open AIP missing
Post by: rikgale on August 31, 2022, 08:07:03 AM
This should replace the lines listed in the file downloaded in step 2 of the instructions.

vrs_openaip_layers.html
Title: Re: Open AIP missing
Post by: JXB on August 31, 2022, 08:04:53 PM
Thank you!
Title: Re: Open AIP missing
Post by: hbokh on October 20, 2023, 10:45:30 AM
FWIW there have been some changes to the OpenAIP API.
I have attached an updated HTML file that is working for me (after registering and creating an OpenAIP client ID token).
In this file, change "MY_OPENAIP_CLIENT_ID_HERE" to the client ID token.

From their Google Groups:
"Openaip TMS layers can be injected using a VRS "Custom Plugin". First, install the Custom Plugin feature for VRS from the VRS website. Openaip layers are now "injected" into the main VRS body HTML using the attached HTML file "vrs_openaip_layers.html". The attached HTML file must be configured with the custom plugin to be injected "at the end of body."
Title: Re: Open AIP missing
Post by: rikgale on October 20, 2023, 01:39:30 PM
Yes, OpenAIP have condensed there end API end points from 5 to 1 to reduce load on the servers.
Thanks for the update.