airport

package
v0.0.0-...-4beeb2d Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	X_min float64 = 10
	X_max float64 = 70
	Y_min float64 = -30
	Y_max float64 = 30
)
View Source
const (
	Empty    int = -1
	Walkable int = 0
	Wall     int = 1
	Person   int = 2
	Bay      int = 3
)

Int mapping

Variables

View Source
var AirportMap [][]int

Functions

func CreateEmptyMatrix

func CreateEmptyMatrix(dim int) [][]int

func NextStep

func NextStep(pos, target, lastPos Point) (string, error)

func PrintMatrix

func PrintMatrix(matrix [][]int)

func PrintResults

func PrintResults(matrix [][]int, start Point, goal Point)

func TestAlgos

func TestAlgos()

func TestLogic

func TestLogic() bool

func Void

func Void()

Types

type Location

type Location struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type Node

type Node struct {
	P Point
	// contains filtered or unexported fields
}

func AStar

func AStar(matrix [][]int, start, goal Point) []*Node

func Dijkstra

func Dijkstra(matrix [][]int, start, goal Point) []*Node

type Point

type Point struct {
	X, Y int
}

func GenerateRandomMapWithWallsAndBays

func GenerateRandomMapWithWallsAndBays(rows, cols, numWalls, numBays int) ([][]int, []Point)

func GetTarget

func GetTarget(uid string) (Point, error)

func Gps2D

func Gps2D(jsonData string) (Point, error)

func (Point) String

func (d Point) String() string

type PriorityQueue

type PriorityQueue []*Node

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x interface{})

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

Jump to

Keyboard shortcuts

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