aspsim.room.trajectory.Trajectory

class aspsim.room.trajectory.Trajectory(pos_func)

Bases: object

Base class defining a trajectory through the room.

In order to simulate a moving source or microphone, the trajectory must be defined in accordance with this API. Easiest way is to create a function defining the position at each time index, and pass it to the constructor. Alternatively, subclass this class and implement the current_pos method.

pos_func is a function, which takes a time_index in samples and outputs a position

__init__(pos_func)

pos_func is a function, which takes a time_index in samples and outputs a position

Methods

__init__(pos_func)

pos_func is a function, which takes a time_index in samples and outputs a position

current_pos(time_idx)

plot(ax, symbol, name, tot_samples)

current_pos(time_idx)
Parameters:

time_idx (int) – time index in samples

Returns:

pos – position at time time_idx

Return type:

array of shape (1,3)