While you're questioning your assumptions
I think this is where I was trying to go with my post upstream about "why are weapons systems on the ground special". There was a post you made later that confused me (although I didn't press it) that you'd have to write a whole bunch of new code to manage manual targeting for ground unit. My confusion was that if ground unit weapons systems are really acting as those on ships, then you should be able to abstract out a "Naval Weapons Platform" interface and have ground unit fire go through the same code paths (and possibly even dialogs), so you shouldn't need to do a bunch of extra coding.
Let me push again on a previous suggestion: I suspect that if you have a special kind of HQ (that looks a lot like a naval bridge in terms of officer assignments etc.) then for combat purposes a ground unit under that HQ can be considered a ship with zero speed (in C# terms, the HQ object implements INavalWeaponsPlatform). For example (I think) this solves the CIWS problem - the CIWS is associated with the HQ, not the planet.
The reason I keep going down this road is because it feels like you're starting to hit logical problems with having two different weapons systems (naval vs. ground-based) that are supposed to be the same but have different rules. I think this is going to present you with both the PDC conundrum (lots and lots of special case code to manage "is the firing system on a ship or a ground unit") and the issues with early fighters and missiles (completely different rules for things that are essentially tiny ships). I think if you introduce the INavalWeaponsPlatform concept and a ground HQ unit that implements it, then the special-casing that you're forced into will be a natural extension of the differences between weapons on the ground and weapons on ships, as opposed to trying to mesh two fundamentally different implementations of the same mechanics.
That being said, one of those differences that might be hard to code up is that ground units can be reorganized on the fly, so the weapons and sensors attached to the ground HQ could change. If you've hard-wired a concrete "ShipClass" class into the combat mechanics, then I could see a lot of rewriting involved. I'm sure there are other spots I haven't thought of too. So even if you agree in principle about the HQ idea above, it still might be a lot of refactoring to get there. I'm sure there are other such things as well that I haven't thought of.
Yes, you make an interesting point. I started with the relatively simply idea of a weapon on the ground that could shoot into space. Then I added reactors, then fire control, then active sensors and I will probably need ECCM too. It is is becoming more detailed.
However, a lot of things are already setup to deal with different options. For example, I have a combat result object that accepts a chance to hit, a weapon, a target, etc. and then resolves the combat and allocates the damage (which is the more complex challenge). This can deal with any type of weapon against any type of target. The main issue for the STO weapons was deciding what to fire at and how the player should interact with the UI (so I could generate the combat result object).
One option I considered was to design a 'weapon mount' using the ship class design interface and make that an option for mounting on STO units. The formation element could then be a single ship with multiple weapons and fire controls, or a ground unit, depending on the context. That could then appear on the naval combat window. However, I am heading back down the PDC route then and would face the question of why other ship systems can't be in ground units. Currently STO is similar to CIWS in that it is an integrated system where design is automated. Also, it isn't completely straightforward in terms of integration with the naval combat window. BTW I know that isn't quite what you are suggesting - just a different way I could utilise existing code and mechanics.
The automated route I am currently heading down presents the player with a list of his STO elements and requests targeting type and the number of weapons per target. This will be acted upon in normal naval combat to generate the combat results. It should not be difficult to code and maintain the distinction between ground and ship in this scenario. I already have PD code which picks up the ground-based CIWS and could be easily adapted to STO-PD weapons. The STO vs ships is also straightforward with the automated targeting. This keeps the ground units distinct and relatively simple while giving them a real role in naval combat.
I think the area where your solution creates the greatest benefit is for manual targeting. I am bouncing back and forth on whether to implement this in addition to the automated targeting. In that case, I probably could add an interface to the ground unit that effectively creates a 'fire control' object that can display on the naval combat window.