@matskosan How are you going with this? I'm trying to solve a very similar problem! Just without the goal of stopping on a position; more like passing through it with some desired velocity, and I also have orientation constraints like you (namely, at present, the ability to thrust only in a ship's forwards dir, for initial simplicity). As well as maximumDegPerSecond for rotation and maxSpeedChangePerSecond for linear movement (rather than going as far as trying to apply forces/accelerations, even if that's “better”. I have enough to worry about!). Trying to avoid real-life spaceship control theory as that seems nuts and way overkill when we could, potentially, touch velocity directly by “magic” but still respect constraints and give weighty movement.
I'm trying to change my iterative approach that kind of abuses my math functions to push the ship in a direction, eventually by way of clamping slowly chipping away at velocity's other directions until it's only going forwards, to something more numerical, kinda like what you're saying.
I'm thinking;
- We have current position P1 with initial velocity V1, and target position P2 (ideally with target velocity V2 but unsure how to use it atm)
- We find some velocity that gets us from P1 to P2 (somehow clamping to our linear speed limits)
- We calculate numTicks to turn to face opposite the velocity component we're trying to cancel out, then the number of ticks to actually cancel it out
- We repeat the same for the other velocity component
- Thus predicting the path becomes a few additions of time/ticks, and while it isn't a single equation, it's at least not 100% iterative (which is my current solution, and even one ship turning kills the frametime)
I'm not sure yet how to incorporate a target speed/velocity/direction into the point intersection, nor how to find the “optimal” path. How did you go? We can share notes and implementations if you'd like - I know how hard it can be to get assistance with such a weird problem! Cheers.