Jump to content

Aircraft assigned parking on top of each other (Broken parking spots exposed by getParking)


Mike64

Recommended Posts

Note: I'm a briefing room dev and we generate missions and sort parking with data extracted from https://wiki.hoggitworld.com/view/DCS_func_getParking
we use the "parking" we assign the "parking" lua value and the function doesn't provide "parking_id" ref: 


If the parking spot isn't configured correctly (Rampat David has a few missing 35-40 I think) the logic assigns the a parking spot but doesn't check if any other aircraft has already been assigned it. This leads to aircraft starting on top of each other.


Edited by Mike64
Link to comment
Share on other sites

All of the getParking spots returned seems to indicate they are correctly positioned. There is a size limitation with a lot of these and apparently spawning via script it ignores some of the restrictions causing issues. Spawning an F-16 at every spot works while using an A-10 can be problematic. Some A-10s spawned in locations to small and others were occupying the same space. Probably needs some of the spawning logic used on the carrier where it will delay aircraft from spawning if a valid parking isn't available. 

I made a feature request a while back to add a parameter to pass the aircraft you want to get valid spots for since Term_Type isn't as descriptive or standard as it needs to be. 

Screen_220426_181111.jpg

Screen_220426_181615.jpg

Screen_220426_182343.jpg

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

This mission is generated by my tool but based on the data from the function (note parking spots mentioned do not match the ones on the map that is `parking_id` which is not exposed by the function
E-3A parking position 38

	["type"] = "E-3A",
	["unitId"] = 28,
	["x"] = -258770.765625,
	["y"] = -75185.6875,
	["name"] = "Overlord 1 1",
	["heading"] = 1.633627839884963,
	["alt_type"] = "BARO",
	["livery_id"] = "default",
	["skill"] = "Excellent",
	["speed"] = 138.88888888889,
	["AddPropAircraft"] = {
		},
	["psi"] = 0,
	["payload"] = {
		["chaff"] = 120,
		["flare"] = 60,
		["fuel"] = 65000,
		["pylons"] = {
			},
		},
	["callsign"] = {
		[1] = 1,
		[2] = 1,
		["name"] = "Overlord10",
		[3] = 1,
		},
	["onboard_num"] = "961",
	["Radio"] = {
		},
	["parking"] = 38,
	},

Its spot is also occupied by a AH-1W Parking Spot 41
 

		[1] = {
	["type"] = "AH-1W",
	["unitId"] = 58,
	["x"] = -258765.28125,
	["y"] = -75105.5,
	["name"] = "Enfield 2 1",
	["heading"] = 2.9739903300826516,
	["alt_type"] = "BARO",
	["livery_id"] = "default",
	["skill"] = "Average",
	["speed"] = 138.88888888889,
	["AddPropAircraft"] = {
		},
	["psi"] = 0,
	["payload"] = {
		["chaff"] = 30,
		["flare"] = 30,
		["fuel"] = 1250,
		["gun"] = 100,
		["pylons"] = {
			[1] = {
				["CLSID"] = "{3EA17AB0-A805-4D9E-8732-4CE00CB00F17}",
				},
			[2] = {
				["CLSID"] = "\[M260_HYDRA}",
				},
			[3] = {
				["CLSID"] = "\[M260_HYDRA}",
				},
			[4] = {
				["CLSID"] = "{3EA17AB0-A805-4D9E-8732-4CE00CB00F17}",
				},
			},
		},
	["callsign"] = {
		[1] = 1,
		[2] = 2,
		["name"] = "Enfield20",
		[3] = 3,
		},
	["onboard_num"] = "016",
	["Radio"] = {
		},
	["parking"] = 41,
	}


Screen_220427_234644.pngScreen_220427_234647.png

Syria - Operation Frequent Brother.miz

Screen_220427_234628.png

Assuming I've screwed up and made a mistake then this is using "parking_id" same issues occur.

Syria - Operation Steady Support.miz

Link to comment
Share on other sites

