Sounds like you need to find a late model Chevrolet throttle position sensor and call it a day!
So...
i don't know if this is the case (I'm actually a lil curious...) Is 5v output as PWM a straight % based on dutycycle? For instance...
5v output @ 50% dutycycle = 2.5v?
cuz if so then set
HPWM dutycycle = ((5-ADCIN0)/5)*255
and ur straight....
Subtract INPUT from 5 to get the inverse
Divide by 5 to get the percentage output you want
multiply the % by 255 because dutycycle is set 0-255
of course, if 50% dutycycle <> 50% voltage, I just wasted the last 7 minutes of my life...
Bookmarks