adds some debugging math to platform simulator
initializes some variables in platform simulator to avoid initial condition bugs/errors