parameter adjustment. works with a maximum error of 20 degrees