Mission for Training the Basics - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 12-12-2017, 12:23 PM   #1
SGT Coyle
Senior Member
 
Join Date: Dec 2011
Posts: 1,000
Default Mission for Training the Basics

Hey Folks,
Looking to make a training mission for pilots that are just starting or restarting after an absence from DCS, or looking for a mission to train on a new module, some basic functionality.

So where to start?

I'm thinking of a simple Navigation exercise that requires the pilot to use the various navigation aids / devices like CDU(A10C) or CK37(AJS37).

When the pilot spawns into the A/C of his choice(I set down all the current module types as clients). I want a welcome brief over the message system and a F10 Radio Option that lets the pilot choose what type of exercise to participate in(for now just simple navigation).


So my thinking was to place several trigger zones with a 20k radius around the map at varying distances to each other. Generate a random Long/Lat position from each zone and transmit those positions to the pilot to via the message system for he/she to make a flight plan with the various a/c instruments/devices. The idea is to be as flexible as possible from the pilot point of view.

So what I'm having trouble getting my head around is:
  1. How to generate the positions from the trigger zones (or weather there would be a better way to do it).
  2. How to communicate those positions to the pilot through the message system.
Another question would be, is there a way to list those positions in th epilots knee board?


Any thoughts or advise would be appreciated. I haven't completely articulated my thoughts about the mission, but thought this would be a good place to start.


I have a limited grasp on the LUA and scripting in gereal, so any help with that in mind would be helpful.


Thanks,
__________________
Got this from my son (My cousins son), who is tracking data for United HealthXXX;
Please take this virus very seriously. The data I'm seeing, calls I'm on today..they are not good and now I'm I'm seeing co-workers being affected.. seriously affected in the hospital. People in their 30s and 40s. Wash your hands and stay at home as much as possible.
No Joke People.
SGT Coyle is offline   Reply With Quote
Old 12-13-2017, 12:18 AM   #2
ESAc_matador
Senior Member
 
Join Date: Aug 2007
Posts: 1,563
Default

check this...

https://forums.eagle.ru/showthread.php?t=172869
ESAc_matador is offline   Reply With Quote
Old 12-13-2017, 11:32 AM   #3
SGT Coyle
Senior Member
 
Join Date: Dec 2011
Posts: 1,000
Default

Quote:
Originally Posted by ESAc_matador View Post
Thanks ESAc_matador,

I looked at that and it is a great idea, but what I'm going for is more of a generic open sandbox. I don't intend to have way points or flight plan laid out for the pilot. All mission planning should take place in the cockpit. The destination coordinates will be generated after mission start and given to the pilot, in the form of Lat/Long coordinates, after engine startup prior to request for taxi. Or something like that.

Do you have a particular mission, out of the "Interesting Mission Generator", I should look at that does something like what I'm trying to do?
__________________
Got this from my son (My cousins son), who is tracking data for United HealthXXX;
Please take this virus very seriously. The data I'm seeing, calls I'm on today..they are not good and now I'm I'm seeing co-workers being affected.. seriously affected in the hospital. People in their 30s and 40s. Wash your hands and stay at home as much as possible.
No Joke People.
SGT Coyle is offline   Reply With Quote
Old 12-21-2017, 02:58 AM   #4
SGT Coyle
Senior Member
 
Join Date: Dec 2011
Posts: 1,000
Default

Can someone give me an example of how to use the function trigger.misc.getZone?

I have a trigger zone named "BNE_WayPoint_1" and I'm trying to use it in the editor with DO Script. and have the return sent as message.

Code:
local WP1 = trigger.misc.getZone('BNE_WayPoint_1')
trigger.action.outText(WP1)
__________________
Got this from my son (My cousins son), who is tracking data for United HealthXXX;
Please take this virus very seriously. The data I'm seeing, calls I'm on today..they are not good and now I'm I'm seeing co-workers being affected.. seriously affected in the hospital. People in their 30s and 40s. Wash your hands and stay at home as much as possible.
No Joke People.
SGT Coyle is offline   Reply With Quote
Old 12-21-2017, 06:40 AM   #5
Grimes
Beta Tester
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 8,319
Default

trigger.misc.getZone() returns a table of the trigger zone showing the center of the zone and the radius.

So if you used a trigger.action.outText(WP.radius, 20) would return whatever the value for its radius is set to.
__________________
The right man in the wrong place makes all the difference in the world.
Current Projects: Scripting Wiki, Something...
Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD for DCS 1.5/2.0, IADScript, Mission Editing Wiki!, Mission Building Forum
Grimes is offline   Reply With Quote
Old 12-21-2017, 01:00 PM   #6
SGT Coyle
Senior Member
 
Join Date: Dec 2011
Posts: 1,000
Default

So trigger.misc.getZone returns a table of:
point = Vec3
radius = distance

The example you gave with radius worked fine, but what about the point variable? When I use point in place of radius I get an error that crashes the game.

