pub trait Transducer: Sized {
type D: DriveData<Self>;
fn new(
id: usize,
pos: Vector3,
x_direction: Vector3,
y_direction: Vector3,
z_direction: Vector3
) -> Self;
fn align_phase_at(&self, dist: f64, sound_speed: f64) -> f64;
fn position(&self) -> &Vector3;
fn id(&self) -> usize;
fn x_direction(&self) -> &Vector3;
fn y_direction(&self) -> &Vector3;
fn z_direction(&self) -> &Vector3;
fn cycle(&self) -> u16;
fn frequency(&self) -> f64;
fn wavelength(&self, sound_speed: f64) -> f64;
fn wavenumber(&self, sound_speed: f64) -> f64;
fn pack(
msg_id: u8,
phase_sent: &mut bool,
duty_sent: &mut bool,
drives: &Self::D,
tx: &mut TxDatagram
) -> Result<()>;
}