Return the values
getValues(tpose) → poseset
SELECT asText(getValues(tpose '{[Pose(Point(1 1), 0.3)@2001-01-01,
Pose(Point(1 1), 0.5)@2001-01-02)}'));
-- {"Pose(Point(1 1),0.3)","Pose(Point(1 1),0.5)"}
SELECT asEWKT(getValues(tpose 'SRID=5676;{[Pose(Point(1 1), 0.3)@2001-01-01,
Pose(Point(1 1), 0.3)@2001-01-02)}'));
-- SRID=5676;{"Pose(Point(1 1),0.3)"}
Return the points
points(tpose) → geomset
SELECT asEWKT(points(tpose 'SRID=5676;{Pose(Point(3 3), 0.3)@2001-01-01,
Pose(Point(1 1), 0.5)@2001-01-02}'));
-- SRID=5676;{Point(1 1), Point(3 3)}
Return the rotation
rotation(tpose2d) → tfloat
SELECT rotation(tpose 'SRID=5676;{[Pose(Point(1 1), 0.3)@2001-01-01,
Pose(Point(1 1), 0.3)@2001-01-02)}');
-- {[0.3@2001-01-01, 0.3@2001-01-02)}
Return the value at a timestamp
valueAtTimestamp(tpose,timestamptz) → pose
SELECT asText(valueAtTimestamp(tpose '[Pose(Point(1 1), 0.3)@2001-01-01,
Pose(Point(3 3), 0.5)@2001-01-03)', '2001-01-02'));
-- Pose(Point(2 2),0.4)
SELECT asText(valueAtTimestamp(tpose
'[Pose(Point Z(1 1 1), 0.5, 0.5, 0.5, 0.5)@2001-01-01,
Pose(Point Z(3 3 3), 1, 0, 0, 0)@2001-01-03)', timestamptz '2001-01-02'), 6);
-- Pose(POINT Z (2 2 2),0.866025,0.288675,0.288675,0.288675)
Return the speed of a temporal pose as a temporal float, the magnitude of the position-component velocity (distance travelled per unit time)
speed(tpose) → tfloat
The orientation is not considered; for angular velocity see angularSpeed.
SELECT asText(speed(tpose '[Pose(Point(0 0), 0)@2000-01-01 08:00, Pose(Point(1 1), 0.5)@2000-01-02 08:00]') * 3600); -- Interp=Step;[1.414213562373095@2000-01-01, 1.414213562373095@2000-01-02]
The answer is given in the units of the SRID's CRS, which multiplied by 3600 in this case, corresponds to meters per hour.
Return the angular speed of a temporal pose as a step-interpolated temporal float (radians per unit time)
angularSpeed(tpose) → tfloat
For 2D poses this is the per-segment shortest-arc theta delta divided by the segment duration; for 3D poses it is the SLERP arc angle 2 · acos(|q1 · q2|) divided by the segment duration. SLERP is by construction constant-angular-velocity along a segment, so the result is piecewise-constant.
-- 90-degree yaw rotation over one day -> pi/2 rad / 86400 s
SELECT asText(angularSpeed(tpose
'[Pose(Point(0 0 0), 1, 0, 0, 0)@2000-01-01,
Pose(Point(0 0 0), 0.7071067811865476, 0, 0, 0.7071067811865475)@2000-01-02]'));
-- Interp=Step;[1.8181e-5@2000-01-01, 1.8181e-5@2000-01-02]