Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terrain elevation and associated functionalities added with TERRAIN plugin v1.0 #430

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

yaofuzhou
Copy link
Contributor

@yaofuzhou yaofuzhou commented Oct 9, 2022

Dear BlueSky Community,

I have implemented the initial version of the plugin TERRAIN.

To test TERRAIN on your end,

  1. configure the terrain_and_skyline section in settings.cfg. You may want to request an Open Topography key for free, and use it to replace the default key. The default bounding box is placed around Vienna that everyone loves.

  2. Run plugin terrain in the BlueSky console. Stand by for the plugin to download necessary dataset and to initialize its functions.

  3. Create an aircraft within the set bounding box. E.g., a 747 over Vienna,
    cre A b744 48.2, 16.3 0m 10000 200

  4. pan A.

  5. Run AGL A for the updated above-ground level of A. You may hear a sound that says the AGL value in feet 🙄🙄🙄

  6. Mute that sound in settings.cfg with agl_mute = True 🤣🤣🤣

  7. Run groundmsl A or groundmsl 48.2, 16.3 to check the ground elevation below A or at (lat, lon) = (48.2, 16.3).

  8. Run SHOWELEMAP to print a drawing of the terrain elevation map in .pdf and .png formats.

Please kind let me know if you have spotted any issue for me to fix, especially if I have broken any convention of BlueSky that I am not aware of.

As always, suggestions for me to improve and expand the plugin TERRAIN are much welcomed.

Cheers,

Yaofu

P.s. we can totally make landing aircraft say "50, 40, 30, 20, 10, retard, retard, retard..." if you want this (useless?) feature!

@yaofuzhou yaofuzhou changed the title TerrainTerrain elevation and associated functionalities added with TERRAIN plugin v1.0 Terrain elevation and associated functionalities added with TERRAIN plugin v1.0 Oct 9, 2022
@jooste
Copy link
Member

jooste commented Nov 1, 2022

Thanks for this interesting plugin! I have a couple of suggestions:

  • All variables added to settings should be provided with a default using settings.set_variable_defaults(), because right now successful loading of the plugin depends on having certain contents in your settings.cfg file
  • Additional (temporary/downloaded) datafiles should be placed in the cache dir, not the navigation data dir
  • Some critical info is only printed to the terminal. It would be useful to see these messages in the bluesky echo window as well.
  • If you move initialisation of terrain data to a stack function, your plugin can load 'instantly'. Also, this avoids the echo commands you currently have in the root of your plugin file.

@JaxkDev
Copy link

JaxkDev commented Oct 15, 2024

@yaofuzhou I really like the sound of this, but seen it has gone 'stale' of some sort.
Just wondering if you have any intentions of starting to smooth this off to hopefully merge in the near future!

  • Jack

@yaofuzhou
Copy link
Contributor Author

JaxkDev

Hi Jack! Thanks for reaching out. Sorry, I have not had the chance to update my plugin according to the latest BlueSky conventions.

For terrain elevation alone, the project is conceptually quite simple as it just interpolates the terrain elevation using discrete data queried from Open Topography.

The only technical issues are 1) When querying, one probably wants to download one tile with a limited size at a time; and 2) making sure that the coordinate system is handled correctly. I have not implemented any optimization to improve the speed or efficiency of the elevation function, and something like a hashtable may get the job done such that the memory does not have to keep the elevation map for too large of an area at once.

The slightly more ambitious project would include 3D skyline data from OpenStreetMap, which I have only prototyped locally and not yet committed. If you are interested, I can share my thoughts about this and my algorithm for integrating the skyline elevation map with the terrain elevation map. Let me know if you are interested in going ahead.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants