ais

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, logger *slog.Logger, _ string) error

func SelfToEntity

func SelfToEntity(rmc nmea.RMC, controllerName string, trackerID string, config *StreamConfig) *pb.Entity

func VesselToEntity

func VesselToEntity(vessel *AISVessel, controllerName string, trackerID string, expires time.Duration) *pb.Entity

Types

type AISVessel

type AISVessel struct {
	MMSI               uint32
	Latitude           float64
	Longitude          float64
	Speed              float64
	Course             float64
	Heading            int
	Name               string
	Callsign           string
	Type               uint8
	PositionAccuracy   bool
	NavigationalStatus uint8
	LastSeen           time.Time
}

type MessageFragment

type MessageFragment struct {
	// contains filtered or unexported fields
}

type StreamConfig

type StreamConfig struct {
	Host                string   `json:"host"`
	Port                int      `json:"port"`
	EntityExpirySeconds int      `json:"entity_expiry_seconds"`
	Latitude            *float64 `json:"latitude"`
	Longitude           *float64 `json:"longitude"`
	RadiusKM            *float64 `json:"radius_km"`

	// Self position (receiver position from GPS RMC sentences)
	SelfEntityID     string `json:"self_entity_id"`
	SelfLabel        string `json:"self_label"`
	SelfSIDC         string `json:"self_sidc"`
	SelfAllowInvalid bool   `json:"self_allow_invalid"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL