Sunday, January 16, 2022

Rope based arresting system on Nimitz

 Rope based arresting system

With a recent update to Nimitz Experimental a rope based arresting system as implemented in Bon Homem Richard and MAAS previously was added to the Nimitz. It follows a description of the system.

The home of the rope based arresting system is in ttt_nimitzfunctions\fn_arrest_ropes, as well as the setup functions in jdg_carrier\functions\defaultInit.sqf.



fn_aircraftTailhook.sqf
    A compatibility function for BIS_fnc_aircraftTailhook that removes the hook up call in EXIT_CODE

fn_arrestEventsInit.sqf
    The system uses BIS scripted eventhandlers, which are set up here. The supported events are:
  • jdg_toggleTailhook
  • jdg_touchdown
  • jdg_abort
fn_caughtAnyWire.sqf
    Checks if the aircrafts tailhook is close to a wire. It relies on a hashmap of wires (_carrier getVariable "jdg_wireAreas") and then calls inPolygon to see if the tailhook is in the polygon defined by the wire.

fn_hasTailhookDown.sqf
    Checks if the tailhook is in down position. Either uses a simple tailhook mem point or whatever is defined in CarrierOpsCompatability.

fn_init.sqf
    Initialized the ctrl-shift-h tailhook toggle helper command.

fn_localWires.sqf
    When a plane from ttt_nimitz_planes is close to the wires of a carrier in ttt_nimitz_carriers this function is called where the plane is local to and checks if the tailhook grapples a wire via caughtAnyWire.

fn_toggleTailhook.sqf
    Simple function to lower or raise the tailhook, either via tailhook anim or as defined in CarrierOpsCompatability.

fn_touchdown.sqf
   The function that brakes the aircraft via setVelocity, pretty much a copy of BIS_fnc_aircraftTailhooks part of decelerating the plane.

fn_wireRopes.sqf
    Per frame function that checks if a plane from ttt_nimitz_planes is close to wires from ttt_nimitz_carriers. If close the localWires function is called on the system where the plane is located on. The use of two global arrays vs the use of nearEntities/nearObjects and so forth is done deliberately to give this function a speed advantage.

fn_wireRopesAttach.sqf
    Attach the ropes/wires onto the tailhook when the grappling of the tailhook to the wire was a success. Note that the ropes don't follow animations of the tailhook, unfortunately.

Cheers,
TeTeT

No comments:

Post a Comment