This paper examines the possibility of using the principle of conservation of canonical momentum applied to heavy ion beam orbits to obtain an estimate of the local poloidal flux at the position of ionization in a tokamak plasma. The presence of a nonaxisymmetrical ripple field, induced by the discreteness of the toroidal field coils, precludes a strict application of the principle. However, the results suggest that toroidal ripple in regions outside the plasma can be accounted for using knowledge of the particle beam's initial position and angular momentum together with measurements of the secondary beam's position and angular momentum to obtain an accurate estimate of the local poloidal flux in the plasma. A way of measuring the toroidal momentum of the secondaries is proposed, using two position measurements along the trajectory. The proposed method potentially provides powerful constraints if combined with an equilibrium code for solving the Grad-Shafranov equation.