Currently I'm working on an Air Traffic Controller mission for ArmA3 on Altis. So far planes get spawned North, East, South and West and also at the center airport. These are usually Buzzards, though if the F/A-18 mod from John_Spartan/Saul is detected, F/A-18E and F are added to the mix for some variety. With a basic GUI the player can command the planes to take off, exit the airspace at one of the above directions, or land at the airport or any of the airfields on Altis.
The Nimitz is not part of the mix, yet. What follows are some thoughts on adding it. First there needs to be a check if the config for the Nimitz is present or not. If it's present, I also want to check for FUTARM maritime units by BloodOfTheScribe. If present their appearance add a lot of atmosphere to the soldiers on the carrier.
Given the Nimitz mod is present, it needs to be spawned somewhere in the water. Ideally dynamically and not to close to the coast. For a start it will be just a single spawn position, marked by an empty helipad. A dynamic spawning function might look like this: Use the four exit markers N, S, W and E (also empty helipads) as a base. Create an offset of lets say 1 to 2km to the center from there. Use these points as base for picking a random position within a 2 -3 km circle and place the carrier there if the coast is more than 1km away. Disadvantage might be the lack of randomness in these position. Ideally I'd write a function that detects sea positions on a grid over the map and use these sea position as base, rather than the static setup of the exit helipads.
Once the Nimitz is on map I need a couple of helper helipads for the automatic landing procedure, namely Approach1, Approach2, Approach3. In the traffic mission I simple placed them on map manually. Placing them dynamically should be not much a of a problem, I like to use a macro named CIRCLEPOS2 for that. It takes a center position, a direction and a distance and returns a point x and y coordinates:
The Nimitz is not part of the mix, yet. What follows are some thoughts on adding it. First there needs to be a check if the config for the Nimitz is present or not. If it's present, I also want to check for FUTARM maritime units by BloodOfTheScribe. If present their appearance add a lot of atmosphere to the soldiers on the carrier.
Given the Nimitz mod is present, it needs to be spawned somewhere in the water. Ideally dynamically and not to close to the coast. For a start it will be just a single spawn position, marked by an empty helipad. A dynamic spawning function might look like this: Use the four exit markers N, S, W and E (also empty helipads) as a base. Create an offset of lets say 1 to 2km to the center from there. Use these points as base for picking a random position within a 2 -3 km circle and place the carrier there if the coast is more than 1km away. Disadvantage might be the lack of randomness in these position. Ideally I'd write a function that detects sea positions on a grid over the map and use these sea position as base, rather than the static setup of the exit helipads.
Once the Nimitz is on map I need a couple of helper helipads for the automatic landing procedure, namely Approach1, Approach2, Approach3. In the traffic mission I simple placed them on map manually. Placing them dynamically should be not much a of a problem, I like to use a macro named CIRCLEPOS2 for that. It takes a center position, a direction and a distance and returns a point x and y coordinates:
#define CIRCLEPOS2(p,d,r) CIRCLEPOS((p select 0), (p select 1), d, r)
#define CIRCLEPOS(x,y,d,r) [x+r*sin(d),y+r*cos(d)]
Once these points have been setup I need to integrate the traffic missions functions. The traffic mission generates flightpaths that have the plane take off, visit some waypoints and return to the carrier via the Approach helipads. This needs to be changed, as the flightpath now is determined by the planes tasking and the ATCs commands. So instead of a single control function, two needs to be present, one for take off and one for landing.
Next is a big question: Should the player grant the taxi and take-off permissions on the carrier, as at the airport, or leave it to the AI? I think the player should take over this part. However, right now it's different from the airport: At the airport when a parked plane gets a take-off permission, it taxis and takes off in one go; on the Nimitz the path is divided into legs and a plane needs to get permission for any single leg. Like first getting access to an elevator, then taxiing to the catapult, then take-off permission. Actually not a bad separation, so I probably add the dividing of paths to the airport later as well.
Given that planes now ask the ATC player for taxi and take-off permission, there needs to be a GUI for this. It needs to hold the following information: general name of the location (Nimitz, airport), current plane position (elevator, hangar, taxi lane, catapult, runway) and desired plane position (taxi lane, catapult, runway, take-off) and a button to grant permission to do so.
Once all of this is in place I'll write what worked and what not :)