You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ins_mekf.m
    path of file: ./repos/MSS/GNC
    
    the code of the file until where you have to start completion: function [x_ins, P_prd] = ins_mekf(...
   x_ins, P_prd, mu, h, Qd, Rd, f_imu, w_imu, m_imu, m_ref, y_pos, y_vel)
% Error-state (indirect) feedback EKF for INS aided by position
% measurements y_pos. The velocity aiding signal y_vel is optionally. 
% The EKF is implemented as a feedback filter using reset. 
% Attitude is parametrized using unit quaternions and Gibbs vector is used
% to represent the error states in the MEKF.  

    
function [x_ins, P_prd] = ins_mekf(...
   x_ins, P_prd, mu, h, Qd, Rd, f_imu, w_imu, m_imu, m_ref, y_pos, y_vel)
% Error-state (indirect) feedback EKF for INS aided by position
% measurements y_pos. The velocity aiding signal y_vel is optionally. 
% The EKF is implemented as a feedback filter using reset. 
% Attitude is parametrized using unit quaternions and Gibbs vector is used
% to represent the error states in the MEKF.  
%
% See ExINS_MEKF for how to implement the Kalman filter loop:
%
% if (new slow measurement)
%
%   ins_mekf(...
%   x_ins, P_prd, mu, h, Qd, Rd, f_imu, w_imu, m_imu, m_ref, y_pos, y_vel)
%
% else (no measurement)
%
%   ins__mekf(x_ins, P_prd, mu, h, Qd, Rd, f_imu, w_imu, m_imu, m_ref)
%
% end