comnum.ais_position_report#

comnum.ais_position_report(mmsi, *, lat_deg=None, lon_deg=None, sog_knots=None, cog_deg=None, heading_deg=None, timestamp=60, nav_status=15, accurate=False)#

The bits of a position report (message 1) with the given fields, the other fields zero: the inverse of ais_decode() for that message.

Parameters:
  • mmsi (int) – the MMSI.

  • lat_deg (float | None) – latitude (degrees), None for “not available”.

  • lon_deg (float | None) – longitude (degrees).

  • sog_knots (float | None) – speed over ground (knots).

  • cog_deg (float | None) – course over ground (degrees).

  • heading_deg (int | None) – true heading (degrees).

  • timestamp (int) – the UTC second (60: not available).

  • nav_status (int) – the navigational status (15: not defined).

  • accurate (bool) – the position accuracy flag.

Returns:

the 168 bits (uint8).

Return type:

numpy.ndarray