[MOOSE] RAT - Random Air Traffic - Page 4 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 10-19-2017, 09:37 AM   #31
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,317
Default

Good questions
Quote:
Originally Posted by RyboPops View Post
1) Let's say I want to use the same departure and destination airport. If I add a minimum distance, will RAT simply ignore it since the departure and destination are the same, or will it generate a random flight path to meet that minimum distance requirement?
At the moment, I explicitly exclude the case that departure and destination airports are the same. One reason is the way the waypoints are created. That would not work too well for that scenario - or at least I have not tested it.

Another reason is this:
Consider you want to restrict the departures and destinations like
Code:
RAT:SetDeparture({"Airport A", "Airport B", "Airport C"})
RAT:SetDestination({"Airport A", "Airport B", "Airport C"})
So basically you want to limit airports to those three. Normally, when Airport B is randomly selected as departure, you don't want it to be randomly selected as destination as well.

I guess I could allow identical departure and destination if only one destination is explicitly given by the user as
Code:
RAT:SetDeparture("Airport A")
RAT:SetDestination("Airport A")
No guarantee though that the waypoints are well placed in that case But the aircraft would return to its original base somehow.

I'm thinking about implementing zones defined in the ME as destination. Then either the aircraft get despawned when they are in the zone. Or they would turn around and fly back to their departure airport. But it requires some changes in the logic the waypoints are created.

So at the moment, the only option to let aircraft fly back to their departure airport is with an intermediate stop via the Commute() option.
Code:
RAT:SetDeparture{"Airport A")
RAT:SetDestination("Airport B")
RAT:Commute()
(You don't need to set the destination. If you don't specify it, the first destination is chosen randomly and then the aircraft will fly back and forth between Airport A and a random but fixed other airport.)
Quote:
Originally Posted by RyboPops View Post
2) What is the difference between SetClimbRate and Vclimb? The descriptions in the documentation are nearly the same, although I suspect SetClimbRate is supposed to be the climb rate, and Vclimb is supposed to be the climb speed. Are both of these functioning? If Vclimb works, I'm assuming the parameter it wants is desired airspeed in knots?
There is no difference between SetClimbRate and Vclimb. SetClimbRate just sets the value of Vclimb
Default is 1500 ft/min (= 7.6 m/s). So the unit you have to use for SetClimbRate is ft/min.

Note that I (or anyone) don't have control about the actual climb rate of the AI aircraft. The climb rate determines the location of the waypoints assuming that the AI will fly there in a straight line in 3D space. Unfortunately, that is not always the case as I have reported here. Hope it gets fixed soon
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Old 10-19-2017, 12:43 PM   #32
Looney
Senior Member
 
Looney's Avatar
 
Join Date: Mar 2011
Posts: 1,097
Default

Is it possible to increase the max FL for the aircrafts to, let's say; FL320? Most airliners fly around that ballpark figure?
__________________


Commodore 64 | MOS6510 | VIC-II | SID6581 | DD 1541 | KCS Power Cartridge | 64Kb | 32Kb external | Arcade Turbo
Looney is offline   Reply With Quote
Old 10-19-2017, 01:06 PM   #33
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,317
Default

Quote:
Originally Posted by Looney View Post
Is it possible to increase the max FL for the aircrafts to, let's say; FL320? Most airliners fly around that ballpark figure?
Yes, you can do
Code:
YourRATobject:SetFLcruise(320)
This would the "default" flight level so that value. The final choice is still random But most aircraft will travel at or near that height.

Also, the distance between departure and destination has to be large enough. If a destination is picked close to the departure, then the aircraft can not reach that altitude and the actual flight level is automatically adjusted.

You can allow only airports which are at least a certain distance away from the departure by
Code:
YourRATobject:SetMinDistance(200)
Here only destinations 200 km away from the departure a chosen.
But you have to be a bit careful. It can happen, that no airports are that far away. DCS maps are not too large
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Old 10-19-2017, 02:29 PM   #34
Gary
Member
 
Join Date: Oct 2008
Location: South East England
Posts: 463
Default

Ok,

So I have a number of RAT's now in my basic mission set up (mostly C130's and AJS37's) and it occurs to me that it would be really cool to explore the use of Moose for some suitable comms?

My RAT's get clearance from ATC to land (text box upper right) and I wondered if there was a way to trigger a sound file when these come up?

If not, I'm interested in any use of Moose that might improve the ATC? - calls wouldnt necessarily have to be 100% accurate in order to improve the sense others were "out there" IMHO

Regards,

Gary
__________________
I5 - 1TB SSHD, 256 SSD - Nvidia 1070 - 16gb ram - CV1
Gary is offline   Reply With Quote
Old 10-19-2017, 07:27 PM   #35
RyboPops
Member
 
RyboPops's Avatar
 
Join Date: Oct 2016
Location: CO
Posts: 312
Default

Thanks for the info! I hadn't thought of using commute, that will certainly work for my purposes. I'm simply making a Red Flag scenario and I want a moderate amount of air traffic flying in and out of Nellis, McCarren, and Tonopah to give the scenario a lively feel.

Cheers!
__________________
Virtual 57th Wing

http://www.virtual57.com

https://discord.gg/nEtNQT
RyboPops is offline   Reply With Quote
Old 10-19-2017, 07:35 PM   #36
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,317
Default

Quote:
Originally Posted by RyboPops View Post
Thanks for the info! I hadn't thought of using commute, that will certainly work for my purposes. I'm simply making a Red Flag scenario and I want a moderate amount of air traffic flying in and out of Nellis, McCarren, and Tonopah to give the scenario a lively feel.
Ah, great to hear! I already have an option in my development version which includes going to a zone and back

