Christian1984 / vfrmap-for-vr

FSKneeboard (formerly known as "VFR Map For VR") adds a helpful ingame panel to your flight simulator which brings several different maps, waypoints and tracks, a charts viewer, and a notepad right into your Flight Simulator cockpit! This is is especially helpful for those of us who like to fly in VR.
https://fskneeboard.com
MIT License
44 stars 3 forks source link

Usage of OFM Tiles #18

Closed ovord closed 3 years ago

ovord commented 3 years ago

hi christian, great Job, can i specify the tile url somewhere to use OFM Tiles?

Oliver

Christian1984 commented 3 years ago

Great idea. I remeber that I was looking into this a while ago but couldn't really find a documentation of their public API (and if they offer one). I've just sent them an email, though, referring to your request and asking them if they have a public API and how it could be accessed.

If it is not possible, there seems to be the possibility to download their map tile data and serve them locally, which would make the setup of FSKneeboard much more complicated. But it might be an option... Let's see if the OFM team responds to my request and what their advice looks like!

ovord commented 3 years ago

Hi Chris,

i´m the core developer of OFM, we´ll find a way 😉

Von: Chris @.> Gesendet: Samstag, 5. Juni 2021 21:42 An: Christian1984/vfrmap-for-vr @.> Cc: Oliver Vorderegger @.>; Author @.> Betreff: Re: [Christian1984/vfrmap-for-vr] Usage of OFM Tiles (#18)

Great idea. I remeber that I was looking into this a while ago but couldn't really find a documentation of their public API (and if they offer one). I've just sent them an email, though, referring to your request and asking them if they have a public API and how it could be accessed.

If it is not possible, there seems to be the possibility to download their map tile data and serve them locally, which would make the setup of FSKneeboard much more complicated. But it might be an option... Let's see if the OFM team responds to my request and what their advice looks like!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Christian1984/vfrmap-for-vr/issues/18#issuecomment-855286464, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC54AY6LNMCR73UMTRNCPY3TRJ4Y7ANCNFSM456XB6LQ.


neway data AG Landstrasse 105 | 9490 Vaduz | Fürstentum Liechtenstein

[https://storage.googleapis.com/storage.newaydata.com/email/cube.JPG]


Oliver Vorderegger +436649254114 @.***

neway data AG Landstrasse 105 | 9490 Vaduz | Fürstentum Liechtenstein

[https://storage.googleapis.com/storage.newaydata.com/email/cube.JPG]

Christian1984 commented 3 years ago

Wow, that's awesome :-) Love OFM. I used it a lot when I learned flying on VATSIM on the "flatscreen"!!! So, yeah, I'd love to add it to FSKneeboard.

The TileLayers are defined in maps.js:210ff. - All the data is currently pulled from public APIs.

I see two options using OFM tiles:

Option 1: Download them and put them in a local folder inside the FSKneeboard server's directory. Say /maps/ofmtiles for example. Then the local webserver (which is there already anyways) could simply server them. That would require the user, however, to download the latest map tiles manually.

Option 2: Simply refer to a public API on your server. That way we could always serve the latest and most up to date tiles that you publish on your OFM project page anyways. That would be awesome, but would obviously create some server load on your end...

Let me know what you think is the best approach!

ovord commented 3 years ago

Lets use the server api directly, there is one issue though:

We need to give the corresponding airac cycle to the api, as new cycles need quite a while to render and that happens when the old cycle is still valid.

The function to calc the current airac cycle is:

public getCurrAiracId(dateVal: Date): number {

let cDate = new Date(2003, 0, 23);

let counter = 0;

let lastCount = 0;

let year = dateVal.getFullYear();

while (cDate.getTime() < dateVal.getTime()) {

    if (cDate.getFullYear() === dateVal.getFullYear()-1) {

        lastCount++

    };

    if (cDate.getFullYear() === dateVal.getFullYear()) {

        counter++

    };

    cDate.setDate(cDate.getDate() + 28);

};

if (counter == 0) {

    year -= 1;

    counter = lastCount;

};

const id = (parseFloat(year.toString().substring(2, 4)) * 100) + counter

return id;

};

https://nwy-tiles-api.prod.newaydata.com/tiles/9/255/173.png?path={airac}/aero/latest https://nwy-tiles-api.prod.newaydata.com/tiles/9/255/173.png?path=%7bairac%7d/aero/latest

the {airac} needs to be replaced by the above calculated string, which currently will be “2105”.

That’s how we ensure the smooth switch from one airac to another with out intermediate tiles showing up.

Can you check that code in, i´ll be happy to test it today in the evening.

Btw: where are you from, maybe we could write in german too 😊

Von: Chris @.> Gesendet: Sonntag, 6. Juni 2021 10:39 An: Christian1984/vfrmap-for-vr @.> Cc: Oliver Vorderegger @.>; Author @.> Betreff: Re: [Christian1984/vfrmap-for-vr] Usage of OFM Tiles (#18)

Wow, that's awesome :-) Love OFM. I used it a lot when I learned flying on VATSIM on the "flatscreen"!!! So, yeah, I'd love to add it to FSKneeboard.

The TileLayers are defined in maps.js:210ff. - All the data is currently pulled from public APIs.

I see two options using OFM tiles:

Option 1: Download them and put them in a local folder inside the FSKneeboard server's directory. Say /maps/ofmtiles for example. Then the local webserver (which is there already anyways) could simply server them. That would require the user, however, to download the latest map tiles manually.

Option 2: Simply refer to a public API on your server. That way we could always serve the latest and most up to date tiles that you publish on your OFM project page anyways. That would be awesome, but would obviously create some server load on your end...

Let me know what you think is the best approach!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Christian1984/vfrmap-for-vr/issues/18#issuecomment-855362088 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AC54AY5FKFSS663JY4GARZTTRMX2ZANCNFSM456XB6LQ . https://github.com/notifications/beacon/AC54AY647Q7T5XFG6ITZUVTTRMX2ZA5CNFSM456XB6L2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGL54UKA.gif


neway data AG Landstrasse 105 | 9490 Vaduz | Fürstentum Liechtenstein

https://storage.googleapis.com/storage.newaydata.com/email/cube.JPG

Christian1984 commented 3 years ago

Yes, I'm German, too! If you like, we can discuss details in german via Discord!? I have launched a new FSKneeboard-Discord-Server the other day. You can find the invite at https://discord.fskneeboard.com and we have a dedicated german channel over there :-)

Christian1984 commented 3 years ago

@ovord Can you please share some information on the license implications of using OFM tiles in FSKneeboard? What license is the tile data published under?

ovord commented 3 years ago

servus Chris,

das läuft unter der OFM Gerneral Users License: https://www.openflightmaps.org/live/downloads/20150306-GUL.pdf

LG

Christian1984 commented 3 years ago

Really nice, Oliver :-)

Ich würde in der Attributions-Section im Readme dann https://www.openflightmaps.org/ verlinken. Passt dir das so?

ofm-eddk

ovord commented 3 years ago

sehr cool, testen ich will!

Christian1984 commented 3 years ago

Sehr gern! Ich kann dir ne Preview-Version schicken. Magst du mir mal eine E-Mail an info@fskneeboard.com von einer Adresse schicken, an die ich das senden kann? Oder du kommst in den Discord :-)

ovord commented 3 years ago

hi chris, hast mir schon mail geschrieben? nix gefunden :(

Christian1984 commented 3 years ago

Hab ich! Allerdings hat dein Mail-Server die Mail gebounced. Ich hab dir dann am 11.06. ne Nachricht per Discord geschickt (mit nem Dropbox-Link) :-) Schau mal, ob die angekommen ist!

ovord commented 3 years ago

Ahja, jetzt seh ichs, ich werds gleich mal testen heute 😉

thx

Von: Chris @.> Gesendet: Samstag, 19. Juni 2021 12:39 An: Christian1984/vfrmap-for-vr @.> Cc: Oliver Vorderegger @.>; Mention @.> Betreff: Re: [Christian1984/vfrmap-for-vr] Usage of OFM Tiles (#18)

Hab ich! Allerdings hat dein Mail-Server die Mail gebounced. Ich hab dir dann am 11.06. ne Nachricht per Discord geschickt (mit nem Dropbox-Link) :-) Schau mal, ob die angekommen ist!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Christian1984/vfrmap-for-vr/issues/18#issuecomment-864388538 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AC54AY2GRERFVUCLLUSFJDLTTRXTVANCNFSM456XB6LQ . https://github.com/notifications/beacon/AC54AYZY5S7BAKE4CTKFJ3LTTRXTVA5CNFSM456XB6L2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGOCYLOQ.gif


neway data AG Landstrasse 105 | 9490 Vaduz | Fürstentum Liechtenstein

https://storage.googleapis.com/storage.newaydata.com/email/cube.JPG

ovord commented 3 years ago

hab gebuildet und installiert, aber jein ofm 😟

sent from mobile, please excuse typos and autocorrection mistakes.


From: Chris @.> Sent: Saturday, June 19, 2021 12:38:50 PM To: Christian1984/vfrmap-for-vr @.> Cc: Oliver Vorderegger @.>; Mention @.> Subject: Re: [Christian1984/vfrmap-for-vr] Usage of OFM Tiles (#18)

Hab ich! Allerdings hat dein Mail-Server die Mail gebounced. Ich hab dir dann am 11.06. ne Nachricht per Discord geschickt (mit nem Dropbox-Link) :-) Schau mal, ob die angekommen ist!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Christian1984/vfrmap-for-vr/issues/18#issuecomment-864388538, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC54AY2GRERFVUCLLUSFJDLTTRXTVANCNFSM456XB6LQ.


neway data AG Landstrasse 105 | 9490 Vaduz | Fürstentum Liechtenstein

[https://storage.googleapis.com/storage.newaydata.com/email/cube.JPG]


Oliver Vorderegger +436649254114 @.***

neway data AG Landstrasse 105 | 9490 Vaduz | Fürstentum Liechtenstein

[https://storage.googleapis.com/storage.newaydata.com/email/cube.JPG]

Christian1984 commented 3 years ago

Also wenn du das Repo clonen und selber bauen willst, dann musst du den Branch post-1-3-0 auschecken. OFM ist im master noch nicht drin. Der master ist immer auf dem Stand des letzten Releases...

Ansonsten benutz doch einfach den server und das Panel aus dem zip-File. Das sind ja schon die gebauten Binaries der Preview.

Wichtig ist, dass du beides, Server und Panel aus dem Preview-Zip benutzt.

ovord commented 3 years ago

so einfach 😀, jetzt hats geklappt 👍. sieht super aus!

sent from mobile, please excuse typos and autocorrection mistakes.


From: Chris @.> Sent: Sunday, June 20, 2021 2:02:26 PM To: Christian1984/vfrmap-for-vr @.> Cc: Oliver Vorderegger @.>; Mention @.> Subject: Re: [Christian1984/vfrmap-for-vr] Usage of OFM Tiles (#18)

Also wenn du das Repo clonen und selber bauen willst, dann musst du den Branch post-1-3-0 auschecken. OFM ist im master noch nicht drin. Der master ist immer auf dem Stand des letzten Releases...

Ansonsten benutz doch einfach den server und das Panel aus dem zip-File. Das sind ja schon die gebauten Binaries der Preview.

Wichtig ist, dass du beides, Server und Panel aus dem Preview-Zip benutzt.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Christian1984/vfrmap-for-vr/issues/18#issuecomment-864543419, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC54AY7EILADB3SBU2SWTV3TTXKFFANCNFSM456XB6LQ.


neway data AG Landstrasse 105 | 9490 Vaduz | Fürstentum Liechtenstein

[https://storage.googleapis.com/storage.newaydata.com/email/cube.JPG]


Oliver Vorderegger +436649254114 @.***

neway data AG Landstrasse 105 | 9490 Vaduz | Fürstentum Liechtenstein

[https://storage.googleapis.com/storage.newaydata.com/email/cube.JPG]

Christian1984 commented 3 years ago

done, will be released with v1.4