% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% function paramsout = AddBSlipFields( params );
%
% Inserts SimSect++ Hexapod model related defaults into the supplied
% parameter struct.
%
% The parameter struct must be initialized with InitSimSect function 
% call.
%
% See also:
%
% InitSimSect, CreateRCFile, RunSimSect and LoadSimSectData
%

function paramsout = AddEmbeddingFields( params );

paramsout = params;

paramsout.final_apex = 50;
paramsout.finalTime = 500.0;

paramsout.controller = 'slip-embedding';

% Goal setpoint and controller configuration
paramsout.slip_apex_ydot = 1.0;
paramsout.slip_apex_z = 0.5;
paramsout.slip_xitd_min = 0.165;
paramsout.slip_xitd_adj = 0.0;
paramsout.psi_limit = 0.1;

% Controller specific initial conditions
paramsout.xdot_initial = 0.0;
paramsout.ydot_initial = 0.0;
paramsout.zdot_initial = 0.0;
paramsout.yaw_initial = 0.0;
paramsout.pitch_initial = 0.0;
paramsout.roll_initial = 0.0;
paramsout.yawdot_initial = 0.0;
paramsout.pitchdot_initial = 0.0;
paramsout.rolldot_initial = 0.0;
paramsout.z_initial = 0.17;

% Various gains
paramsout.KP = 50;
paramsout.KD = 0.1;
paramsout.toe_torque_pgain = 0.0;
paramsout.pitch_pgain = 500.0;
paramsout.pitch_dgain = 30.0;
paramsout.pitch_d3gain = 0.0;
paramsout.roll_pgain = 600.0;
paramsout.roll_dgain = 70.0;
paramsout.roll_d3gain = 0.0;
paramsout.yaw_pgain = -10.0;
paramsout.yaw_dgain = 20.0;

