fields

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveRAMultipleThreatsDifferentSeparation

type ActiveRAMultipleThreatsDifferentSeparation struct {
	RequiresCorrectionUpwardSense   bool
	RequiresPositiveClimb           bool
	RequiresCorrectionDownwardSense bool
	RequiresPositiveDescend         bool
	RequiresCrossing                bool
	IsSenseReversal                 bool
}

ActiveRAMultipleThreatsDifferentSeparation is one of the possible resolution advisory contained in a MV field

func ReadARAMultipleThreatsDifferentSeparation

func ReadARAMultipleThreatsDifferentSeparation(data []byte) *ActiveRAMultipleThreatsDifferentSeparation

ReadARAMultipleThreatsDifferentSeparation reads the 14 bits data that constitutes the Active Resolution field (ARA)

func (ActiveRAMultipleThreatsDifferentSeparation) GetType

func (multipleThreatsDifferentSeparation ActiveRAMultipleThreatsDifferentSeparation) GetType() RAType

GetType returns the type of Resolution Advisory

func (ActiveRAMultipleThreatsDifferentSeparation) ToString

func (multipleThreatsDifferentSeparation ActiveRAMultipleThreatsDifferentSeparation) ToString() string

ToString returns a basic, but readable, representation of the field

type ActiveRANoVerticalRAGenerated

type ActiveRANoVerticalRAGenerated struct{}

ActiveRANoVerticalRAGenerated is one of the possible resolution advisory contained in a MV field

func (ActiveRANoVerticalRAGenerated) GetType

func (noVerticalRAGenerated ActiveRANoVerticalRAGenerated) GetType() RAType

GetType returns the type of Resolution Advisory

func (ActiveRANoVerticalRAGenerated) ToString

func (noVerticalRAGenerated ActiveRANoVerticalRAGenerated) ToString() string

ToString returns a basic, but readable, representation of the field

type ActiveRAOneThreatOrSameSeparation

type ActiveRAOneThreatOrSameSeparation struct {
	PreventiveCorrective         ActiveRAPreventiveCorrective
	Sense                        ActiveRASense
	IsIncreasedRate              bool
	IsSenseReversal              bool
	IsAltitudeCrossing           bool
	VerticalSpeedLimitOrPositive ActiveRAVerticalSpeedLimitOrPositive
}

ActiveRAOneThreatOrSameSeparation is one of the possible resolution advisory contained in a MV field

func ReadARAOneThreatOrSameSeparation

func ReadARAOneThreatOrSameSeparation(data []byte) *ActiveRAOneThreatOrSameSeparation

ReadARAOneThreatOrSameSeparation reads the 14 bits data that constitutes the Active Resolution field (ARA)

func (ActiveRAOneThreatOrSameSeparation) GetType

func (oneThreatOrSameSeparation ActiveRAOneThreatOrSameSeparation) GetType() RAType

GetType returns the type of Resolution Advisory

func (ActiveRAOneThreatOrSameSeparation) ToString

func (oneThreatOrSameSeparation ActiveRAOneThreatOrSameSeparation) ToString() string

ToString returns a basic, but readable, representation of the field

type ActiveRAPreventiveCorrective

type ActiveRAPreventiveCorrective int

ActiveRAPreventiveCorrective is a subfield of the ActiveRA

const (
	// ActiveRAPreventive signifies the RA is preventive
	ActiveRAPreventive ActiveRAPreventiveCorrective = 0
	// ActiveRACorrective signifies the RA is corrective
	ActiveRACorrective ActiveRAPreventiveCorrective = 1
)

func (ActiveRAPreventiveCorrective) ToString

func (preventiveCorrective ActiveRAPreventiveCorrective) ToString() string

ToString returns a basic, but readable, representation of the field

type ActiveRASense

type ActiveRASense int

ActiveRASense is a subfield of the ActiveRA

const (
	// ActiveRASenseUpward signifies that the upward sense RA has been generated
	ActiveRASenseUpward ActiveRASense = 0
	// ActiveRASenseDownward signifies that the downward sense RA has been generated
	ActiveRASenseDownward ActiveRASense = 1
)

func (ActiveRASense) ToString

func (sense ActiveRASense) ToString() string

ToString returns a basic, but readable, representation of the field

type ActiveRAVerticalSpeedLimitOrPositive

type ActiveRAVerticalSpeedLimitOrPositive int

