adsb

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLength     = errors.New("adsb: the supplied data must be 7 bytes long")
	ErrFormatType = errors.New("adsb: invalid format type code")
	ErrSubType    = errors.New("adsb: invalid sub type code")
)

Functions

This section is empty.

Types

type AirbornePosition

type AirbornePosition struct {
	FormatType                     byte
	SurveillanceStatus             fields.SurveillanceStatus
	HasDualAntenna                 bool
	AltitudeSource                 fields.AltitudeSource
	AltitudeReportMethod           fields.AltitudeReportMethod
	AltitudeInFeet                 int32
	TimeSynchronizedToUTC          bool
	CompactPositionReportingFormat fields.CompactPositionReportingFormat
	EncodedLatitude                uint32
	EncodedLongitude               uint32
}

AirbornePosition is a message at the format BDS 0,5

func (*AirbornePosition) UnmarshalBytes

func (msg *AirbornePosition) UnmarshalBytes(data []byte) error

type AirbornePositionType0

type AirbornePositionType0 struct {
	FormatTypeCode              byte
	NavigationIntegrityCategory byte
	AirbornePosition
}

func (*AirbornePositionType0) UnmarshalBytes

func (msg *AirbornePositionType0) UnmarshalBytes(data []byte) error

type AirborneVelocity

type AirborneVelocity struct {
	FormatType                    byte
	SubType                       byte
	IntentChange                  bool
	IFRCapability                 bool
	NavigationUncertaintyCategory fields.NavigationUncertaintyCategory
	MagneticHeadingStatus         bool
	MagneticHeading               float64
	AirspeedStatus                fields.NumericValueStatus
	Airspeed                      uint16
	VerticalRateSource            fields.VerticalRateSource
	VerticalRateStatus            fields.NumericValueStatus
	VerticalRate                  int16
}

type AirborneVelocityAirSpeedNormal

type AirborneVelocityAirSpeedNormal struct {
	AirborneVelocity
	HeightDifferenceFromBaroStatus fields.NumericValueStatus
	HeightDifferenceFromBaro       int16
}

func (*AirborneVelocityAirSpeedNormal) UnmarshalBytes

func (msg *AirborneVelocityAirSpeedNormal) UnmarshalBytes(data []byte) error

type AirborneVelocityAirSpeedSupersonic

type AirborneVelocityAirSpeedSupersonic struct {
	AirborneVelocity
	HeightDifferenceFromBaroStatus fields.NumericValueStatus
	HeightDifferenceFromBaro       int16
}

func (*AirborneVelocityAirSpeedSupersonic) UnmarshalBytes

func (msg *AirborneVelocityAirSpeedSupersonic) UnmarshalBytes(data []byte) error

type AirborneVelocityGroundSpeedNormal

type AirborneVelocityGroundSpeedNormal struct {
	AirborneVelocity
	DirectionEastWest                fields.DirectionEastWest
	VelocityEWStatus                 fields.NumericValueStatus
	VelocityEW                       uint16
	DirectionNorthSouth              fields.DirectionNorthSouth
	VelocityNSStatus                 fields.NumericValueStatus
	VelocityNS                       uint16
	DifferenceAltitudeGNSSBaroStatus fields.NumericValueStatus
	DifferenceAltitudeGNSSBaro       int16
}

AirborneVelocityGroundSpeedNormal is a message at the format BDS 9,0

func (*AirborneVelocityGroundSpeedNormal) UnmarshalBytes

func (msg *AirborneVelocityGroundSpeedNormal) UnmarshalBytes(data []byte) error

type AirborneVelocityGroundSpeedSupersonic

type AirborneVelocityGroundSpeedSupersonic struct {
	AirborneVelocity
	DirectionEastWest                fields.DirectionEastWest
	VelocityEWStatus                 fields.NumericValueStatus
	VelocityEW                       uint16
	DirectionNorthSouth              fields.DirectionNorthSouth
	VelocityNSStatus                 fields.NumericValueStatus
	VelocityNS                       uint16
	DifferenceAltitudeGNSSBaroStatus fields.NumericValueStatus
	DifferenceAltitudeGNSSBaro       int16
}

AirborneVelocityGroundSpeedSupersonic is a message at the format BDS 9,0

func (*AirborneVelocityGroundSpeedSupersonic) UnmarshalBytes

func (msg *AirborneVelocityGroundSpeedSupersonic) UnmarshalBytes(data []byte) error

type AircraftIdentificationAndCategory

type AircraftIdentificationAndCategory struct {
	FormatType     byte
	CategorySet    byte
	Category       byte
	Identification string
}

func (*AircraftIdentificationAndCategory) UnmarshalBytes

func (msg *AircraftIdentificationAndCategory) UnmarshalBytes(data []byte) error

type AircraftStatusACAS

type AircraftStatusACAS struct {
	FormatType         byte
	SubType            byte
	ResolutionAdvisory ResolutionAdvisory
}

type AircraftStatusEmergency

type AircraftStatusEmergency struct {
	FormatType              byte
	SubType                 byte
	EmergencyPriorityStatus fields.EmergencyPriorityStatus
	ModeACode               uint16
}

func (*AircraftStatusEmergency) UnmarshalBytes

func (msg *AircraftStatusEmergency) UnmarshalBytes(data []byte) error

type AircraftStatusNoInformation

type AircraftStatusNoInformation struct {
	FormatType              byte
	SubType                 byte
	EmergencyPriorityStatus fields.EmergencyPriorityStatus
}

func (*AircraftStatusNoInformation) UnmarshalBytes

func (msg *AircraftStatusNoInformation) UnmarshalBytes(data []byte) error

type Message

type Message []byte

func (Message) FormatType

func (msg Message) FormatType() byte

FormatType returns the format type code

Code BDS Description V0 V1 V2

0      ?   No Position
1     0,8  Aircraft Id           OK      OK      OK
2     0,8  Aircraft Id           OK      OK      OK
3     0,8  Aircraft Id           OK      OK      OK
4     0,8  Aircraft Id           OK      OK      OK
5     0,6  Surface position      OK      OK      OK
6     0,6  Surface position      OK      OK      OK
7     0,6  Surface position      OK      OK      OK
8     0,6  Surface position      OK      OK      OK
9     0,5  Airborne position     OK      OK      OK

10 0,5 Airborne position OK OK OK 14 0,5 Airborne position OK OK OK 12 0,5 Airborne position OK OK OK 13 0,5 Airborne position OK OK OK 14 0,5 Airborne position OK OK OK 15 0,5 Airborne position OK OK OK 16 0,5 Airborne position OK OK OK 17 0,5 Airborne position OK OK OK 18 0,5 Airborne position OK OK OK 19 0,9 Airborne velocity OK OK OK 20 0,5 Airborne position OK OK OK 21 0,5 Airborne position OK OK OK 22 0,5 Airborne position OK OK OK 23 Reserved 24 Reserved 25 Reserved 26 Reserved 27 Reserved 28 6,1 Emergency report OK OK OK 29 6,2 Target and status __ OK OK 30 Reserved 31 6,5 Operational status OK OK OK

func (Message) Payload

func (msg Message) Payload() (Payload, error)

type NoPositionInformation

type NoPositionInformation struct {
	FormatType                  byte
	AltitudeBarometric          int32
	NavigationIntegrityCategory byte
}

func (*NoPositionInformation) UnmarshalBytes

func (msg *NoPositionInformation) UnmarshalBytes(data []byte) error

type Payload

type Payload interface {
	UnmarshalBytes([]byte) error
}

type ResolutionAdvisory