But let me know how your missions are going. AI behavior on NTTR airports can be challenging
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Old 10-20-2017, 04:15 AM   #37
RyboPops
Member
 
RyboPops's Avatar
 
Join Date: Oct 2016
Location: CO
Posts: 312
Default

Missions are great so far! I haven't had this much fun in DCS in a long time, so thanks again for your great work.

I think the biggest thing holding RAT back right now is the single runway use. If ED could resolve that and add more parking to KLAS, the possibilities would be absolutely incredible.
__________________
Virtual 57th Wing

http://www.virtual57.com

https://discord.gg/nEtNQT
RyboPops is offline   Reply With Quote
Old 10-20-2017, 07:32 AM   #38
RyboPops
Member
 
RyboPops's Avatar
 
Join Date: Oct 2016
Location: CO
Posts: 312
Default

A few more questions after tonight's scripting session:

1) How should RAT respond to combining SetTakeoff("air") and SetMinDistance(100)?

2) When using SetTakeoff("air") is there a way to force them to spawn at a particular altitude?

3) Is RespawnAfterLanding() necessary when setting ContinueJourney? Will aircraft respawn in the exact parking spot they were last in?

4) Is there a proper order to write the various commands? My order so far has been roughly in the same sequence of events that the aircraft would experience in flight.

5) Say I want to have some 737s spawn in the air, and have others spawn cold at airports. Can I just simply declare two different locals using the same 737 from mission editor? For example:
Quote:
local B737_ground=RAT:New("RAT_737")
.
.
.

local B737_air=RAT:New("RAT_737")
.
.
.
I'm having such a a blast learning this stuff. Cheers!
__________________
Virtual 57th Wing

http://www.virtual57.com

https://discord.gg/nEtNQT

Last edited by RyboPops; 10-20-2017 at 07:48 AM.
RyboPops is offline   Reply With Quote
Old 10-20-2017, 09:20 AM   #39
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,317
Default

Again, great questions!

Quote:
Originally Posted by RyboPops View Post
1) How should RAT respond to combining SetTakeoff("air") and SetMinDistance(100)?
2) When using SetTakeoff("air") is there a way to force them to spawn at a particular altitude?
First, SetTakeoff("air") is very much work in progress. I have already improved it a lot in my development version. For example the way the waypoints are set had to be changed. This is because there is no real "climb" part when you spawn in air.

1) The aircraft should spawn in air at a random point within the trigger zone and the destination airport should be at least 100 km away from that point.
2) The altitude at which the aircraft are spawned is set to be 70% of the "default" cruise altitude but then randomized by 30%. So at the moment, you cannot directly set it. But you can influence it via the SetFLcruise() function since they will spawn near that value. Would you prefer to set it directly?

Quote:
Originally Posted by RyboPops View Post
3) Is RespawnAfterLanding() necessary when setting ContinueJourney? Will aircraft respawn in the exact parking spot they were last in?
No, ContinueJourney() does work without RespawnAfterLanding(). Without it a "clone" will be respawned after the original was despawned. But generally at a different parking position. I think there is no way to read out the parking position an aircraft gets when it has arrived. So no way to let the clone spawn at the same spot.

Initially, I introduced RespawnAfterLanding() because on NTTR there are many airports where bigger aircraft have no valid parking. The DCS solution if they land is to despawn them right after the landing event. Probably because that prevents the aircraft to hit static buildings on their way to the parking spaces or other things that could go wrong.
With RespawnAfterLanding() you can at least have another plane being spawned at these airports when the original gets despawned after the landing event. But then it would probably be spawned on the runway because it would also not have a parking position. And that might lead to trouble.
So to be safe, one should exclude airports where planes have no parking position.

Quote:
Originally Posted by RyboPops View Post
4) Is there a proper order to write the various commands? My order so far has been roughly in the same sequence of events that the aircraft would experience in flight.
No, the order should not matter. The only very important restriction is that Spawn() has to be last. And Spawn() should only be used once per RAT object.

Quote:
Originally Posted by RyboPops View Post
5) Say I want to have some 737s spawn in the air, and have others spawn cold at airports. Can I just simply declare two different locals using the same 737 from mission editor?
Yes, you can reuse the same template and give it different tasks and options. But you have to give each RAT object a unique alias.
Code:
local B737_ground=RAT:New("RAT_737", "B737 Ground")
.
.
B737_ground:Spawn()
local B737_air=RAT:New("RAT_737", "B737 Air")
.
.
 B737_air:Spawn()
So the alias is simply a second argument in the New() constructor. It's important to set that if you reuse the same template. Otherwise things like the F10 menu get screwed up.
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Old 10-20-2017, 06:26 PM   #40
RyboPops
Member
 
RyboPops's Avatar
 
Join Date: Oct 2016
Location: CO
Posts: 312
Default

Thanks for the detailed responses, they're very helpful.

Regarding the air start, yes I would love to be able to manually define the altitude for an aircraft to start. I'm hoping to eventually be able to generate several "sets" of traffic: airport to airport, air spawn to airport to air despawn (for the big heavies that only have the option of landing/departing at KLAS) and overhead transient traffic that is simply spawning in the air, and flying to a random trigger zone at cruise altitude and then despawning, creating the illusion of traffic cruising on the airways above NTTR. Hopefully that makes sense.
__________________
Virtual 57th Wing

http://www.virtual57.com

https://discord.gg/nEtNQT

Last edited by RyboPops; 10-20-2017 at 08:06 PM.
RyboPops is offline   Reply With Quote
Reply

Tags
moose, random air traffic, rat

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 10:46 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.