ardupilot

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(endpoints ...gomavlib.EndpointConf) (*Controller, error)

func (*Controller) Broadcast

func (c *Controller) Broadcast(msg any) error

func (*Controller) BroadcastRTCM

func (c *Controller) BroadcastRTCM(buf []byte) error

func (*Controller) Close

func (c *Controller) Close() error

func (*Controller) Context

func (c *Controller) Context() context.Context

func (*Controller) Drones

func (c *Controller) Drones() (drones []drone.Drone)

func (*Controller) Endpoints

func (c *Controller) Endpoints() []*drone.Endpoint

func (*Controller) Events

func (c *Controller) Events() <-chan drone.Event

func (*Controller) GetBootTime

func (c *Controller) GetBootTime() time.Time

func (*Controller) GetBootTimeMs

func (c *Controller) GetBootTimeMs() uint32

func (*Controller) GetDrone

func (c *Controller) GetDrone(id int) drone.Drone

type Drone

type Drone struct {
	DroneExtraInfo
	// contains filtered or unexported fields
}

func (*Drone) ActiveLED

func (d *Drone) ActiveLED(ctx context.Context, color drone.Color, dur time.Duration) error

func (*Drone) Arm

func (d *Drone) Arm(ctx context.Context) error

Arm arms the drone after prearm checks Drone will automaticly disarm after a period

func (*Drone) Continue

func (d *Drone) Continue(ctx context.Context) error

func (*Drone) DisableFence

func (d *Drone) DisableFence(ctx context.Context) error

func (*Drone) Disarm

func (d *Drone) Disarm(ctx context.Context) error

func (*Drone) ExtraInfo

func (d *Drone) ExtraInfo() any

func (*Drone) ForceArm

func (d *Drone) ForceArm(ctx context.Context) error

func (*Drone) ForceDisarm

func (d *Drone) ForceDisarm(ctx context.Context) error

func (*Drone) GetBattery

func (d *Drone) GetBattery() *drone.BatteryStat

func (*Drone) GetBootTime

func (d *Drone) GetBootTime() time.Time

func (*Drone) GetGPS

func (d *Drone) GetGPS() *drone.Gps

func (*Drone) GetGPSType

func (d *Drone) GetGPSType() int

func (*Drone) GetHome

func (d *Drone) GetHome() *drone.Gps

func (*Drone) GetLED

func (d *Drone) GetLED() drone.Color

func (*Drone) GetMode

func (d *Drone) GetMode() int

func (*Drone) GetPing

func (d *Drone) GetPing() time.Duration

func (*Drone) GetRotate

func (d *Drone) GetRotate() *drone.Rotate

func (*Drone) GetSatelliteCount

func (d *Drone) GetSatelliteCount() int

func (*Drone) GetStatus

func (d *Drone) GetStatus() drone.DroneStatus

func (*Drone) Hold

func (d *Drone) Hold(ctx context.Context) error

func (*Drone) Home

func (d *Drone) Home(ctx context.Context) error

func (*Drone) ID

func (d *Drone) ID() int

func (*Drone) Land

func (d *Drone) Land(ctx context.Context) error

func (*Drone) LastActivate

func (d *Drone) LastActivate() time.Time

func (*Drone) MoveNED added in v0.2.1

func (d *Drone) MoveNED(ctx context.Context, dir *vec3.T) error

MoveNED requires the drone in GUIDED(4) mode

func (*Drone) MoveTo

func (d *Drone) MoveTo(ctx context.Context, pos *drone.Gps) error

MoveTo requires the drone in GUIDED(4) mode

func (*Drone) MoveToYaw

func (d *Drone) MoveToYaw(ctx context.Context, pos *drone.Gps, heading float32) error

MoveToYaw requires the drone in GUIDED(4) mode heading is the yaw angle in degrees

func (*Drone) MoveUntilReached

func (d *Drone) MoveUntilReached(ctx context.Context, target *drone.Gps, radius float32) error

func (*Drone) MoveWithYawUntilReached

func (d *Drone) MoveWithYawUntilReached(ctx context.Context, target *drone.Gps, heading float32, radius float32) error

func (*Drone) Name

func (d *Drone) Name() string

func (*Drone) Ping

func (d *Drone) Ping(ctx context.Context) error

func (*Drone) Reboot

