Pagnatious
New member
- Joined
- Mar 3, 2010
- Messages
- 24
- Reaction score
- 0
- Points
- 0
I'm working on and off on a basic solar system and ship simulation in 2D. My current problem is AI and planetary transfer calculations. For a given ship and a given delta-v I need to find the direction to burn the engines that will result in a rendezvous with a body. I have a version that works, kinda, but is rather brute force.
Close enough is defined currently as 80% of sphere of influence size. I need a way to make it more intelligent though, because it's kinda slow even for one ship, let alone several potential AI craft trying to calculate transfers at the same time.
I had looked into Lambert's Problem, but that seems to need to know the departure and arrival time and then determines the needed delta-v.
Is there a method that doesn't rely so much on just searching the space and more on analytical approach? Or at least might there be any suggestions to make that search more efficient? Any decent assumptions that could be made to narrow the range of angles?
Any help would be greatly appreciated.
Cheers
- For the ship it steps through all the angles calculating what the resultant velocity from expending the delta-v in that direction would be.
- Then it calculates the intersection points of the resultant orbit and the target's orbit.
- It then get's the times of intersection and compares the ships and targets position at that time to see if they are close enough to be considered an arrival.
- It does a few passes using small resolution in the angle steps and keeps the shortest travel time that gets close enough.
Close enough is defined currently as 80% of sphere of influence size. I need a way to make it more intelligent though, because it's kinda slow even for one ship, let alone several potential AI craft trying to calculate transfers at the same time.
I had looked into Lambert's Problem, but that seems to need to know the departure and arrival time and then determines the needed delta-v.
Is there a method that doesn't rely so much on just searching the space and more on analytical approach? Or at least might there be any suggestions to make that search more efficient? Any decent assumptions that could be made to narrow the range of angles?
Any help would be greatly appreciated.
Cheers