Replies: 1 comment
-
Update 14/04/2024The option to load the radio callsigns from the "radio_callsigns": {
"config": {
"load_from_ese": false,
"path_to_ese": "..\\..\\"
},
"custom": [
{
"callsign": "^HECC_CTR$",
"rcallsign": "Cairo Control Bandbox"
},
{
"callsign": "^HECC_(\\d+)(?:_)CTR$",
"rcallsign": "Cairo Control ACC $0"
}
]
}
Warning Relative path would be preferred if the configuration is to be shipped in a package for end-users where the structure of the directories are the same for all users. The absolute path will always be different from a machine to another.
Parsing from .ESE fileSince parsing the radio callsigns from positions is not provided by EuroScope's PlugIn API, it was suggested by members of VATSIM that locating and parsing the .ese file manually would be a better alternative, as some people would prefer to load callsigns directly from the sector files rather than have a dedicated list for the plugin. The logic of this system is that the system will decide the radio callsign based on the combination of the primary frequency of the controller and the prefix ICAO of their callsign. This will prevent two stations having the same frequency to be confused, as well as preventing missing a slightly modified callsign. Examples:
TestingI'd appreciate testing all the items discussed beforehand with feedback to whether we should further improve any feature introduced and/or whether there are bugs discovered to fix. New ideas are also encouraged! Every commit pushed to the branch ThanksThanks to Max and Jonas for their input and feedback! |
Beta Was this translation helpful? Give feedback.
-
Hello!
Since I am having some free time this month, I got interested again in doing more work on DiscordEuroscope and look for ideas to improve and make things easier for user-end. Most of the complaints I've heard the past couple of years were mainly related to customization which required modifying the source code and recompilation. Hence, it was my main priority to work on making everything configurable by the user.
The main purpose of this discussion topic is to share ideas to further improve v1.3.0 branch before release. I'd be more than happy to hear feedback, suggestions and contributions too!
Branch: https://github.com/Kirollos/DiscordEuroscope/tree/1.3.0
JSON Configuration File
JSON being a simple and dynamic method of configuration, rapidjson header library is used to serve the purpose of supporting JSON parsing.
This is the structure so far:
The JSON object consists of the following:
Apart from the global elements mentioned above, any of the following states can have the higher priority of the image keys over the global one declared beforehand. If the keys are left as an empty string, the global keys are used.
Same story as mentioned in the other three states. But there are two additional points to consider:
radio_callsign
is an object that consists of:Example:
This will match any callsign in the format of
HECC_xx_CTR
where xx is any amount of digits and the radio callsign would be processed asCairo Control ACC xx
The concept of global vs local elements
Would there be a better way to implement the global and local elements?
The variables
The currently implemented variables are the following:
{callsign}
: Callsign (example: HECA_APP){rcallsign}
: Radio Callsign (example: Cairo Director){frequency}
: Frequency in format xxx.yyy (example: 119.050){current_tracked}
: Current number of tracked aircraft by the controller{total_tracked}
: Total number of aircraft tracked by the controller{total_inrange}
: Total number of aircraft in range of the controllerMy inquiries on this section:
Radio callsigns and regex
The old system had a basic text file parser that has to read every single line and look for a callsign in order to register it to its corresponding radio callsign. This proved to work fine but it would eventually break if a variant callsign was used. This led me to come up with the idea of using regex, where it can allow you guys to freely choose the matching criteria of the callsign and map it to its radio callsign.
Thus, I came up with this design:
I'm now having second thoughts of changing the structure of this object to be an array of objects instead. To look something similar to the following snippet but I wanted to poll it here first if it would be better?
Feedback and Contribution
The main purpose of this discussion topic is to share ideas to further improve v1.3.0 branch before release. I'd be more than happy to hear feedback, suggestions and contributions too on this topic or privately on Discord!
Beta Was this translation helpful? Give feedback.
All reactions