ActiveRAVerticalSpeedLimitOrPositive is a subfield of the ActiveRA

const (
	// ActiveRAVerticalSpeedLimit signifies that the RA is VerticalSpeedLimit
	ActiveRAVerticalSpeedLimit ActiveRAVerticalSpeedLimitOrPositive = 0
	// ActiveRAPositive signifies that the RA is positive
	ActiveRAPositive ActiveRAVerticalSpeedLimitOrPositive = 1
)

func (ActiveRAVerticalSpeedLimitOrPositive) ToString

func (verticalSpeedLimitOrPositive ActiveRAVerticalSpeedLimitOrPositive) ToString() string

ToString returns a basic, but readable, representation of the field

type ActiveResolutionAdvisory

type ActiveResolutionAdvisory interface {
	// GetType returns the type of Resolution Advisory
	GetType() RAType
	// ToString returns a basic, but readable, representation of the field
	ToString() string
}

ActiveResolutionAdvisory is the base type that all Resolution Advisory should implement

func ReadActiveResolutionAdvisory

func ReadActiveResolutionAdvisory(data []byte) ActiveResolutionAdvisory

ReadActiveResolutionAdvisory reads a ActiveResolutionAdvisory field

type AltitudeStatus added in v0.3.0

type AltitudeStatus byte

AltitudeStatus is the status of the Altitude

const (
	// AltitudeInvalid signifies that altitude information is not available or that the altitude has been determined invalid.
	AltitudeInvalid AltitudeStatus = 0
	// AltitudeValid signifies that altitude is valid.
	AltitudeValid AltitudeStatus = 1
)

func (AltitudeStatus) ToString added in v0.3.0

func (altitudeStatus AltitudeStatus) ToString() string

ToString returns a basic, but readable, representation of the field

type MultipleThreatEncounter

type MultipleThreatEncounter byte

MultipleThreatEncounter indicates whether two or more simultaneous threats are currently being processed by the ACAS threat resolution logic.

const (
	// MTEOneOrZero signifies that one or no threat is being processed
	MTEOneOrZero MultipleThreatEncounter = 0
	// MTETwoOrMore signifies that two or more simultaneous threats are being processed
	MTETwoOrMore MultipleThreatEncounter = 1
)

func ReadMultipleThreatEncounter

func ReadMultipleThreatEncounter(data []byte) MultipleThreatEncounter

ReadMultipleThreatEncounter reads the bit data that constitutes the MultipleThreatEncounter field (MTE)

func (MultipleThreatEncounter) ToString

func (multipleThreatEncounter MultipleThreatEncounter) ToString() string

ToString returns a basic, but readable, representation of the field

type RAComplement

type RAComplement struct {
	// DoNotPassBelow signifies that the other aircraft ask to not pass below
	DoNotPassBelow bool
	// DoNotPassAbove signifies that the other aircraft ask to not pass above
	DoNotPassAbove bool
	// DoNotTurnLeft signifies that the other aircraft ask to not turn left
	DoNotTurnLeft bool
	// DoNotTurnRight signifies that the other aircraft ask to not turn right
	DoNotTurnRight bool
}

RAComplement indicates all the currently active RACs, if any, received from other ACAS aircraft.

func ReadRAComplement

func ReadRAComplement(data []byte) RAComplement

ReadRAComplement reads the bit data that constitutes the Resolution Advisory Complement (RAC)

func (RAComplement) ToString

func (complement RAComplement) ToString() string

ToString returns a basic, but readable, representation of the field

type RATerminatedIndicator

type RATerminatedIndicator int

RATerminatedIndicator indicates when an RA previously generated by ACAS has ceased being generated.

const (
	// RATCurrent signifies that ACAS is currently generating the RA indicated in the ARA subfield
	RATCurrent RATerminatedIndicator = 0
	// RATTerminated signifies that the RA indicated by the ARA subfield has been terminated
	RATTerminated RATerminatedIndicator = 1
)

func ReadRATerminatedIndicator

func ReadRATerminatedIndicator(data []byte) RATerminatedIndicator

ReadRATerminatedIndicator reads the bit data that constitutes the Resolution Advisory Terminated Indicator field (RAT)

func (RATerminatedIndicator) ToString

func (terminatedIndicator RATerminatedIndicator) ToString() string

ToString returns a basic, but readable, representation of the field

type RAType

type RAType int

