diff --git a/rocketpy/mathutils/vector_matrix.py b/rocketpy/mathutils/vector_matrix.py index 60032793c..0da44935d 100644 --- a/rocketpy/mathutils/vector_matrix.py +++ b/rocketpy/mathutils/vector_matrix.py @@ -1002,6 +1002,10 @@ def __repr__(self): + f" [{self.zx}, {self.zy}, {self.zz}])" ) + def to_dict(self): + """Returns the matrix as a JSON compatible element.""" + return [list(row) for row in self.components] + @staticmethod def identity(): """Returns the 3x3 identity matrix."""