So looking more closely at your example I added another "." after the point variable and a variable of Vec3 table. In this case "x". It did indeed give the x position of the Vec3 point of the trigger zone I was working with.

So in the "DO Script" text box:
Code:
WP1 = trigger.misc.getZone('BNE_WayPoint_1')
trigger.action.outText(WP1.point.x,20)
trigger.action.outText(WP1.point.z,20)
trigger.action.outText(WP1.radius,20)
trigger.action.outText(WP1.point.y,20)
Returns the x and z variables of the Vec3 table, and the y at the end, and the radius line by line.

Grimes, thanks for the example. It helped a lot.

Now that I have the Vec3 position of my trigger (BNE_WayPoint_1), how do I work that into coordLOtoLL

I tried adding:
Code:
LL1 = coord.LOtoLL(WP1)
trigger.action.outText(LL1.latitude,20)
But it caused error and crashed game.




__________________
Got this from my son (My cousins son), who is tracking data for United HealthXXX;
Please take this virus very seriously. The data I'm seeing, calls I'm on today..they are not good and now I'm I'm seeing co-workers being affected.. seriously affected in the hospital. People in their 30s and 40s. Wash your hands and stay at home as much as possible.
No Joke People.

Last edited by SGT Coyle; 12-21-2017 at 01:51 PM.
SGT Coyle is offline   Reply With Quote
Old 12-21-2017, 10:18 PM   #7
Grimes
Beta Tester
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 8,319
Default

That specific function returns multiple values.

local lat, lon = coord.LO.toLL(WP1.point)
trigger.action.outText('Latitude: ' .. lat .. ' ' .. 'Longitude: ' .. lon, 20)
__________________
The right man in the wrong place makes all the difference in the world.
Current Projects: Scripting Wiki, Something...
Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD for DCS 1.5/2.0, IADScript, Mission Editing Wiki!, Mission Building Forum
Grimes is offline   Reply With Quote
Old 12-22-2017, 12:04 PM   #8
SGT Coyle
Senior Member
 
Join Date: Dec 2011
Posts: 1,000
Default

Quote:
Originally Posted by Grimes View Post
local lat, lon = coord.LO.toLL(WP1.point)
To many dots. Took me awhile to figure that out. Should be:
Code:
local lat, lon = coord.LOtoLL(WP1.point)
That worked afaik. Gave me something unexpected.

lat 44.95393565325
lon 35.37807458675

So I take it there's going to be some mathematical conversion necessary to get this in the form of Degree/Min/Sec ? LoL

...and I'm starting to think this is going to be a Lua file, not just the editor text box.

OK, I copy pasted into a .lua and it worked as before.


Quote:
Originally Posted by SGT Coyle View Post
I have a limited grasp on the LUA and scripting in gereal, so any help with that in mind would be helpful.


Thanks,
I thought I had limited grasp on Lua. I actually have no idea. Lol!
__________________
Got this from my son (My cousins son), who is tracking data for United HealthXXX;
Please take this virus very seriously. The data I'm seeing, calls I'm on today..they are not good and now I'm I'm seeing co-workers being affected.. seriously affected in the hospital. People in their 30s and 40s. Wash your hands and stay at home as much as possible.
No Joke People.

Last edited by SGT Coyle; 12-22-2017 at 12:33 PM. Reason: I'm and idiot
SGT Coyle is offline   Reply With Quote
Old 12-22-2017, 06:51 PM   #9
Igneous01
Member
 
Join Date: Dec 2014
Posts: 125
Default

Honestly just use MOOSE - it has prebuilt functions that return lat long translated as North-Easting + MGRS:

Code:
  local myZone = ZONE:New("ZoneName")
  local coordinates = myZone:GetCoordinate()
  local LatLong = coordinates:ToStringLLDDM()
  local MGRS = coordinates:ToStringMGRS()
  local vec3 = coordinates:GetVec3()
  local X = vec3.z  -- map coordinates are messed up in DCS - the z and x points are your x,y coordinates on a 2d map
  local Y = vec3.x
You can find more info about the Coordinate functions available here:

http://flightcontrol-master.github.i...tml#COORDINATE

Last edited by Igneous01; 12-22-2017 at 06:56 PM.
Igneous01 is offline   Reply With Quote
Old 12-22-2017, 09:14 PM   #10
SGT Coyle
Senior Member
 
Join Date: Dec 2011
Posts: 1,000
Default

I looked at Moose, but quickly got intimidated. I also started looking into MIST. It's got some, what look to be helpful functions too.

I'll try MOOSE tonight.6
__________________
Got this from my son (My cousins son), who is tracking data for United HealthXXX;
Please take this virus very seriously. The data I'm seeing, calls I'm on today..they are not good and now I'm I'm seeing co-workers being affected.. seriously affected in the hospital. People in their 30s and 40s. Wash your hands and stay at home as much as possible.
No Joke People.
SGT Coyle is offline   Reply With Quote
Reply

Tags
training

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 03:00 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.