Change that line
encoder0Pos = encoder0Pos % 1024;
to
encoder0Pos = encoder0Pos % 2048;
and keep in mind that encoder0Pos now has 2048 steps for one round. The conversion factor to degrees is half the one I calculated above, just to give you one example.