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: handle_input_command(Entity, <<"pitch">>, [TargetVel], _KWArgs) ->
  	set_target_angular_velocity(Entity, {TargetVel, undefined, undefined});
  
  handle_input_command(Entity, <<"yaw">>, [TargetVel], _KWArgs) ->
  	set_target_angular_velocity(Entity, {undefined, TargetVel, undefined});
  
  handle_input_command(Entity, <<"roll">>, [TargetVel], _KWArgs) ->
  	set_target_angular_velocity(Entity, {undefined, undefined, -TargetVel});
  
  % Catch-all
  handle_input_command(Entity, Command, Args, KWArgs) ->
  
negative.code: 	% Calculate relative torque
  	Torque = {
  		calc_thrust(MaxPitchT, PitchR, PitchVel, TPitchScale * TPitch),
  		calc_thrust(MaxHeadingT, HeadingR, HeadingVel, THeadingScale * THeading),
  		calc_thrust(MaxRollT, RollR, RollVel, TRollScale * TRoll)
  	},
  
  	PhysicalChanges = [
  