fixed bugs in calcHeadingValue operation, tweaked constants and stettings