Real time weather (METAR) on your server missions HOW TO - Page 2 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 01-06-2018, 11:21 AM   #11
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,372
Default

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
Johnny_Rico is offline   Reply With Quote
Old 01-06-2018, 11:28 AM   #12
chromium
3rd Party Developer
 
Join Date: Dec 2008
Location: Milan
Posts: 3,366
Default

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.
__________________

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.
chromium is offline   Reply With Quote
Old 01-06-2018, 01:44 PM   #13
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,372
Default

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
Johnny_Rico is offline   Reply With Quote
Old 01-06-2018, 01:48 PM   #14
chromium
3rd Party Developer
 
Join Date: Dec 2008
Location: Milan
Posts: 3,366
Default

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.
__________________

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.
chromium is offline   Reply With Quote
Old 01-06-2018, 01:59 PM   #15
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,372
Default

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
Johnny_Rico is offline   Reply With Quote
Old 01-06-2018, 02:08 PM   #16
chromium
3rd Party Developer
 
Join Date: Dec 2008
Location: Milan
Posts: 3,366
Default

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.
__________________

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.
chromium is offline   Reply With Quote
Old 01-06-2018, 02:35 PM   #17
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,372
Default

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
Johnny_Rico is offline   Reply With Quote
Old 01-06-2018, 02:55 PM   #18
chromium
3rd Party Developer
 
Join Date: Dec 2008
Location: Milan
Posts: 3,366
Default

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

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.
chromium is offline   Reply With Quote
Old 01-07-2018, 12:07 AM   #19
Johnny_Rico
Senior Member
 
Johnny_Rico's Avatar
 
Join Date: Jul 2017
Posts: 1,372
Default

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
__________________
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

Last edited by Johnny_Rico; 01-07-2018 at 11:54 AM.
Johnny_Rico is offline   Reply With Quote
Old 01-07-2018, 11:22 AM   #20
chromium
3rd Party Developer
 
Join Date: Dec 2008
Location: Milan
Posts: 3,366
Default

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.
__________________

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.
chromium is offline   Reply With Quote
Reply

Tags
daws, dcs server, metar, real time, weather

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 05:20 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.