Return the values
getValues({tpose,tposechain}) → {poseset,posechainset}
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 trajectory
trajectory(tpose) → geometry
A pose has a position and an orientation but no extent, so the geometry it covers over time is the trajectory of its position, as for a temporal point. A pose that interpolates moves along the line between two consecutive positions; one that does not stands at each of them and covers nothing between them.
SELECT ST_AsText(trajectory(tpose '[Pose(Point(1 1),0.5)@2001-01-01, Pose(Point(3 3),0.5)@2001-01-02]')); -- LINESTRING(1 1,3 3) SELECT ST_AsText(trajectory(tpose 'Interp=Step; [Pose(Point(1 1),0.5)@2001-01-01, Pose(Point(3 3),0.5)@2001-01-02]')); -- MULTIPOINT((1 1),(3 3))
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)@2001-01-01 08:00, Pose(Point(1 1), 0.5)@2001-01-02 08:00]') * 3600); -- Interp=Step;[1.414213562373095@2001-01-01, 1.414213562373095@2001-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)@2001-01-01, Pose(Point(0 0 0), 0.7071067811865476, 0, 0, 0.7071067811865475)@2001-01-02]')); -- Interp=Step;[1.8181e-5@2001-01-01, 1.8181e-5@2001-01-02]
Return the value of a temporal instant, the set of values, or the time span
getValue({tpose,tposechain}) → {pose,posechain}
timeSpan({tpose,tposechain}) → tstzspan
SELECT asEWKT(getValue(tposechain 'PoseChain(Pose(Point(1 1), 0.5))@2001-01-01'));
-- PoseChain(Pose(POINT(1 1),0.5))
SELECT asEWKT(getValues(tposechain '{PoseChain(Pose(Point(1 1), 0.5))@2001-01-01,
PoseChain(Pose(Point(2 2), 0.5))@2001-01-02}'));
-- {"PoseChain(Pose(POINT(1 1),0.5))", "PoseChain(Pose(POINT(2 2),0.5))"}
SELECT timeSpan(tposechain '[PoseChain(Pose(Point(1 1), 0.5))@2001-01-01,
PoseChain(Pose(Point(2 2), 0.5))@2001-01-02]');
-- [2001-01-01, 2001-01-02]