Class a.trajtrap

trapezoidal velocity trajectory

Tables

a.trajtrap trapezoidal velocity trajectory

Methods

a.trajtrap:new () constructor for trapezoidal velocity trajectory
a.trajtrap:gen (vm, ac, de, p0, p1[, v0[, v1]]) generate for trapezoidal velocity trajectory
a.trajtrap:pos (x) calculate position for trapezoidal velocity trajectory
a.trajtrap:vel (x) calculate velocity for trapezoidal velocity trajectory
a.trajtrap:acc (x) calculate acceleration for trapezoidal velocity trajectory


Tables

a.trajtrap
trapezoidal velocity trajectory

Fields:

  • t total duration
  • p0 initial position
  • p1 final position
  • v0 initial velocity
  • v1 final velocity
  • vc constant velocity
  • ta time before constant velocity
  • td time after constant velocity
  • pa position before constant velocity
  • pd position after constant velocity
  • ac acceleration before constant velocity
  • de acceleration after constant velocity

Methods

a.trajtrap:new ()
constructor for trapezoidal velocity trajectory

Returns:

    a.trajtrap trapezoidal velocity trajectory userdata
a.trajtrap:gen (vm, ac, de, p0, p1[, v0[, v1]])
generate for trapezoidal velocity trajectory

Parameters:

  • vm number defines the maximum velocity during system operation
  • ac number defines the acceleration before constant velocity
  • de number defines the acceleration after constant velocity
  • p0 number defines the initial position
  • p1 number defines the final position
  • v0 number defines the initial velocity (optional)
  • v1 number defines the final velocity (optional)

Returns:

    number total duration
a.trajtrap:pos (x)
calculate position for trapezoidal velocity trajectory

Parameters:

  • x number difference between current time and initial time

Returns:

    number position output
a.trajtrap:vel (x)
calculate velocity for trapezoidal velocity trajectory

Parameters:

  • x number difference between current time and initial time

Returns:

    number velocity output
a.trajtrap:acc (x)
calculate acceleration for trapezoidal velocity trajectory

Parameters:

  • x number difference between current time and initial time

Returns:

    number acceleration output
generated by LDoc 1.5.0 Last updated 2024-09-30 14:51:04