Optimal Path Planing?
Working out some rough equations for time optimal path planing.
Path{x} = f(x,t). x(vector) t(n)=maximum iterations.
dir{x}= src{x-1} - dest{x-1}/|src{x-1} - dest{x-1}|. #dir=unitvector
Velocity(x} = g(x,dir,rate) = x-1*dir*rate. #rate at t(x+1 < n)
+to iterate:
x+=1.
if src get-location = dest{x} : {
rate = (0,0,0). #Full Stop
}else{
distance{i} = src{x} - dest{x}. #Q1
}
if distance{x} > distance{x-1} : { # Q2
rate = Velocity(x}*{1.2,1.2,1.2}. #Q3
}else{
rate = Velocity(x}*{0.5,0.5,0.5}.
}
}
g(Velocity(x},dir{x},rate).
Q1: Is it more advisable to get vector normals with a dot products and measure the difference in distance from the current location to the path over the vector product? Would this help to increase precision by changing the rate? (e.g. Decreasing velocity at t(n-1) without over estimating the destination?)
Q2: Should a moving average of the distance{x+1,x+2,x+3}/3 decease as we approach the destination or as the time range approaches zero, t(x=n)?
Q3: As we adjust heading and velocity what is a good metric to increase velocity near the path before we reach the destination? (Example Q1: Dot Product Difference Ratios)
Any feedback is welcome. I should have put this post in Capture the Flag.