RAType defines the type of the Resolution Advisory

const (
	// OneThreatOrSameSeparation indicates that the Resolution Advisory is for single threat or multiple threats with
	// the same separation
	OneThreatOrSameSeparation RAType = 0
	// MultipleThreatDifferentSeparation indicates that the Resolution Advisory is for multiple threats with
	// different separation
	MultipleThreatDifferentSeparation RAType = 1
	// NoVerticalRAGenerated indicates that no Resolution Advisory was generated
	NoVerticalRAGenerated RAType = 2
)

type ThreatIdentityAddress added in v0.3.0

type ThreatIdentityAddress uint32

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

func ReadThreatIdentityAddress added in v0.3.0

func ReadThreatIdentityAddress(data []byte) ThreatIdentityAddress

ReadThreatIdentityAddress reads the ThreatIdentityAddress

func (ThreatIdentityAddress) ToString added in v0.3.0

func (address ThreatIdentityAddress) ToString() string

ToString returns a string representation of an address

type ThreatIdentityAltitude added in v0.3.0

type ThreatIdentityAltitude struct {
	AltitudeStatus AltitudeStatus
	AltitudeInFeet int32
}

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

func ReadThreatIdentityAltitude added in v0.3.0

func ReadThreatIdentityAltitude(data []byte) (ThreatIdentityAltitude, error)

ReadThreatIdentityAltitude reads the altitude code from a message

func (ThreatIdentityAltitude) ToString added in v0.3.0

func (altitude ThreatIdentityAltitude) ToString() string

ToString returns a basic, but readable, representation of the field

type ThreatIdentityBearing added in v0.3.0

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.

func ReadThreatIdentityBearing added in v0.3.0

func ReadThreatIdentityBearing(data []byte) ThreatIdentityBearing

ReadThreatIdentityBearing reads the ThreatIdentityBearing

func (ThreatIdentityBearing) GetBearing added in v0.3.0

func (threatBearing ThreatIdentityBearing) GetBearing() int

GetBearing returns the approximate numeric value of the bearing. Note that for extreme values, nonsense are returned. A message's bearing with a value of 0 or 1 is returned as 0.0. A message's bearing with a value of 61 or more is returned as 363. The bearing is normally a range between 6*(bearing value-1) and 6*bearing vale. To return just a single value, this function returns the approximate, which is 6*bearing vale - 3

func (ThreatIdentityBearing) ToString added in v0.3.0

func (threatBearing ThreatIdentityBearing) ToString() string

ToString returns a string representation of an address

type ThreatIdentityRange added in v0.3.0

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.

func ReadThreatIdentityRange added in v0.3.0

func ReadThreatIdentityRange(data []byte) ThreatIdentityRange

ReadThreatIdentityRange reads the ThreatIdentityRange

func (ThreatIdentityRange) GetRange added in v0.3.0

func (threatRange ThreatIdentityRange) GetRange() float64

GetRange returns the numeric value of the range. Note that for extreme values, approximations are returned. A message's range with a value of 0 or 1 is returned as 0.0. A message's range with a value of 127 or more is returned as 12.6.

func (ThreatIdentityRange) ToString added in v0.3.0

func (threatRange ThreatIdentityRange) ToString() string

ToString returns a string representation of an address

type ThreatTypeIndicator added in v0.3.0

type ThreatTypeIndicator int

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

const (
	// ThreatTypeNoIdentity signifies No identity data in TID
	ThreatTypeNoIdentity ThreatTypeIndicator = 0
	// ThreatTypeModeS signifies that the TID contains a Mode S transponder address
	ThreatTypeModeS ThreatTypeIndicator = 1
	// ThreatTypeAltitudeRangeBearing signifies that the TID contains altitude, range and bearing data
	ThreatTypeAltitudeRangeBearing ThreatTypeIndicator = 2
	// ThreatTypeReserved3 is not assigned
	ThreatTypeReserved3 ThreatTypeIndicator = 3
)

func ReadThreatTypeIndicator added in v0.3.0

func ReadThreatTypeIndicator(data []byte) ThreatTypeIndicator

ReadThreatTypeIndicator reads the ThreatTypeIndicator

func (ThreatTypeIndicator) ToString added in v0.3.0

func (indicator ThreatTypeIndicator) ToString() string

ToString returns a basic, but readable, representation of the field

Jump to

Keyboard shortcuts

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