Documentation ¶
Index ¶
- Constants
- func ReplanMission(m Mission, agentholders map[string]AgentHolder, zoom maptile.Zoom) (map[string]Mission, error)
- type Agent
- type AgentHolder
- type AgentType
- type Goal
- type MetaNeeded
- type Mission
- func (m *Mission) GenerateEnvelope(a Agent, zoom maptile.Zoom) (orb.Geometry, error)
- func (m *Mission) GeneratePath(ah AgentHolder, zoom maptile.Zoom) (orb.Geometry, error)
- func (m *Mission) LoadFeatures(path string)
- func (m *Mission) MissionArea() (centre orb.Point, area float64)
- func (m Mission) String() string
- func (m *Mission) UnmarshalJSON(rawData []byte) error
- type MissionType
- type State
- type Vector
Constants ¶
const ( ControllerAgent = 0 ContextAgent = 1 )
Variables ¶
This section is empty.
Functions ¶
func ReplanMission ¶
func ReplanMission(m Mission, agentholders map[string]AgentHolder, zoom maptile.Zoom) (map[string]Mission, error)
ReplanMission will give you a new plan split betweena all agents
Types ¶
type Agent ¶
type Agent struct { UUID string Nick string URI string Position Vector Key string Battery int MovementDimensions int Hardware []string Software []string }
An Agent is a thing - anything that can move
type AgentHolder ¶
type MetaNeeded ¶
type MetaNeeded struct { MovementAxis int SwarmSW []string OnboardHW []string DataCollection string }
MetaNeeded is the needed metadata
type Mission ¶
type Mission struct { Description string MissionType MissionType AreaLink string MetaNeeded MetaNeeded Goal Goal Geometry orb.Geometry SwarmGeometry orb.Geometry }
Mission is the main datatype
func (*Mission) GenerateEnvelope ¶
GenerateEnvelope generates a new polygon based on Zoom is the granularity of the path TODO: Maybe use information in agent to automatically guess zoom, or something else
func (*Mission) GeneratePath ¶
GeneratePath to follow based on mission Zoom is the granularity of the path TODO: Maybe use information in agent to automatically guess zoom, or something else
func (*Mission) LoadFeatures ¶
LoadFeatures loads stuff from file
func (*Mission) MissionArea ¶
MissionArea will say something intelligent about the mission
func (*Mission) UnmarshalJSON ¶
UnmarshalJSON will unmarshal the correct geometry from the json structure. This is being done by hand so we can hide the Geometry Unmarshalling
type MissionType ¶
type MissionType string
MissionType is a String
const (
Find MissionType = "find"
)
The types of mission abailable
type Vector ¶
type Vector struct {
X, Y, Z float64
}
Point - struct holding X Y Z values
func (Vector) MultiplyByScalar ¶
MultiplyByScalar - multiplies a Vector by s float64