Right lets put those thoughts aside... from the modellers points of view I propose that these are the only locators they will need to provide:
Assuming a 1 bay, 1 port spacestation:
This will come with some restrictions I think but for now lets handwavium those away and discuss how docking will work in our perfect utopian future.
Take the preview of nozmajners new spacestation:
There's an entrance and many bays.
So with this scheme all that Noz' has to do is place a correctly named locator in the centre of each landing bay, and then one more in the entrance to the station and that's it everything else is handled by the engine internally, hopefully reducing modeller workload by the maximum I can think of.
This is a little bit trickier but it work thusly:
- load the model as usual,
- read all "entrance_port_" tags
- read all "locator_port_" tags
- build the port/bay data structures
For the A.I. we'll need to do some more work. From the locator we can create another position which I will call the "hook" - this has the same orientation as the locator but it is offset from the locator along it's UP axis by some amount (I haven't decided how I'll determine this yet) so it's floating some distance above the landing pad. For the entrance I'll do the same thing but this time I'll generate 2 new positions that are hopefully on either side of the entrance and the offset will be along the FORWARD/BACKWARD axis.
As far as the code will care these new points will be just like the old "docking_" & "leaving_" locators that you currently have to place, so the autodocking should still work.
Without any other changes this would all just trigger EXACTLY like it currently does, so instead we'll need to also change it so that the auto-docking only happens if you've got the autopilot enabled. The "collision_pad_X" geometry will only have to cover the landing pad itself, like it does on the ground stations because this is the final trigger which says "Right I am really landed now!".
Hmm, there's some other details that will need working out but that's a decent incremental change I think.
I've been looking into the docking code tonight and it's just hideous to deal with, a real mind bender in places :/
I'll think more about it tomorrow but that should give us basic manual docking like we can with the ground stations, but the auto-docking should still work (ugly as it is) as it currently does.
EDIT:- updated with encoding the bay size in the locator name.