Open muzhizhao opened 1 year ago
Is the horizontal velocity on the x-axis? Is the vertical velocity on the y-axis?
Hi !
"Is the horizontal velocity on the x-axis? Is the vertical velocity on the y-axis?"
This is an very good question ! Physicians reference is not the same as 3d graphicians reference.
Look: X axis is Red one, Y is Green one, and Z is Blue:
So,
Pitch attitude is the angle between Z axis and ground plane,
https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/source/Machines.py#L663
Roll attitude is the angle between X axis and ground plane.
https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/source/Machines.py#L670
I've just had problems reading the code and am having trouble understanding the following parameters: 1.
Aircraft.v_move
andget_planestate(plane_id)["move_vector"]
2.Plane_Euler= [plane_state["Euler_angles"][0] / NormStates["Plane_Euler_angles"], plane_state["Euler_angles"][1] / NormStates["Plane_Euler_angles"], plane_state["Euler_angles"][2] / NormStates["Plane_Euler_angles"]] 3.Plane_Pitch_Att = plane_state["pitch_attitude"] / NormStates["Plane_pitch_attitude"] Plane_Roll_Att = plane_state["roll_attitude"] / NormStates["Plane_roll_attitude"] Plane_Hor_Speed = plane_state["horizontal_speed"] / NormStates["Plane_horizontal_speed"]