Documentation ¶
Index ¶
- Constants
- func ComputeHeadingError(heading float64, gpsHeading float64, headingOffset float64) float64
- type Alarm
- type Controller
- type FixStatus
- type GPSFeedBackAction
- type Info
- type InputStatus
- type Led
- type Leds
- type Pilot
- func (p *Pilot) Disable() error
- func (p *Pilot) Enable() error
- func (p *Pilot) GetInfoAction() Info
- func (p *Pilot) SetAlarmChan(c chan interface{})
- func (p *Pilot) SetDashboardChan(c chan interface{})
- func (p *Pilot) SetInputChan(c chan interface{})
- func (p *Pilot) SetOffset(headingOffset float64) error
- func (p *Pilot) SetPanicChan(c chan interface{})
- func (p *Pilot) SetSteeringChan(c chan interface{})
- func (p Pilot) Shutdown()
- func (p Pilot) Start()
Constants ¶
const ( // RAISED alarm RAISED = true // UNRAISED alarm UNRAISED = false )
const ( NoFix = 0 Fix = 1 DGpsFix = 2 )
Values for FixStatus
const ( // INVALID course INVALID = false // VALID course VALID = true )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alarm ¶
type Alarm bool
Alarm is true when the alarm is raised. You can use RAISED and UNRAISED const.
type Controller ¶
type Controller interface { Set(sp float64) Update(value float64) float64 OutputLimits() (float64, float64) }
Controller provides the correction for a given setpoint and error value as provided to Update
type GPSFeedBackAction ¶
type GPSFeedBackAction struct { Heading float64 Validity bool Speed float64 Latitude nmea.LatLong Longitude nmea.LatLong Date string Time string }
GPSFeedBackAction is the message provided by the GPS component
type Info ¶
type Info struct { Course float64 SetPoint float64 HeadingOffset float64 Speed float64 Enabled bool }
Info contains the Pilot state information as used by the Webserver for example
type Pilot ¶
type Pilot struct {
// contains filtered or unexported fields
}
Pilot is the main type for the component that decide what correction to apply depending on the provided course and setpoint and various other configuration parameters
func New ¶
func New(controller Controller, bound float64) *Pilot
New creates a new Pilot from a particular controller.
func (*Pilot) GetInfoAction ¶
GetInfoAction returns the current Info
func (*Pilot) SetAlarmChan ¶
func (p *Pilot) SetAlarmChan(c chan interface{})
SetAlarmChan sets the channel where the pilot send the alarm state updates
func (*Pilot) SetDashboardChan ¶
func (p *Pilot) SetDashboardChan(c chan interface{})
SetDashboardChan sets the channel to reach teh dashboard
func (*Pilot) SetInputChan ¶
func (p *Pilot) SetInputChan(c chan interface{})
SetInputChan sets the channel where the gps course has to be sent
func (*Pilot) SetPanicChan ¶
func (p *Pilot) SetPanicChan(c chan interface{})
SetPanicChan sets the channel where the panic message have to be sent
func (*Pilot) SetSteeringChan ¶
func (p *Pilot) SetSteeringChan(c chan interface{})
SetSteeringChan sets the channel where the pilot send the steering corrections