the Virtual 57th Wing
22nd of October 2018
|
online: 0
|
DS Health: online
|
|
Site Version: 1.4.17.4
ESST, METARs and weather in DCS - Virtual 57th Wing

ESST, METARs and weather in DCS

#1
Hey guys !

As some of you may know already, I'm guilty for the Discord bot that's been pestering people about for the last few weeks.

It's been a project of mine for a little while, the ultimate goal being able to remotely manage a DCS server on a computer somewhere in the cloud.

It's far from finished but there are already a few features implemented.

One of those feature is allowing users to set weather, time and dates for a given mission.

The weather can be specified, from parameters like wind, pressure, or clouds, or from a METAR string. It can also be "pulled" from real life METAR station, by giving it the ICAO code of a given station e.g. KLAS).

In its current state, my weather library is very confused by the North American METAR format.

I've been working on that in the past weeks, and I revamped the whole thing so it can chew and spew all kinds of units and formats.

A few of the current use cases:
  • Extract the weather from a MIZ file, and create a METAR out of it
  • Given a METAR string, extract a weather profile and apply it to a MIZ file (following different, weird DCS constraints such as min/max temp, "forced" cloud coverage depending on the precipitations, etc.).
  • Given a weather (either from METAR or from MIZ file), make a text that will be fed to a TTS engine in order to create an MP3 that will serve as an ATIS (currently only working for UniversRadio, SRS implementation is in the works but no ETA as of now).
Since the revamping of the library is still a prototype at this stage, I'm calling on you & our professional/hobbyist experience to help me review the data and correct the algorithm.

Here is a link to a (huge) text file, containing many thousands real-life METARs that have been converted using both my library and a third party one (for comparison):



If one of you has a few minutes to help me debug the darn thing, I'm interested in any & all feedback you might have, regarding all aspects of the current implementation.

Thanks guys =)
Image

Re: ESST, METARs and weather in DCS

#2
Thanks for this Etcher - based on my professional experience:
- The complete date is not mentioned, just the time the METAR was made / valid from
- Cloud base/ceiling is mentioned in sequence. I.e. it is not delayed until the end.
- Clouds are pronounced ( e.g. FEW 6000ft ) "FEW AT six thousand ft. Few at 20.000ft would be pronounced as two zero thousand feet.
- When visibility equals 9999, we mention "One zero kilometers OR MORE"
- No "at" for the wind
- Wind variable is also mentioned ("Wind Variable Between xxx and xxx degrees").
- When visibilty equals CAVOK, it is mentioned ( plain: "CAVOK" ). After this visibility or clouds are not mentioned since CAVOK ( I would the confirm the exact definition again) means visibility > 10Km, no cloud below 5000ft and no CBs/TCUs.
- NSC is also mentioned "No Significant Cloud".
- Visibility only mentioned which is applicable i.e. 9999 only "10KM or more" same for SM.
- No "celsius" after temperature.
- When flying in Europe, mmHg is used, In this case only the mmHg is mentioned where some station still include it in their ATIS, most of them don't.
- NOSIG is mentioned as "NO SIGNIFICANT CHANGE".
- As I am sure you know, ATIS broadcasts are categorised by a letter. They do not appear in the METAR, but for an ATIS transmission you will hear something in the likes of "ATIS information Alpha recorded at 0620". At the end of an ATIS you will hear; "you have received information Alpa ( report on first contact )" / "This was ATIS information Alpha".

Hope this is what you were looking for...

Thanks and keep up the good work!
Image
BOOM, there it is...

Re: ESST, METARs and weather in DCS

