  Accurate knowledge of the telescope's point spread function (PSF) is
essential for the weak gravitational lensing measurements that hold great
promise for cosmological constraints. For space telescopes, the PSF may vary
with time due to thermal drifts in the telescope structure, and/or due to
jitter in the spacecraft pointing (ground-based telescopes have additional
sources of variation). We describe and simulate a procedure for using the
images of the stars in each exposure to determine the misalignment and jitter
parameters, and reconstruct the PSF at any point in that exposure's field of
view. The simulation uses the design of the SNAP (http://snap.lbl.gov)
telescope. Stellar-image data in a typical exposure determines secondary-mirror
positions as precisely as $20 {\rm nm}$. The PSF ellipticities and size, which
are the quantities of interest for weak lensing are determined to $4.0 \times
10^{-4}$ and $2.2 \times 10^{-4}$ accuracies respectively in each exposure,
sufficient to meet weak-lensing requirements. We show that, for the case of a
space telescope, the PSF estimation errors scale inversely with the square root
of the total number of photons collected from all the usable stars in the
exposure.
