Could you add the delta(rectified) option to the expression-chip. Would be really usefull.
Also messed around with your vector funktion, NICE.
Code:
N@Vector test
I@X1 X2 Y1 Y2 Z1 Z2
O@Pitch Yaw Distance
V1=vector(X2-X1, Y2-Y1, Z2-Z1)
Pitch=(vecpitch(V1)>180?-360+vecpitch(V1):vecpitch(V1))
Yaw=vecyaw(V1)-180
Distance=veclength(V1)
Will make a -180 to 180 pitch and yaw out of two points in space. And distance between them.
Messed around some more:
Code:
N@Vector test 2
I@X1 X2 Y1 Y2 Z1 Z2 Length
O@DX DY DZ
#First the vectors for the two GPS
VA****= vector(X1, Y1, Z1)
VB****= vector(X2, Y2, Z2)
#Then making the vector
V1****= vecsub(VA, VB) #Subtracting them
#Now for the normalization of the vector
V2****= vecnormalize(V1) #The normalized vector
#Now to put it to good use (hoverdrive)
V3****= vecsmul(V2, Length) #Length = distance in units the vector will be. Multiplying the normalized vector with the length.
Destination = vecadd(V3, VA) #Adding the new vector to the original position (point of origin).
DX****= vecx(Destination) #The X value for the destination
DY****= vecy(Destination) #The Y value for the destination
DZ****= vecz(Destination) #The Z value for the destination
And now you have a good hover drive expression-gate that teleports you a set distance forward.
This would be better if you could use the X Y Z values from the hover drive as the point of origin.
Bookmarks