+ def rectified(self) -> Report:
+ # self.gps_valid is supposed to mean it, but it does not. Perfectly
+ # good looking coordinates, with ten satellites, still get 'V'.
+ # I suspect that in reality, 'A' means "hint data is absent".
+ if self.gps_valid or self.num_of_sats > 3:
+ return CoordReport(
+ devtime=str(self.devtime),
+ battery_percentage=self.battery_percentage,
+ accuracy=self.positioning_accuracy,
+ altitude=self.altitude,
+ speed=self.speed,
+ direction=self.direction,
+ latitude=self.latitude,
+ longitude=self.longitude,
+ )
+ else:
+ return HintReport(
+ devtime=str(self.devtime),
+ battery_percentage=self.battery_percentage,
+ mcc=self.mcc,
+ mnc=self.mnc,
+ gsm_cells=self.gsm_cells,
+ wifi_aps=self.wifi_aps,
+ )
+