#3
@Reaper That's exactly what I was hoping for, thanks a bunch !
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- The complete date is not mentioned, just the time the METAR was made / valid from
Date/time is the date the METAR was made at, written in a "readable" for the TTS engine. What format do you think would be better?
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- Cloud base/ceiling is mentioned in sequence. I.e. it is not delayed until the end.
At what time in the sequence does it usually appear? The third party library I was using before always pushes it until the end, which is why I did too.
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- Clouds are pronounced ( e.g. FEW 6000ft ) "FEW AT six thousand ft. Few at 20.000ft would be pronounced as two zero thousand feet.
Noted! Pronunciation, rounding and plurals for units will be the most difficult part to get perfectly right. I'll try and fix this one.
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- When visibility equals 9999, we mention "One zero kilometers OR MORE"
Noted! I've added "or more".
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- No "at" for the wind
Noted! I've removed " at " for both wind speed and gust speed.
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- Wind variable is also mentioned ("Wind Variable Between xxx and xxx degrees").
I'm not sure I'm getting this one. Variable wind is already mentioned like this:

Code: Select all

Wind 130 (variable 110 to 170)
Or like this for the TTS:

Code: Select all

Wind one three zero (variable one one zero to one seven zero)
What is wrong with it exactly?
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- When visibilty equals CAVOK, it is mentioned ( plain: "CAVOK" ). After this visibility or clouds are not mentioned since CAVOK ( I would the confirm the exact definition again) means visibility > 10Km, no cloud below 5000ft and no CBs/TCUs.
Noted! That is my understanding too! CAVOK was on my to-do, but it slipped my mind. I made myself a TODO note in the code to implement it.
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- NSC is also mentioned "No Significant Cloud".
"NSC" is currently reported as "Sky clear". I heard that this was the usual "lingo" for it. Can you confirm that is not the case and that "No significant cloud" should be used instead?
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- Visibility only mentioned which is applicable i.e. 9999 only "10KM or more" same for SM.
Noted! Same issue as above for pronunciation, rounding and plurals. I'll work on it!
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- No "celsius" after temperature.
- When flying in Europe, mmHg is used, In this case only the mmHg is mentioned where some station still include it in their ATIS, most of them don't.
This is where I sacrifice realism for usability. My idea as of today is to include all units for distances (KM & SM) and pressures (inHg, hPa, mmHg), in order to accommodate people & airframes from every horizons. This will become a configurable setting in the future.

Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- NOSIG is mentioned as "NO SIGNIFICANT CHANGE".
Reaper wrote:
Wed Oct 03, 2018 2:52 pm
- As I am sure you know, ATIS broadcasts are categorised by a letter. They do not appear in the METAR, but for an ATIS transmission you will hear something in the likes of "ATIS information Alpha recorded at 0620". At the end of an ATIS you will hear; "you have received information Alpa ( report on first contact )" / "This was ATIS information Alpha".
This is already implemented, and every ATIS text receives a random identifier that will be shown in Discord, in addition to being played in the MP3 ATIS file =)

Thanks a bunch for your time and invaluable feedback ! I will implement your recommendations and update the text file in-place.

-
Image

Re: ESST, METARs and weather in DCS

#5
I have updated the test results again.

This time, the DCS weather is shown as well. For example:

Code: Select all

DCSWeather(altimeter=747, turbulence=0.0, temperature=32, wind_ground_speed=0, wind_ground_dir=0, wind_2000_speed=5, wind_2000_dir=20, wind_8000_speed=10, wind_8000_dir=328, precipitation_code=0, cloud_density=6, cloud_base=2500, cloud_thickness=1200, fog_enabled=False, fog_visibility=6000, fog_thickness=1000, dust_enabled=False, dust_density=3000)
Here is a breakdown of the different values:

Code: Select all

