function hms=rd2hms(rd)
%RD2HMS  Convert the time (remainder) of the rafos time in h,m,s

rd=rd(:);
rt=rd-fix(rd);
dayins=24*60*60;
rt=round(rt*dayins);
hins=60*60;
mins=60;
x=rt./hins;
h=fix(x);
rt=rt-fix(x)*hins;
x=rt./mins;
m=fix(x);
rt=rt-fix(x)*mins;
s=fix(rt);
hms=[h,m,s];

% end rd2hms

