From 1f084260d2afd744015c8c6bd778ba091e757700 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell <andrew@tridgell.net> Date: Fri, 6 May 2022 21:03:03 +1000 Subject: [PATCH] rotmat: fixed rotation init --- rotmat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rotmat.py b/rotmat.py index e07718b9..86bd1edd 100755 --- a/rotmat.py +++ b/rotmat.py @@ -24,7 +24,7 @@ ''' from __future__ import print_function -from math import sin, cos, sqrt, asin, atan2, pi, acos +from math import sin, cos, sqrt, asin, atan2, pi, acos, radians class Vector3(object): @@ -423,7 +423,7 @@ class Rotation(object): self.pitch = pitch self.yaw = yaw self.r = Matrix3() - self.r.from_euler(self.roll, self.pitch, self.yaw) + self.r.from_euler(radians(self.roll), radians(self.pitch), radians(self.yaw)) self.rt = self.r.transposed() # the rotations used in APM -- GitLab