add static magnetic field
added output for x and y