Skip to content

Commit 4237a7e

Browse files
committed
fix: use newly added function + docs
1 parent 8347da0 commit 4237a7e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/flockwave/server/ext/rtk/statistics.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,14 @@ def notify(self, packet: RTCMV3Packet) -> None:
113113

114114
position = getattr(packet, "position", None)
115115
if position is not None:
116-
self.position = _ecef_to_gps.to_gps(position)
117-
self.position_ecef = position
118-
self._antenna_position_timestamp = monotonic()
116+
self.set_from_ecef(position)
119117

120118
def set_from_ecef(self, position: ECEFCoordinate) -> None:
119+
"""Sets the antenna position from an ECEF coordinate.
120+
Computes and stores the corresponding GPS coordinate and refreshes
121+
the internal timestamp used to track the age of the last antenna
122+
position observation.
123+
"""
121124
self.position = _ecef_to_gps.to_gps(position)
122125
self.position_ecef = position
123126
self._antenna_position_timestamp = monotonic()

0 commit comments

Comments
 (0)