function res = load_fdi_raw(fname, trans)
res = {};
res.v = h5read(fname, '/raw motor data/voltage');
res.c = h5read(fname, '/raw motor data/current');
res.s = h5read(fname, '/raw motor data/str pot');
res.e = h5read(fname, '/raw motor data/encoder');
res.t = h5read(fname, '/raw motor data/time');
res.xmp = h5read(fname, '/motor data/x_motor_previous');
res.p = h5read(fname, '/ahrs data/pitch');
if trans
  w = h5read(fname, '/transient detector/time');
  res.trans = zeros(size(res.t));
  [~, idxs] = ismember(w, res.t);
  res.trans(idxs) = 1;
end

end
