Documentation ¶
Overview ¶
package types contains types used by the TacView clients
Index ¶
- Constants
- func ParseTimeFrame(line string) (time.Duration, error)
- type Coordinates
- type Object
- func (o *Object) GetAngle(property string) (unit.Angle, error)
- func (o *Object) GetCoordinates(ref orb.Point) (*Coordinates, error)
- func (o *Object) GetLength(property string) (unit.Length, error)
- func (o *Object) GetProperty(p string) (string, bool)
- func (o *Object) GetSpeed(property string) (unit.Speed, error)
- func (o *Object) GetTypes() ([]string, error)
- func (o *Object) Properties() map[string]string
- func (o *Object) SetProperty(p, v string)
- func (o *Object) Update(update *ObjectUpdate, ref orb.Point) error
- type ObjectUpdate
Constants ¶
View Source
const GlobalObjectID = 0
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Coordinates ¶
type Coordinates struct {
// Flag indicating the presence or absence of the related field
ValidLon, ValidLat bool
// Location is the object's lon/lat position
Location orb.Point
// Altitude above sea level
Altitude *unit.Length
// X is the object's native coordinate within the sim
X *float64
// Y is the object's native coordiante within the sim
Y *float64
// Roll angle
Roll *unit.Angle
// Pitch angle
Pitch *unit.Angle
// Yaw angle (this may be different from heading)
Yaw *unit.Angle
// Heading is the object's flat earth heading
Heading *unit.Angle
}
func NewCoordinates ¶ added in v0.5.2
func (*Coordinates) Parse ¶ added in v0.5.2
func (c *Coordinates) Parse(transform string, ref orb.Point) error
func (*Coordinates) Transform ¶ added in v0.5.2
func (c *Coordinates) Transform(ref orb.Point) string
func (*Coordinates) Update ¶ added in v0.5.2
func (c *Coordinates) Update(next *Coordinates)
type Object ¶
type Object struct { ID uint64 // contains filtered or unexported fields }
func (*Object) GetCoordinates ¶
func (o *Object) GetCoordinates(ref orb.Point) (*Coordinates, error)
GetCoordinates returns the coordinates of the object, if possible. Many objects have insufficient information to determine their coordinates. In such a case, the function returns nil and no error. ref is the reference point from the global properties.
func (*Object) Properties ¶
func (*Object) SetProperty ¶
type ObjectUpdate ¶
func ParseObjectUpdate ¶
func ParseObjectUpdate(line string) (*ObjectUpdate, error)
Click to show internal directories.
Click to hide internal directories.