Node SwimSpeedNode#

Defined in mime.nodes.body._swim_speed.SwimSpeedNode.

Algorithm MIME-NODE-115.

A body’s velocity along a direction each step, and its mean over the steps that end after a start time, kept in the node’s own state.

Governing equations#

\[ s = \mathbf{v} \cdot \mathbf{e}, \quad D = \sum_{k : t_{k} > t_{a}} s_{k} \, h, \quad T = \sum_{k : t_{k} > t_{a}} h, \quad \bar{s} = D / T \]

Discretisation#

none declared; a node whose order depends on its construction declares it with the discretization_order() hook, which is read from a built node.

Assumptions#

  • The body’s velocity read at a step holds over that step, so the distance is the sum of the speed times the timestep

  • The time of a step is its count times the timestep, and a step counts whole once its end lies after the start time

Limitations#

  • The window’s edge is a switch: the distance and the time observed move in jumps of a step as the start time moves, and the mean is zero until some time has been observed

Declared regimes (not evidenced here)#

none declared

References#

none declared

Symbols#

Symbol

Kind

Name

Units

Implemented by

\(s\)

state

speed

m/s

mime.nodes.body._swim_speed.SwimSpeedNode.advance

\(D\)

state

distance

m

mime.nodes.body._swim_speed.SwimSpeedNode.advance

\(T\)

state

observed

s

mime.nodes.body._swim_speed.SwimSpeedNode.advance

\(\bar{s}\)

state

mean_speed

m/s

mime.nodes.body._swim_speed.SwimSpeedNode.advance

\(\mathbf{v}\)

input

twist

m/s; rad/s

mime.nodes.body._swim_speed.SwimSpeedNode.advance

\(\mathbf{e}\)

parameter

along

1

mime.nodes.body._swim_speed.SwimSpeedNode.advance

\(t_{a}\)

parameter

after

s

mime.nodes.body._swim_speed.SwimSpeedNode.advance

Built by#