Skip to content

Commit c94f4f6

Browse files
committed
fix timestamp comparison
1 parent c82d7fc commit c94f4f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rosys/hardware/gnss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async def _run(self) -> None:
201201
last_pssn_timestamp = timestamp
202202
last_raw_heading = float(parts[4] or 0.0)
203203
last_heading_accuracy = float(parts[7] or 'inf')
204-
if last_gga_timestamp == last_gst_timestamp == last_pssn_timestamp != '':
204+
if last_gga_timestamp > 0 and last_gst_timestamp > 0 and last_pssn_timestamp > 0:
205205
last_heading = last_raw_heading + self.antenna_pose.yaw_deg
206206
antenna_pose = GeoPose.from_degrees(last_raw_latitude, last_raw_longitude, last_heading)
207207
robot_pose = antenna_pose.relative_shift_by(x=-self.antenna_pose.x, y=-self.antenna_pose.y)

0 commit comments

Comments
 (0)