Shuster, Malcom; "A Survey of Attitude Representations", Journal of Astronautical Sciences, Vol. 41, pp 439-517, 1993.
In this reference, on page 462, equation 159, a quaternion is defined as:
eta1 = sin(ph/2)*nhat1
eta2 = sin(ph/2)*nhat2
eta3 = sin(ph/2)*nhat3
eta4 = cos(ph/2),
where, ph is the euler rotation axis angle and
nhat is the euler rotation axis direction.
(The output of the EO matrix calculator quaternions adheres
to this convention listed by Malcolm Shuster).
An alternative reference which is useful:
Hughes, Peter; "Spacecraft Attitude Dynamics", Copyright 2004, John Wiley and
Sons.
Please note that all Earth orientation calculations are performed using
direction cosine matrices. Quaternion outputs are derived from direction
cosine matrices using equations 157 through 168 of Shuster's reference.
Also note, sometimes quaternions are referred to as Euler parameters
or Euler symmetric parameters (among other aliases).