type ResolutionAdvisory struct {
	ActiveRA                ActiveResolutionAdvisory
	RAComplement            RAComplement
	RATerminatedIndicator   RATerminatedIndicator
	MultipleThreatEncounter MultipleThreatEncounter
	ThreatTypeIndicator     ThreatTypeIndicator
	ThreatIdentityAddress   *ThreatIdentityAddress
	ThreatIdentityAltitude  *ThreatIdentityAltitude
	ThreatIdentityRange     *ThreatIdentityRange
	ThreatIdentityBearing   *ThreatIdentityBearing
}

ResolutionAdvisory is an ACAS message providing information about ResolutionAdvisory

Defined at 3.1.2.8.3.1 and 4.3.8.4.2.4

type SurfacePosition

type SurfacePosition struct {
	FormatType                     byte
	MovementStatus                 fields.MovementStatus
	MovementSpeed                  float64
	GroundTrackStatus              bool
	GroundTrack                    float64
	TimeSynchronizedToUTC          bool
	CompactPositionReportingFormat fields.CompactPositionReportingFormat
	EncodedLatitude                fields.EncodedLatitude
	EncodedLongitude               fields.EncodedLongitude
}

func (*SurfacePosition) UnmarshalBytes

func (msg *SurfacePosition) UnmarshalBytes(data []byte) error

type TargetStateAndStatus0

type TargetStateAndStatus0 struct {
	FormatType                             byte
	SubType                                byte
	VerticalDataAvailableSourceIndicator   fields.VerticalDataAvailableSourceIndicator
	TargetAltitudeType                     fields.TargetAltitudeType
	TargetAltitudeCapability               fields.TargetAltitudeCapability
	VerticalModeIndicator                  fields.VerticalModeIndicator
	TargetAltitudeStatus                   fields.NumericValueStatus
	TargetAltitude                         int32
	HorizontalDataAvailableSourceIndicator fields.HorizontalDataAvailableSourceIndicator
	TargetHeadingTrackAngleStatus          fields.NumericValueStatus
	TargetHeadingTrackAngle                uint16
	TargetHeadingTrackIndicator            fields.TargetHeadingTrackIndicator
	HorizontalModeIndicator                fields.HorizontalModeIndicator
	NavigationalAccuracyCategoryPosition   fields.NavigationalAccuracyCategoryPositionV1
	NICBaro                                fields.NICBaro
	SurveillanceIntegrityLevel             fields.SurveillanceIntegrityLevel
	CapabilityModeCode                     fields.CapabilityModeCode
	EmergencyPriorityStatus                fields.EmergencyPriorityStatus
}

func (*TargetStateAndStatus0) UnmarshalBytes

func (msg *TargetStateAndStatus0) UnmarshalBytes(data []byte) error

type ThreatIdentityAddress

type ThreatIdentityAddress uint32

ThreatIdentityAddress is a 3 bytes ICAO Address. The Most Significant Byte of the address is always 0.

type ThreatIdentityAltitude

type ThreatIdentityAltitude struct {
	AltitudeValid  bool
	AltitudeInFeet int32
}

ThreatIdentityAltitude is the altitude of the threat. It is given in 100 feet increment

type ThreatIdentityBearing

type ThreatIdentityBearing byte

ThreatIdentityBearing is TIDR (threat identity data bearing subfield). This 6-bit subfield (83-88) shall contain the most recent estimated bearing of the threat aircraft, relative to the ACAS aircraft heading.

type ThreatIdentityRange

type ThreatIdentityRange byte

ThreatIdentityRange is TIDR (threat identity data range subfield). This 7-bit subfield (76-82) shall contain the most recent threat range estimated by ACAS.

type ThreatTypeIndicator

type ThreatTypeIndicator int

ThreatTypeIndicator indicates the type of information contained in the TID part of the message

const (
	ThreatTypeNoIdentity           ThreatTypeIndicator = iota // No identity data in TID
	ThreatTypeModeS                                           // Contains a Mode S transponder address
	ThreatTypeAltitudeRangeBearing                            // Contains altitude, range and bearing data
	ThreatTypeReserved3                                       // Reserved
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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