function y0 = preoffset(xses, yses, x0, a, bses)

% function preoffset(xses, yses, x0, a, bses)
%
% Function calculates the needed time offset y0 at time x0 (MJD) if needed
% offset at time xses should be yses. 'a' is a constant derived from a
% LSQ fit to offset data and 'bses' is the adjusted frequency constant
% calculated from the fit model and needed zero-rate epoch (xses).
% by Kaj Wiik (9 Oct 96)

c = yses - a*xses.^2 - bses*xses;
y0 = a*x0.^2 + bses*x0 + c;

