Measuring gradient waveforms effectively with fully compensated variable-prephasing