@@ -94,15 +94,19 @@ class Rotation(Base):
94
94
_id : Mapped [int ] = mapped_column (Integer , primary_key = True , autoincrement = True )
95
95
stamp : Mapped [float ] = mapped_column (Float , nullable = False )
96
96
recording_id : Mapped [int ] = mapped_column (Integer , ForeignKey ("Recording._id" ), nullable = False )
97
- roll : Mapped [float ] = mapped_column (Float , nullable = False )
98
- pitch : Mapped [float ] = mapped_column (Float , nullable = False )
97
+ x : Mapped [float ] = mapped_column (Float , nullable = False )
98
+ y : Mapped [float ] = mapped_column (Float , nullable = False )
99
+ z : Mapped [float ] = mapped_column (Float , nullable = False )
100
+ w : Mapped [float ] = mapped_column (Float , nullable = False )
99
101
100
102
recording : Mapped ["Recording" ] = relationship ("Recording" , back_populates = "rotations" )
101
103
102
104
__table_args__ = (
103
105
CheckConstraint ("stamp >= 0" ),
104
- CheckConstraint ("roll >= 0 AND roll < 2 * pi()" ),
105
- CheckConstraint ("pitch >= 0 AND pitch < 2 * pi()" ),
106
+ CheckConstraint ("x >= -1 AND x <= 1" ),
107
+ CheckConstraint ("y >= -1 AND y <= 1" ),
108
+ CheckConstraint ("z >= -1 AND z <= 1" ),
109
+ CheckConstraint ("w >= -1 AND w <= 1" ),
106
110
)
107
111
108
112
0 commit comments