Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MatisseBE/vatglasses-converter
Converts VATSIM GNG ESE files into Vatglass json
https://github.com/MatisseBE/vatglasses-converter
Last synced: 3 months ago
JSON representation
Converts VATSIM GNG ESE files into Vatglass json
- Host: GitHub
- URL: https://github.com/MatisseBE/vatglasses-converter
- Owner: MatisseBE
- Created: 2023-03-01T21:02:09.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-24T22:08:15.000Z (8 months ago)
- Last Synced: 2024-11-02T05:02:35.297Z (3 months ago)
- Language: Python
- Size: 102 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-vatsim - vatglasses-converter - Tool to convert GNG files to [VatGlasses](https://vatglasses.uk) 3D map files. [This repo](https://github.com/lennycolton/VATGlasses-Data) holds all relevant sectors. (Mapping Tools / VATSIM Connect)
README
## File preparations
#### Prerequisites
PythonPersonally, I used VSC and its Python exention, but you can use any editor you like of course.
#### Note
I added an extra file that lets you update your positions without losing the current colors of your sectors. It will assign a random color for new sectors though. There is also a file that lets you check if any color is used more than once. This is only an issue if both sectors are adjacent to each other. Check the comments in the file for more information.
#### 'Your GNG ESE file'
In your text editor, perform a find and replace using REGEX (in VSC enable this icon:)![show regex symbol](https://cdn.discordapp.com/attachments/1071509192680153239/1071831914526298203/image.png)
This action will convert all your ES coordinates to the coordinate system used by vatglasses.**Attention**
A) Convert for all hemispheres NESW (North, East, South, West). Currently, only coordinates that are in the NE hemisphere are converted. Perform as many find and replaces as neccessary. Add a minus sign in the replace function for S and W.
B) Check if the delimiter between two hemispheres is correct in the REGEX. Here ':' is used (character before "E"). Adapt if neccesarry and/or perform as many find and replaces as neccessary.
```
Find: N0?([0-9]{2}).([0-9]{2}).([0-9]{1,2})(.[0-9]{3,})?:E([0-9]{3}).([0-9]{2}).([0-9]{1,2})(.[0-9]{3,})?
Replace: $1$2$3:$5$6$7
```Example:
```
ESE coordinate line
COORD:N51.01.22:E005.13.15
COORD:N51.02.16:E005.05.08New coordinate line with vatglasses coordinate system
COORD:510122:0051315
COORD:510216:0050508
```
### 'File with sectors for airspace.txt'
This file will contain the sector data from ESE. Take a look at the example.
This are all the sectors with their corresponding owners and sectorlines (borders).
From the GNG ESE, copy all **sector data** to this file as shown in the example. It may include comments.(**Important** Make sure to only include sectors from your vACC! You can do this by either excluding them from this txt file (CTR+F) OR filter them out later in the script with your own code. You should also leave out GND and DEL sectors.) This should no longer be necessary but use caution.
### 'File with sectorslines for airspace.txt'
This file will contain the **border coordinates** from ESE. Take a look at the example.
These are all the borders that surround a sector (at a certain FL-block).
From the GNG ESE, copy all **sectorlines** to this file as shown in the example. It may include comments.
No need to filter here.### 'File with positions for positions.txt'
This file will contain **positions** from the ESE. Take a look at the example.
From the GNG ESE, copy all **positions** to this file as shown in the example. It may include comments.
### Open 'create airspace from ESE .py' file
This file creates the "airspace" key in the vatglass json.
Here will will need to make some adjustments so the file can run without any problems.On line 4 amend your FIR ids. For example: EBBU, EDGG or LTAA and LTBB
On line 178 you will find the function *Findname(sector)*. This function is used to assign a sector to a group based on the name of the sector. The function strips the sector name and checks to which group it must belong and assigns it. You will need to change this function to your needs and groups. Don't forget to also change the first line.
**Attention**
"groups" Is another key in the vatglasse's json. You can find it under output