func (d *Drone) Reboot(ctx context.Context) error

func (*Drone) RequestMessage

func (d *Drone) RequestMessage(ctx context.Context, id uint32) (message.Message, error)

func (*Drone) ResetLED

func (d *Drone) ResetLED(ctx context.Context) error

func (*Drone) RotateUntilYaw

func (d *Drone) RotateUntilYaw(ctx context.Context, yaw, diff float32) error

func (*Drone) RotateYaw

func (d *Drone) RotateYaw(ctx context.Context, yaw float32) error

func (*Drone) SendCommandInt

func (d *Drone) SendCommandInt(
	ctx context.Context,
	frame common.MAV_FRAME,
	cmd common.MAV_CMD,
	arg1, arg2, arg3, arg4 float32,
	x, y int32, z float32,
) (*common.MessageCommandAck, error)

func (*Drone) SendCommandIntOrError

func (d *Drone) SendCommandIntOrError(
	ctx context.Context,
	frame common.MAV_FRAME,
	cmd common.MAV_CMD,
	arg1, arg2, arg3, arg4 float32,
	x, y int32, z float32,
) error

func (*Drone) SendCommandLong

func (d *Drone) SendCommandLong(
	ctx context.Context,
	progCh chan<- uint8,
	cmd common.MAV_CMD,
	arg1, arg2, arg3, arg4, arg5, arg6, arg7 float32,
) (*common.MessageCommandAck, error)

func (*Drone) SendCommandLongOrError

func (d *Drone) SendCommandLongOrError(
	ctx context.Context,
	progCh chan<- uint8,
	cmd common.MAV_CMD,
	arg1, arg2, arg3, arg4, arg5, arg6, arg7 float32,
) error

func (*Drone) SendMessage

func (d *Drone) SendMessage(msg any) error

func (*Drone) SendRequestMessage

func (d *Drone) SendRequestMessage(ctx context.Context, id uint32) error

func (*Drone) SendRequestMessageWithType

func (d *Drone) SendRequestMessageWithType(ctx context.Context, msg message.Message) error

func (*Drone) SetFence

func (d *Drone) SetFence(ctx context.Context, vectors []*drone.Gps) error

func (*Drone) SetMission

func (d *Drone) SetMission(ctx context.Context, path []*drone.Gps) error

func (*Drone) StartMission

func (d *Drone) StartMission(ctx context.Context, startId, endId int) error

func (*Drone) String

func (d *Drone) String() string

func (*Drone) Takeoff

func (d *Drone) Takeoff(ctx context.Context) error

Takeoff should be called in POSHOLD or GUIDED mode

func (*Drone) TakeoffWithHeight

func (d *Drone) TakeoffWithHeight(ctx context.Context, height float32) error

func (*Drone) UpdateHome

func (d *Drone) UpdateHome(ctx context.Context, pos *drone.Gps) error

func (*Drone) UpdateMessageInterval

func (d *Drone) UpdateMessageInterval(ctx context.Context, id uint32, dur time.Duration) error

func (*Drone) UpdateMode

func (d *Drone) UpdateMode(ctx context.Context, mode int) error

func (*Drone) WaitUntilArrived

func (d *Drone) WaitUntilArrived(ctx context.Context, id int) error

func (*Drone) WaitUntilReady

func (d *Drone) WaitUntilReady(ctx context.Context) error

func (*Drone) WriteFrame

func (d *Drone) WriteFrame(msg frame.Frame) error

func (*Drone) WriteMessage

func (d *Drone) WriteMessage(msg message.Message) error

type DroneExtraInfo

type DroneExtraInfo struct {
	LED           drone.Color `json:"LED"`
	Freemem       uint16      `json:"freemem"`
	WindDirection float32     `json:"wind-direction"`
	WindSpeed     float32     `json:"wind-speed"`
	WindSpeedZ    float32     `json:"wind-speed-z"`
}

type MavMissionResultError

type MavMissionResultError struct {
	Result common.MAV_MISSION_RESULT
}

func (*MavMissionResultError) Error

func (e *MavMissionResultError) Error() string

type MavResultError

type MavResultError struct {
	Result common.MAV_RESULT
}

func (*MavResultError) Error

func (e *MavResultError) Error() string

Jump to

Keyboard shortcuts

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