As far as I'm concerned, the chain of command was what the writers (many of whom had no military experience whatsoever and didn't seem to check their facts properly) said it was and hence it tended to be story driven and retconed whenever they wanted. Okay bitch over.
In my game, the chain of command below the CO and XO are the First Lieutenant (the department head of the command branch) and then down through the Strategic Ops and Ops officers. After that its just seniority and qualification. I prefer to use a more free form command structure, the officer with the most experience in the mission and equipment should be in charge even if another officer on the mission team outranks him at least thats how the CO and XO run it in the game.
Arise, arise, Riders of Theoden!
Fell deed awake: fire and slaughter!
Spear shall be shaken, shields be splintered,
a sword-day, a red-day, ere the sun rises!
Ride now, ride now! Ride to Gondor!
Theoden King: The Return of the King