New version of RegalPpca based on RegalClientState.h