You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to understand the workings of the code and writing an agent myself, I noticed certain inconsistencies in the parameters defined in parameters.py file and value assignment to those variables in xplane_envBase.py file.
In Line 14 of parameters.py file state14 is defined as: "state14" :{"roll_rate" :0 ,"pitch_rate" :0, "altitude": 0 ,"Pitch" :0 ,"Roll" :0, "velocity_x": 0, "velocity_y" :0 ,"velocity_z" :0 ,"delta_altitude" :0, "delta_heading" :0 ,"yaw_rate" :0},
then on Line 139 of xplane_envBase.py the variable state is assigned:
state = self.ControlParameters.stateAircraftPosition + self.ControlParameters.stateVariableValue
stateAircraftPosition is retrieved from XPlane Connect's getPOSI() function which returns these values : [Lat, Lon, Alt, Pitch, Roll, Yaw, Gear]
and stateVariableValue containes values for these drefs:
Hi,
You could adapt the state parameters to suit the scenario you are trying to train. For example gear might not be needed for a point to point navigation but for landing it would be essential. Since I played with different training scenario it might be possible I changed it along the line.
Your observation is perhaps correct. You meant the indices should be 7, 8 and 9 correcponding to local_vx ,local_vy and local_vz. Additional data refs are defined here for position and velocity and are in fact well explained.
While trying to understand the workings of the code and writing an agent myself, I noticed certain inconsistencies in the parameters defined in parameters.py file and value assignment to those variables in xplane_envBase.py file.
In Line 14 of parameters.py file state14 is defined as:
"state14" :{"roll_rate" :0 ,"pitch_rate" :0, "altitude": 0 ,"Pitch" :0 ,"Roll" :0, "velocity_x": 0, "velocity_y" :0 ,"velocity_z" :0 ,"delta_altitude" :0, "delta_heading" :0 ,"yaw_rate" :0},
then on Line 139 of xplane_envBase.py the variable state is assigned:
state = self.ControlParameters.stateAircraftPosition + self.ControlParameters.stateVariableValue
stateAircraftPosition is retrieved from XPlane Connect's getPOSI() function which returns these values :
[Lat, Lon, Alt, Pitch, Roll, Yaw, Gear]
and stateVariableValue containes values for these drefs:
"stateVariable" : ["sim/flightmodel/position/local_vx" ,"sim/flightmodel/position/local_vy", "sim/flightmodel/position/local_vz"],
so, essentially the list 'state' contains following variables:
state = [Lat, Lon, Alt, Pitch, Roll, Yaw, Gear, local_vx, local_vy, local_vz]
However, when we look at assignments in Line 175, 176 and 177 of xplane_envBase.py file it can be noted that
state14['velocity_x'] = state[6]
whereas state[6] = Gearstate14['velocity_y'] = state[6]
whereas state[6] = local_vxstate14['velocity_z'] = state[6]
whereas state[6] = local_vySo, I don't know if I am missing on something or what, but this should have a major impact on training.
The text was updated successfully, but these errors were encountered: