Hi again, I still have problems with calculating proper forces for my jet motion. I can’t find any revelant data that could help me so I came with my own conclusions.
i use forumla: (i aplly all forces every frame)
dt = timebetween_frames;
Acceleration = (drag+lift+thrust+gravity) / mass; //vector
pos = pos + (vel * dt); //vector
vel = vel + (Acceleration * dt); //vector
so lets take a look at first image you can see 4 lines there (red – drag, yellow – velocity, pink – thrust, green – lift)
Main problem for now is wrong calculation of velocity vector since drag doesn’t make velocity vector to cover with thrust vector (which is the pitch vector of the jet) , so the problem is right there calculation of drag and lift vectors (and maybe the rotation itself which for now I don’t know really how to handle)
You can take a look to see how the jest behaves (don’t mind when you will see that jet before takeoff looses velocity from 140 to 40 m/s it was a collision bug which is now fixed)
Velocity vector is always above thrust and i cant make angle of attack smaller than 20 degress and that means why do i even need it when its useless here ;]
Jet goes up whenever it should go almost straight forward or go down..
Now when you see that velocity vector almost never reaches thrust vector , the angle of attack itself is way too big to generate proper lift coefficient (which is 1.72 at 20 degrees and 0.5 at 0 degrees) whenever it reaches beyound -5 – 20 degs its set to 0.2
Still angle of attack is the angle between thrust vector and velocity vector, because when wind (practically theres no wind and no wind means wind moves with speed less than 7 km/h)
does not move the wind direction itself should be Normalized(–thrust_vector ) – be aware I don’t use –thrust_vector but the thrust_vector normalized itself I think the angles are the same with or without -.
So even when lift coeff is 0.2 it produces too much lift (maybe too much or the drag itself is calculated wrong)
Also they say lift is prependicular to plane pitch ? or was it velocity vector but since they do not say if then lift is situated to the right or to the left or its upsidedown or what I calculate the lift vector direction by getting vehicle pitch and right vectors and making a cross product of that so the lift always acts in the up direction relative to vehicle matrix)
DRAG:
I divided drag into three main forces (slide ‘drag’ forces)
They match the axes of an aircraft take a look at thick lines:
Green – front drag – front area
Red – side drag – side area
Yellow – top drag – top area
Soo again take a look at the picture
Velocity vector is acting somehow up so the most acting drag in this case it top drag
then front drag, and side drag do not acts. To find how much drag is produced for these surfaces I used dot product for that.
Since they say drag acts only in the opposite direction that object is moving (velocity vector)
dotfront = absnf(Dot(Normalize(Thrust),veln));
dotup = absnf(Dot(updir,veln));
dotside = absnf(Dot(sidedir,veln));
//nothe that drag coeff are fixed
FRONT_DRAG = Normalize(-vel) * dotfront * (0.080 * ((dens * squareSpeed)/2.0) * FRONT_AREA);
SIDE_DRAG = Normalize(-vel) * dotside * (0.50 * ((dens * squareSpeed)/2.0) * SIDE_AREA);
TOP_DRAG = Normalize(-vel) * dotup * (1.10 * ((dens * squareSpeed)/2.0) * TOP_AREA);
DragForce_vec = FRONT_DRAG + SIDE_DRAG + TOP_DRAG;
Now to simplify that: if you take a look at that picture with thick lines every thick line is dotted with velocity vector and that says how much surface drag we will produce so when jet is falling straight down without any rotations only the top area drag acts with full force
Anyway heres another video, short one showing what I get
When lift produces the force that moves velocity vector up the drag should it somehow negate but it doesnt work.
I am completely out of ideas how could I fix this.