Jump to content

Airbase, new scripting function getRunways for Airbase DCS object


sunski34

Recommended Posts

Hi,

 

I saw a new function getRunways for Airbase object in DCS Scripting function, without documentation.

 

This function returns a indexed table started at 1 for each runway of an Airbase with course, center of runway, length and width. course value seems strange because to have the good heading, you must set heading = - course (in rad). The last value is Name strange too.

 

But, you can now define a rectangle for each runway of an airbase. I tested it on Caucasus and Nevada (Nellis) and it's correct 😉

 

Hope that we can have soon ILS, for each side when existing.

 

Pretty cool thanks.

 

Sun

 

 

Link to comment
Share on other sites

Yeah it was returning nothing for a few patches so I never documented it. Since it is working now I add a page for it. 

  • Thanks 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Great stuff! So far I had to use the runway spawn points to get the directions. But with multiple runways the order of the spawn points was a bit random so it always required a bit adjustment by hand to get it all right.

 

Now what would be the icing on the cake would be an entry in the returned table that tells us, which runway is the active one 🙂

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

  • 2 months later...

Hello all. what is the logic regarding defaut activ runway, i used to think first in list returned by getRunways  is defaut except if wind is >3m/s then atc will use reverse RWY in some case. but what is the rule regarding two parallel RWY like Andersen, or Nellis ?   is there a way to know defaut Take Off one, from defaut Landing One regarding order in getRunway, ?

 

 

 i7-10700KF CPU  3.80GHz - 32 GO Ram - - nVidia RTX 2070 -  SSD Samsung EVO with LG  TV screen 40"  in 3840x2150 -  cockpit scale 1:1

- MS FFB2 Joystick  - COUGAR F16 throttle  - Saitek Pro Flight Rudder Pedals

 

Link to comment
Share on other sites

  • 11 months later...

Okay @Grimes I'm having trouble with this.

The documentation at: DCS func getRunways - DCS World Wiki - Hoggitworld.com

Says that for each 'runway' it will give you a table with two elements, i.e. Al Minhad has 09/27.

But when I do this code, I only get 27:

 

    local runways = Airbase.getRunways(newPlayerData.homeBase)
 
    local runwayNames = {}

    for _, runway in ipairs(runways) do
        if runway then
            table.insert(runwayNames, runway.Name)
        end
    end

Has this function changed so you have to do the reverse manually?

Also, the documentation states that you should multiply by -1 as this will be useful - why? What does this do for you?

 

EDIT: I think this is actually bugged.

If we take Shiraz International Airport as the example, then it has two runways 11L/29R and 11R/29L, yet the above code only reports two runways (29 and 11) 

The Name field makes no distinction between Left and Right and it certainly doesn't give the reverse runway like the example table shows it should in the documentation. 

If I may, could you please get an update on this asap? This (and the Trigger event) are blocking me. Thanks.


Edited by Elphaba
New Info
Link to comment
Share on other sites

It doesn't list the reciprocal heading of a runway, it just lists it the one time. The runway name and course given is likely the default runway value given no wind. 

The example on the wiki has two runways. I should probably figure out which airbase I grabbed that data from. 

Yeah the course is still bugged. Example below is drawn with red using the raw course value with grey being multiplied by -1.  Also note that the game doesn't consider the other runway to be a runway. Which is more of a map setup issue than anything else. They removed multiple runway functionality on Caucasus a long time ago. 

Screen_221012_170753.jpg

  • Thanks 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • Recently Browsing   0 members

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