Calculate the power inline so we don't have to repeat the rack ID etc every time; give in and use 1-based arrays instead of mapping the 1-base back to 0-base.