✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
1 (a) (iii) A new, high speed satellite receives the position data from a dolphin sensor every millisecond and has to to record dolphin position and speed. The dolphin sensor can report the current location and/or the change in location in the last millisecond, where and are reported in degrees. Speed is computed using the norm of the change in position. Dolphins typically move around 1mm in 1 millisecond. There are 11720000mm in one degree.
# assume p is initialised to an initial position
# and record is an empty list
...
while running:
d = read_comms() # returns float32
p = p + d
v = np.linalg.norm(d)
record.append((p, v))
...
while running:
p, d = read_comms() # returns two float32
v = np.linalg.norm(d)
record.append((p, v))
last_p = p
...
while running:
d = read_comms() # returns float32
p = p + d
df = p - last_p
last_p = p
v = np.linalg.norm(df)
record.append((p, v))
Rank these in order of numerical stability assuming computations are done in float32, and very briefly justify your ranking.