Spot1.Coordinates=-258767.265625,-75132.0078125
Spot1.DCSID=40
Spot1.Type=UNKNOWN
Spot2.Coordinates=-258765.28125,-75105.5
Spot2.DCSID=41
Spot2.Type=UNKNOWN
Spot3.Coordinates=-258770.765625,-75185.6875
Spot3.DCSID=38
Spot3.Type=UNKNOWN
Spot4.Coordinates=-258767.265625,-75132.0078125
Spot4.DCSID=40
Spot4.Type=UNKNOWN
Spot5.Coordinates=-258765.28125,-75105.5
Spot5.DCSID=41
Spot5.Type=UNKNOWN
Spot6.Coordinates=-258763.28125,-75079.2890625
Spot6.DCSID=42
Spot6.Type=UNKNOWN
Spot7.Coordinates=-258684.96875,-74703.0078125
Spot7.DCSID=11
Spot7.Type=UNKNOWN
Spot8.Coordinates=-258826.5625,-74570.46875
Spot8.DCSID=12
Spot8.Type=UNKNOWN
Spot9.Coordinates=-258841.953125,-74549.3671875
Spot9.DCSID=13
Spot9.Type=UNKNOWN
Spot10.Coordinates=-258770.765625,-75185.6875
Spot10.DCSID=38
Spot10.Type=UNKNOWN
Spot11.Coordinates=-259899.4375,-74221.8125
Spot11.DCSID=47
Spot11.Type=AirplaneOnly
Spot12.Coordinates=-259878.71875,-74210.53125
Spot12.DCSID=46
Spot12.Type=AirplaneOnly
Spot13.Coordinates=-259919.453125,-74234.0234375
Spot13.DCSID=45
Spot13.Type=AirplaneOnly
Spot14.Coordinates=-259939.59375,-74245.90625
Spot14.DCSID=44
Spot14.Type=AirplaneOnly
Spot15.Coordinates=-259959.875,-74257.828125
Spot15.DCSID=43
Spot15.Type=AirplaneOnly
Spot16.Coordinates=-258763.28125,-75079.2890625
Spot16.DCSID=42
Spot16.Type=OpenAirSpawn
Spot17.Coordinates=-258765.28125,-75105.5
Spot17.DCSID=41
Spot17.Type=OpenAirSpawn
Spot18.Coordinates=-258767.265625,-75132.0078125
Spot18.DCSID=40
Spot18.Type=OpenAirSpawn
Spot19.Coordinates=-258769.078125,-75158.296875
Spot19.DCSID=39
Spot19.Type=OpenAirSpawn
Spot20.Coordinates=-258770.765625,-75185.6875
Spot20.DCSID=38
Spot20.Type=OpenAirSpawn
Spot21.Coordinates=-259269.84375,-75576.8203125
Spot21.DCSID=37
Spot21.Type=AirplaneOnly
Spot22.Coordinates=-259277.3125,-75543.53125
Spot22.DCSID=36
Spot22.Type=AirplaneOnly
Spot23.Coordinates=-259802.6875,-75081.9296875
Spot23.DCSID=35
Spot23.Type=AirplaneOnly
Spot24.Coordinates=-259785.734375,-75052.375
Spot24.DCSID=34
Spot24.Type=AirplaneOnly
Spot25.Coordinates=-259567.296875,-75468.484375
Spot25.DCSID=33
Spot25.Type=AirplaneOnly
Spot26.Coordinates=-259545.140625,-75441.203125
Spot26.DCSID=32
Spot26.Type=AirplaneOnly
Spot27.Coordinates=-259999.78125,-74810.203125
Spot27.DCSID=31
Spot27.Type=AirplaneOnly
Spot28.Coordinates=-259974.390625,-74785.578125
Spot28.DCSID=30
Spot28.Type=AirplaneOnly
Spot29.Coordinates=-258394.875,-75913.296875
Spot29.DCSID=29
Spot29.Type=AirplaneOnly
Spot30.Coordinates=-258415.015625,-76203.28125
Spot30.DCSID=28
Spot30.Type=AirplaneOnly
Spot31.Coordinates=-258390.296875,-76228.515625
Spot31.DCSID=27
Spot31.Type=AirplaneOnly
Spot32.Coordinates=-258909.03125,-74462.171875
Spot32.DCSID=26
Spot32.Type=OpenAirSpawn
Spot33.Coordinates=-258892.796875,-74483.296875
Spot33.DCSID=25
Spot33.Type=OpenAirSpawn
Spot34.Coordinates=-259322.9375,-74411.125
Spot34.DCSID=24
Spot34.Type=AirplaneOnly
Spot35.Coordinates=-259535.546875,-74323.1484375
Spot35.DCSID=23
Spot35.Type=AirplaneOnly
Spot36.Coordinates=-259876.1875,-74352.453125
Spot36.DCSID=22
Spot36.Type=AirplaneOnly
Spot37.Coordinates=-259300.5,-74383.8203125
Spot37.DCSID=21
Spot37.Type=AirplaneOnly
Spot38.Coordinates=-259533.484375,-74288.09375
Spot38.DCSID=20
Spot38.Type=AirplaneOnly
Spot39.Coordinates=-259885.6875,-74320.171875
Spot39.DCSID=19
Spot39.Type=AirplaneOnly
Spot40.Coordinates=-258360.25,-75909.640625
Spot40.DCSID=18
Spot40.Type=AirplaneOnly
Spot41.Coordinates=-258840.78125,-76822.9375
Spot41.DCSID=17
Spot41.Type=AirplaneOnly
Spot42.Coordinates=-258823.6875,-76847.84375
Spot42.DCSID=16
Spot42.Type=AirplaneOnly
Spot43.Coordinates=-258874.171875,-74506.359375
Spot43.DCSID=15
Spot43.Type=OpenAirSpawn
Spot44.Coordinates=-258858.09375,-74527.859375
Spot44.DCSID=14
Spot44.Type=OpenAirSpawn
Spot45.Coordinates=-258841.953125,-74549.3671875
Spot45.DCSID=13
Spot45.Type=OpenAirSpawn
Spot46.Coordinates=-258826.5625,-74570.46875
Spot46.DCSID=12
Spot46.Type=OpenAirSpawn
Spot47.Coordinates=-258684.96875,-74703.0078125
Spot47.DCSID=11
Spot47.Type=OpenAirSpawn
Spot48.Coordinates=-258928.6875,-75672.6171875
Spot48.DCSID=10
Spot48.Type=AirplaneOnly
Spot49.Coordinates=-258929.875,-75696.2421875
Spot49.DCSID=9
Spot49.Type=AirplaneOnly
Spot50.Coordinates=-258930.84375,-75719.875
Spot50.DCSID=8
Spot50.Type=AirplaneOnly
Spot51.Coordinates=-258932.171875,-75743.546875
Spot51.DCSID=7
Spot51.Type=AirplaneOnly
Spot52.Coordinates=-258930.734375,-75766.90625
Spot52.DCSID=6
Spot52.Type=AirplaneOnly

