Simu: allow Locations to determine distances

This commit is contained in:
Eric-Teunis de Boone 2022-03-24 12:16:14 +01:00
parent 01689f7b7e
commit 03b2ddf117
2 changed files with 15 additions and 3 deletions

View file

@ -43,9 +43,9 @@ class Signal():
raise NotImplementedError
def spatial_time_offset(self, x_f, velocity=None, x_0=None):
def spatial_time_offset(self, x_f, x_0=None, velocity=None):
"""
Calculate the time offset caused by a spatial difference.
Calculate the time offset caused by a spatial distance.
"""
if velocity is None:
velocity = self.velocity
@ -57,7 +57,7 @@ class Signal():
def temporal_time_offset(self, t_f, t_0=None):
"""
Calculate the time offset caused by a temporal difference.
Calculate the time offset caused by a temporal distance.
"""
if t_0 is None:
t_0 = self.t_0