being involved in dimensional measurement since1980, i have seen this before. You are asking for what the manufacturers of coordinate measurement machines (CMM) have sought since 1959. Instead of a gas pedal pivot ball orientation, the makers of the CMM seek the XY and Z location of a ball stylus in the cartisean coordinate system. This is done with mechanical structures that move in xyz axis and have digital scales and read heads.
All measurement is calculated from the center point of this ball stylus probe.
Other times they use photo optic grids located in an xyz location and use a laser projector(emitter) fixed , in your case, to the pedal and monitor the laser beam location on the xyz location. In some cases they may attach a second laser emmiter to the pedal at 90 degrees and even a 3rd laser emitter at another 90 degrees to " map" the xyz movement.
look up CMM
View attachment 275361