anchor.diff:  
   	ShipState = dict:fetch(ship, Entity#entity.state),
   	{TX, TY, TZ} = dict:fetch(target_linear_velocity, ShipState),
  -	{TPitch, TRoll, TYaw} = dict:fetch(target_angular_velocity, ShipState),
  +	{TPitch, THeading, TRoll} = dict:fetch(target_angular_velocity, ShipState),
   	{TXScale, TYScale, TZScale} = dict:fetch(linear_target_velocity_scaling, ShipState),
  -	{TPitchScale, TRollScale, TYawScale} = dict:fetch(angular_target_velocity_scaling, ShipState),
  +	{TPitchScale, THeadingScale, TRollScale} = dict:fetch(angular_target_velocity_scaling, ShipState),
   	{MaxXT, MaxYT, MaxZT} = dict:fetch(max_linear_thrust, ShipState),
  -	{MaxPitchT, MaxRollT, MaxYawT} = dict:fetch(max_angular_thrust, ShipState),
  +	{MaxPitchT, MaxHeadingT, MaxRollT} = dict:fetch(max_angular_thrust, ShipState),
   	{XR, YR, ZR} = dict:fetch(linear_responsiveness, ShipState),
  -	{PitchR, RollR, YawR} = dict:fetch(angular_responsiveness, ShipState),
  +	{PitchR, HeadingR, RollR} = dict:fetch(angular_responsiveness, ShipState),
   
   	% Get the ship-relative linear velocity
   	{XVel, YVel, ZVel} = quaternion:rotate(PositionVelAbs, quaternion:reciprocal(Orientation)),
   
   	% Get the ship-relative angular velocity
  -	{PitchVel, RollVel, YawVel} = quaternion:rotate(AngularVelAbs, quaternion:reciprocal(Orientation)),
  +	{PitchVel, HeadingVel, RollVel} = quaternion:rotate(AngularVelAbs, quaternion:reciprocal(Orientation)),
   
   	% Calculate relative force
   	Force = {
  
positive.code: 	% Calculate relative torque
  	Torque = {
  		calc_thrust(MaxPitchT, PitchR, PitchVel, TPitchScale * TPitch),
  		calc_thrust(MaxRollT, RollR, RollVel, TRollScale * TRoll),
  		calc_thrust(MaxYawT, YawR, YawVel, TYawScale * TYaw)
  	},
  
  	PhysicalChanges = [
  
negative.code: 						}
  					},
  					{orientation,
  						{1, 0, 0, 0}
  						%quaternion:from_axis_angle(
  						%	vector:unit({
  						%		random:uniform(),
  						%		random:uniform(),
  						%		random:uniform()
  						%	}),
  						%	random:uniform() * 2 * math:pi()
  						%)
  					}
  				]
  			),
  