This dump is generated by this code:
 

function  briefingRoom.f10MenuCommands.debug.dumpAirbaseDataType(o)
 if o == 16 then return "Runway" end
 if o == 40 then return "HelicopterOnly" end
 if o == 68 then return "HardenedAirShelter" end
 if o == 72 then return "AirplaneOnly" end
 if o == 104 then return "OpenAirSpawn" end
 return "UNKNOWN"
end

function briefingRoom.f10MenuCommands.debug.dumpAirbaseParkingData()
  briefingRoom.debugPrint("STARTING AIRBASE PARKING DUMP");
  local base = world.getAirbases()
   for i = 1, #base do
      briefingRoom.debugPrint(base[i]:getID()..":\n")
      local parkingData = base[i]:getParking()
      local parkingString = ""
      for j = 1, #parkingData do
        if parkingData[j].Term_Type ~= 16 then
          parkingString = parkingString.."\nSpot"..j..".Coordinates="..parkingData[j].vTerminalPos.x..","..parkingData[j].vTerminalPos.z
          parkingString = parkingString.."\nSpot"..j..".DCSID="..parkingData[j].Term_Index
          parkingString = parkingString.."\nSpot"..j..".Type="..briefingRoom.f10MenuCommands.debug.dumpAirbaseDataType(parkingData[j].Term_Type)
        end
        if j % 10 == 5 then
          briefingRoom.debugPrint(parkingString)
          parkingString = ""
        end
      end
      briefingRoom.debugPrint(parkingString..";")
   end
   briefingRoom.debugPrint("DONE AIRBASE PARKING DUMP");
end

There are 3 occurrences of position 38 and what are the unknown spots I assume the docs are out of date. Even when I update my data and remove the unknowns and duplicates it still occurs.
I'm hoping I've made a dumb mistake somewhere because I'd love to have this issue solved. In grabbing the data for this I've managed to fix a bunch of bugs but in the end the issue is still there.
BTW this isn't just this airfield I've seen it on Caucuses too.


Edited by Mike64
Link to comment
Share on other sites

parking_id is just the value stored that is visually associated with the index. No clue why it is saved in the miz. It doesn't really have any bearing on what the actual parking index is. The printed values are the terminal index. At some bases like Beirut International they are labeled with the ramp area and a number (G20) for example, while others are just numbered. Point is those aren't the actual parking values and it is just for display. I am not certain if any of them are accurate to the actual ["parking"] = x, 

Screen_220427_204232.jpg

The unknown type: I could not replicate that at all. Though I did notice that parking indexes started at 0, but that value consistently belonged to a runway. Spent a bit of time and other variations trying to figure out why you got that result when I didn't. 

As for spawning it appears to be related to what was occurring in my test script/screenshots. It more or less comes down to the fact that each spawn point has certain dimensions for length, height, and width to limit what is allowed to spawn there. The type also limits helicopters from spawning in bunkers. Unexpected results occurred simply based on how you load the mission and what you spawned. I used Frequent Brother for my test. 

Loading into the editor it looks "fine" however loading into game and also selecting the units it changed the initial waypoint type for several units. In fact it changed them for every unit that the editor deemed was placed at a parking spot it shouldn't be allowed to park at. The A-10s, B-52, E-2, and E-3 were the main units that were automatically moved to airspawns. 

 Screen_220427_214925.jpg

Loading directly into the mission via Mission on the main menu the units get shuffled around as per your bug report. It looks like every unit that got moved exceeded the limit and possibly caused others like the AH-1 to be moved. 

Screen_220427_210440.jpg

Now here is the kicker and when things got really weird. I used my code that was spawning the aircraft to spawn E-3s. Remember that some of the A-10s were moved onto the same spot simply because it ran out of room. None of the E-3s were moved on spawn. My working theory is that since there are no spawn points of the correct size at Ramat David for the E-3 that it didn't know what to do and just allowed it to happen. 

5 hours ago, Mike64 said:

I'm hoping I've made a dumb mistake somewhere because I'd love to have this issue solved. In grabbing the data for this I've managed to fix a bunch of bugs but in the end the issue is still there.

I suppose it can be described as a Scripting problem and a spawn/map problem, with a tiny bit of a you problem. 

Scripting because we don't have the tools to get exact dimensions or are able to check if certain unit types are actually capable of spawning there. Outside of manually cataloging every single parking spot for what could be accepted there isn't a whole lot of recourse available until ED realize how dire we need certain API and add it. 

A spawn/map problem because the strict dimensions dictate where things can spawn at even though there may be ample ramp space with nothing physically blocking an aircraft from getting to the runway. According to the editor there are no spawn points on Syria that support a B-52. I think it is fair to say that Caucuses has more uniform spawn points and a majority of the bases could spawn a KC-135 sized aircraft. On Syria 8 of the ~60 bases support a KC-135. 

A you problem because you have done a great job making a mission generator, but that generator can build missions outside the rules of DCS. Sometimes thats great because the rules of DCS and the editor can work against you in terms of flexibility, but some of those rules have a purpose. I think you might have to just make exceptions for certain areas of a given map and just airspawn certain aircraft. However at least with spawning via script I was able to spawn B-52s at Incirlik on a few key spawn points and it worked. Whether saving them to spawn there in a miz and loading said miz would work, I couldn't say. 

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

  • 2 weeks later...
  • Recently Browsing   0 members

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