altimeter: pressure in mmHg
turbulence: turbulence factor for the wind, where wind varies at [base_wind_speed] +/- ([base_wind_speed] * [turbulence])
temperature: temperature in degrees Celsius
wind_ground_speed: wind speed at ground level, in meters per second
wind_ground_dir: wind direction at ground level, in degrees (NOT the direction the wind is coming from, but the direction it blowing TOWARDS)
wind_2000_speed: wind speed at 2000 meters, in meters per second
wind_2000_dir: wind direction at 2000 meters (same caveat applies)
wind_8000_speed: wind speed at 8000 meters
wind_8000_dir: wind direction at 8000 meters (same caveat applies)
precipitation_code: precipitations, where 0=nothing, 1=rain, 2=thunderstorm, 3=snow, 4=blizzard
cloud_density: amount of clouds, where 0=no clouds, 10=overcast
cloud_base: base of the cloud layer in meters
cloud_thickness: thickness of the cloud layer in meters
fog_enabled: boolean indicating if Fog is enabled
fog_visibility: visibility, in meters, as imposed by fog
fog_thickness: thickness of the fog layer, in meters (always 1000)
dust_enabled: boolean indicating if the dust is enabled
dust_density: visibility, in meters, as imposed by dust
This format is set by DCS, and I have no control over it.

This will show the exact correlation between:
  • The source METAR;
  • The inferred weather profile;
  • The weather that will be applied in-game.
There a few caveats when it comes to DCS weather, where things have minima/maxima set in stone (cloud base, cloud thickness, wind speed, temperature, dust density, fog visibility, etc.) or other "forced" values depending on other values (the "snow" precipitation requires temperature to be less than 0, and cloud density more than 5, for example).

This new dataset should give a very good insight into what exactly to expect when the library is used to edit or create MIZ files in the future.

EDIT: DCS only allows for one cloud layer to be active in a given mission. I'm selecting the most dense layer from all layers in the METAR for that purpose.
Image

Re: ESST, METARs and weather in DCS

#6
At least here in the US a lot of this discussion depends on if the airport is reporting the weather using an AWOS/ASOS or automated system or an ATIS which can be digital or in most cases is recorded by the tower personnel. For instance Nellis in RL is a recorded ATIS or a real person talking versus Stephen Hawking talking. Are you trying to recreate an ATIS or an AWOS/ASOS? The airports in your list are European so I cant add anything other than what Reaper has already put out there. This is a very cool tool.

Re: ESST, METARs and weather in DCS

#7
Baxter wrote:
Sun Oct 07, 2018 3:37 pm
At least here in the US a lot of this discussion depends on if the airport is reporting the weather using an AWOS/ASOS or automated system or an ATIS which can be digital or in most cases is recorded by the tower personnel. For instance Nellis in RL is a recorded ATIS or a real person talking versus Stephen Hawking talking. Are you trying to recreate an ATIS or an AWOS/ASOS? The airports in your list are European so I cant add anything other than what Reaper has already put out there. This is a very cool tool.
Hi Baxter!

Thank you for your reply and your kind words!

The airports used in the sample data come from all over the world. You'll find KLAS, KVGT & Co. in the list. Some data is updated manually, and some other is from automated stations. The aggregation service that I'm using at this point in time is NOAA: ftp://tgftp.nws.noaa.gov/data/observati ... r/stations. They have a decent amount of stations, and I simply used anonymous FTP to pull the entire dataset from them. Since I'm using real-world data as the source, it also means that, sometimes, the data is either corrupted, or entirely missing. Safeguards will be implemented. I had to manually scrap a few stations from the dataset, because some were reporting TAF advertised as METAR, or plain-text ATIS, or some pieces of data were corrupted mid-transmission to NOAA.

What I'm trying to create is a bastard information service for DCS. I'd like for it to have an aftertaste of real-life ATIS, and be as close as possible, while also making concessions in the name of the simulation, some because I have no other way around it (due to the way DCS manages the weather, or due to technical limitations), and some other concessions simply for the convenience and comfort of the virtual pilots. The resulting output (both text & voice) will be configurable by the end-user later as much as I can make it so.

Do not hesitate to throw all and any feedback at me, I'm entirely naive and uneducated on the subject and your knowledge is invaluable to me.

Cheers !
Image

Who is online

Users browsing this forum: No registered users and 1 guest

cron