Mercurial > hg > ltpda
view m-toolbox/m/gui/ltpdv/callbacks/ltpdv_server_get_stop_time.m @ 28:01b86b780ba7 database-connection-manager
Remove LTPDARepositoryManager implementation. Java code
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
function gps = ltpdv_server_get_stop_time(mainfig) % Handle sh = findobj(mainfig, 'Tag', 'LTPDVserverStopEdit'); % Get string sstr = get(sh, 'String'); if sstr(1) == '+' % get start start = ltpdv_server_get_start_time(mainfig); gps = start + str2num(sstr(2:end)) -1; set(sh, 'String', GPS2UTC(gps)); return end if sstr(1) == '-' % get start start = ltpdv_server_get_start_time(mainfig); gps = start - str2num(sstr(2:end)) +1; set(sh, 'String', GPS2UTC(gps)); return end % Is this GPS? if ~isempty(sstr) try gps = eval(sstr); utc = GPS2UTC(gps); catch utc = sstr; gps = UTC2GPS(utc); end else gps = -1; end