Jump to content

Real time weather (METAR) on your server missions HOW TO


Johnny_Rico

Recommended Posts

I have wanted to get real time weather (METAR) data in our server missions

So ... I wrote a system to do it (it operates before DCS launches - DCS limitation)

 

I thought some other might want to use it, after all what is the point in creating

something and not sharing it with others.

 

I will keep one link with the most current up to date version in it -> https://github.com/shadowze/DCS_weather/releases

Do Not Redistribute (makes it easier to keep it up to date)

 

Features

 

  • Set real time in mission file (also presets are available - some people dont like flying in the dark)
  • METAR weather data from a selected airport(s) (you can set a primary and secondary airport to use)
  • 2 independant web sites to grab the data from (just incase one happens to be offline)

Thanks to Neon and Kenta for helping me test it out

 

Any bugs please give me a shout and I will fix them (as best I can)

 

The read me has detailed info on how to get his working, if you have any questions/suggestions just post a message on

this thread -> https://forum.dcs.world/topic/168761-real-time-weather-metar-on-your-server-missions-how-to

 


Edited by Johnny_Rico
  • Like 1

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

Sorry but I am running a 1.5.7 and 1.5.8 server not 1.5.6 (which DAWS weather works on)

 

Thanks for the link tho

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

  • 2 weeks later...

Is anyone using DAWS in their missions?

 

I am working editing this to make this DAWS compatible

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

Sorry but I am running a 1.5.7 and 1.5.8 server not 1.5.6 (which DAWS weather works on)

 

Thanks for the link tho

 

Thanks.

 

DAWS Weather won't be updated before 2.5 and some time after also. Check mainly the modded "module" files inside mission editor folder. Inside the old DAWS code you can search by text "DAWS" word: each added chunk start & end with that tag.

 

You might also have to deal with new mod structure, which is the reason that let me dump this version of weather and point right to integrate that into DAWS package.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

I got a DAWS mission file from Neon and have modified my script to

work out if it is a DAWS mission then write the new weather values back

to the DAWS mission differently than a normal mission file

 

Assuming that the format of how the weather is stored in the DAWS mission

file does not change this will most likely work ok

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

The weather info in DAWS Weather (or DAWS Package) is the very same of standard DCS weather table. It should works in any conditions, DAWS or not. In fact DAWS mission itself is a normal DCS mission file, no difference at all once loaded into the mission editor or by DCS.

 

This mod won't be compatible with future DAWS Package version when I will integrate weather update functionalities... but in the meantime it could be a valid solution.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

hmm I have never used DAWS but I got contacted by Neon who said my script would not work with DAWS missions

normal mission file data for wind section

 

["wind"] =

{

["at8000"] =

{

["speed"] = 0,

["dir"] = 0,

}, -- end of ["at8000"]

["atGround"] =

{

["speed"] = 0,

["dir"] = 0,

}, -- end of ["atGround"]

["at2000"] =

{

["speed"] = 0,

["dir"] = 0,

}, -- end of ["at2000"]

}, -- end of ["wind"]

 

DAWS mission file provided to me same section

 

mission["weather"]["wind"] = {}

mission["weather"]["wind"]["at8000"] = {}

mission["weather"]["wind"]["at8000"]["speed"] = 7

mission["weather"]["wind"]["at8000"]["dir"] = 273

mission["weather"]["wind"]["atGround"] = {}

mission["weather"]["wind"]["atGround"]["speed"] = 3

mission["weather"]["wind"]["atGround"]["dir"] = 270

mission["weather"]["wind"]["at2000"] = {}

mission["weather"]["wind"]["at2000"]["speed"] = 5

mission["weather"]["wind"]["at2000"]["dir"] = 264

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

once you open and save the daws mission in the editor, those would look the same (upper side).

"DAWS" format is only a different way to create the tables when the "mission" file inside the miz archive is written.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

so list 2 is what is the mission file inside the miz after DAWS has done its processing with it ?

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

list 2 is the saved "mission" file inside .miz archive when DAWS saves a mission. It automatically be converted to the list 1 format once the file is open & saved inside the mission editor.

 

If you immediately load the saved mission file, for DCS won't be an issue but it might be for your mode. So, your mod might work only if you open&save the DAWS's saved file in the mission editor before launching the mission.

 

I might say that if your mod does the same as daws weather did, so: load the "mission" file into a local table, process and sobstitute the env.mission.weather table with the one generated by metar lua parser, then re-save the "mission" file with a serializer you shouln't have any problem anyway.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

thanks for the info

open&save the DAWS's saved file in the mission editor before launching the mission.

^ yep that is exactly what I do (needs to update mission file before loaded into MP server

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

Than it's strange that your mod doesn't do the job with DAWS package saved files :noexpression:

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

It has to write different data for each file type due to DAWS changing things

 

I have a test version done , awaiting feedback from tester


Edited by Johnny_Rico

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

Then it's a different solution.

 

DAWS weather load the entire mission file, sobstitute the weather table, and rewrite the entire mission file. This way nothing changes because loading a table with list1 or list2 formats it's the same.

 

Maybe check DAWS_Weather_mul.lua file in the DAWS Weather old mod if you find issue in the testing.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

Thanks for the input

 

So to re-cap

 

List 1 default way DCS saves files

List 2 file after DAWS has modified it

 

DAWS and DCS can handle both versions

METAR weather for DCS World missions

 

Guide to help out new DCS MOOSE Users -> HERE

Havoc Company Dedicated server info Connect IP: 94.23.215.203

SRS enabled - freqs - Main = 243, A2A = 244, A2G = 245

Please contact me HERE if you have any server feedback or METAR issues/requests

Link to comment
Share on other sites

to recap:

 

list1 & list 2 are the same thing once loaded. They are written differently when it comes to file. Since DAWS & DCS load the tables before working on it, they can handle both and any other possible way to write the same thing.

 

If possibile it's safer that you could work on a loaded table imho.

ChromiumDis.png

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

  • 3 weeks later...

Due your instructions are not very clear.

What does this mean

 

After installing python open a dos window as admin and install requests using pip install requests

 

What requests?

 

2nd

 

Get an API key to grab real time weather from the internet from www.checkwx.com

- register an account and then login and go to www.checkwx.com/apikey

- fill in the details (remember to say non commercial use)

- might take up to 24 hours for him to activate it for you but you can check by going to

- https://www.checkwx.com/user/api once you have it copy paste it somewhere safe

- dont give your key out to anyone else you only get a certain amount of free reads per month

- Our server restarts 4 times per day every 6 hours, so we said we would only use about 200 per month

- when filling in the form

 

 

What API key are you talking about?

 

I really want to use this but need help with this.

 

UPDATE GOT THE KEY but still need help to install


Edited by uscstaylor
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...