Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed along single axis #56

Closed
renedlog opened this issue Feb 25, 2021 · 3 comments
Closed

speed along single axis #56

renedlog opened this issue Feb 25, 2021 · 3 comments

Comments

@renedlog
Copy link

would like to see derivations of:
speed(tpoint): tfloats

for the individual components (speed per axis)
e.g.:
speed_x()
speed_y()
speed_z()

e.g:
SELECT speed_z(tgeompoint 'Interp=Stepwise;[Point(0 0 0)@2000-01-01, Point(1 1 1)@2000-01-02,
Point(1 0)@2000-01-03]') * 3600 * 24;

@estebanzimanyi
Copy link
Member

Nice idea ! We already discussed the best possible way to implement it. Our current idea is to implement a derivative function for tfloat which is general and can be used in other contexts and also have the functions getX, getY, getZ of signature tpoint -> tfloat. What do you think ?

@mschoema
Copy link
Member

mschoema commented Mar 1, 2021

Resolved in PR #58.

@mschoema mschoema closed this as completed Mar 1, 2021
@mschoema
Copy link
Member

mschoema commented Mar 1, 2021

P.S.: Four SQL functions have been added:

  • getX(tgeompoint) -> tfloat
  • getY(tgeompoint) -> tfloat
  • getZ(tgeompoint) -> tfloat
  • derivative(tfloat) -> tfloat

The 'speed along axis' can thus be computed by combining the derivative with the getX, getY or getZ functions:
E.g.: speed along x-axis: derivative(getX(tgeompoint)) -> tfloat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants