I havent made any PIDS in a couple of years. Is there any writeup on making them?

I have a 09 G8GT (E38) it can show me fuel burned instantly in gal/hr. With this information, alond with speed could I make a PID to show instand fual mileage?