Documentation ¶
Index ¶
- Constants
- Variables
- func AnnularPoint(centre complex128, innerRadius, outerRadius float64) complex128
- func AnnularRingEqPoints(centre complex128, outerRadius float64, N int) vlib.VectorC
- func AnnularRingPoints(centre complex128, innerRadius, outerRadius float64, N int) vlib.VectorC
- func CircularPoints(centre complex128, radius float64, N int) vlib.VectorC
- func ClosestMirror(mirrorTable []vlib.Location3D, pt vlib.Location3D) (distance float64, indx int, dv vlib.Location3D)
- func ClosestMirror19Cell(mirrorTable map[vlib.Location3D]int, pt vlib.Location3D, gap float64, prev int, ...) int
- func Cube2XY(cube vlib.Location3D, hexsize float64) vlib.Location3D
- func CubeMirrors(r int) []vlib.Location3D
- func ForceMinDistance(in vlib.VectorC, d, hexradius float64) vlib.VectorC
- func HexGrid(N int, center vlib.Location3D, hexsize float64, RDEGREE float64) []vlib.Location3D
- func HexGridRandU(GridCentre complex128, hexCellCount int, hexRadius float64, NperHexCell int, ...) vlib.VectorC
- func HexRandPoints(N int, hexRadius float64) vlib.VectorC
- func HexRandU(centre complex128, hexRadius float64, Npoints int, rdegree float64) vlib.VectorC
- func HexVertices(centre complex128, length float64, degree float64) vlib.VectorC
- func HexWrapGrid(N int, center vlib.Location3D, hexsize float64, RDEGREE float64, TrueCells int) (pts []vlib.Location3D, vCellIDs vlib.VectorI)
- func HexWrapGrid19Cell(N int, center vlib.Location3D, hexsize float64, RDEGREE float64, TrueCells int) (pts []vlib.Location3D, vCellIDs []int)
- func RandPoint(centre complex128, radius float64) complex128
- func RandPointR(size float64) complex128
- func RectGrid(NCells int, isd float64, dimensions complex128) (bsCellLocations []vlib.Location3D, vCellIDs vlib.VectorI)
- func RectangularEqPoints(centre complex128, length, angle float64, N int) vlib.VectorC
- func RectangularNPoints(centre complex128, width, height, angleInDegree float64, N int) vlib.VectorC
- func RectangularPoint(centre complex128, width, height, angleInDegree float64) complex128
- type Area
- type DropParameter
- type DropSetting
- func (d *DropSetting) AddNodeType(ntype NodeType)
- func (d *DropSetting) GetNodeIndex(ntype string) int
- func (d *DropSetting) GetNodeTypesOfMode(mode TxRxMode) []string
- func (d *DropSetting) GetRxNodeNames() []string
- func (d *DropSetting) GetTxNodeNames() []string
- func (d *DropSetting) Init()
- func (d *DropSetting) NodeCount(ntype string) int
- func (d *DropSetting) SetCoverage(area Area)
- func (d *DropSetting) SetDefaults()
- func (d *DropSetting) SetNodeCount(ntype string, count int)
- func (d *DropSetting) SetRxNodeNames(typename ...string)
- func (d *DropSetting) SetTxNodeNames(typename ...string)
- type DropSystem
- func (d *DropSystem) Drop(dp *DropParameter) (vlib.VectorC, error)
- func (d *DropSystem) DropNodeType(nodetype string) error
- func (d *DropSystem) GetNodeIDs(ntypes ...string) vlib.VectorI
- func (d *DropSystem) GetNodeType(ntype string) *NodeType
- func (d *DropSystem) GetNodesOfType(ntype string) []Node
- func (d DropSystem) GetSetting() *DropSetting
- func (d *DropSystem) Init()
- func (d *DropSystem) Locations(ntype string) vlib.VectorC
- func (d *DropSystem) Locations3D(ntype string) []vlib.Location3D
- func (d *DropSystem) MarshalJSON() ([]byte, error)
- func (d *DropSystem) NewNode(ntype string) *Node
- func (d *DropSystem) PopulateHeight(ntype string)
- func (d *DropSystem) SetAllNodeLocation(ntype string, locations vlib.VectorC)
- func (d *DropSystem) SetAllNodeLocation3D(ntype string, locations []vlib.Location3D)
- func (d *DropSystem) SetAllNodeProperty(ntype, property string, data interface{})
- func (d *DropSystem) SetNodeLocation(ntype string, nid int, location complex128)
- func (d *DropSystem) SetNodeLocationOf(ntype string, nodeIDs vlib.VectorI, locations vlib.VectorC)
- func (d *DropSystem) SetSetting(setting *DropSetting)
- func (d *DropSystem) UnmarshalJSON(jsondata []byte) error
- type DropType
- type Node
- type NodeType
- type TxRxMode
Constants ¶
const ( ORIGIN = complex(0, 0) FcInGHz = 2.1 /// Default carrier frequency )
const (
OMNIDIRECTION float64 = 9990
)
Variables ¶
var DropTypes = [...]string{
"Circular",
"Hexagonal",
"Rectangular",
"Annular",
}
var MinDistance float64
var TxRxModes = [...]string{
"TransmitOnly",
"ReceiveOnly",
"Duplex",
"Inactive",
}
Functions ¶
func AnnularPoint ¶
func AnnularPoint(centre complex128, innerRadius, outerRadius float64) complex128
func AnnularRingEqPoints ¶
func AnnularRingEqPoints(centre complex128, outerRadius float64, N int) vlib.VectorC
func AnnularRingPoints ¶
func AnnularRingPoints(centre complex128, innerRadius, outerRadius float64, N int) vlib.VectorC
func CircularPoints ¶
func CircularPoints(centre complex128, radius float64, N int) vlib.VectorC
func ClosestMirror ¶
func ClosestMirror(mirrorTable []vlib.Location3D, pt vlib.Location3D) (distance float64, indx int, dv vlib.Location3D)
func ClosestMirror19Cell ¶
func ClosestMirror19Cell(mirrorTable map[vlib.Location3D]int, pt vlib.Location3D, gap float64, prev int, ISD float64) int
func Cube2XY ¶
func Cube2XY(cube vlib.Location3D, hexsize float64) vlib.Location3D
func CubeMirrors ¶
func CubeMirrors(r int) []vlib.Location3D
func HexGrid ¶
func HexGrid(N int, center vlib.Location3D, hexsize float64, RDEGREE float64) []vlib.Location3D
HexGrid generates a grid of N Hexgons centred at `center` of size hexsize, returns an array of 3D locations of the centres of the hexgonals, This centers can be used to place the base-stations for Multi-cell simulations. The function automatically adds more hexgonal out
func HexGridRandU ¶
func HexGridRandU(GridCentre complex128, hexCellCount int, hexRadius float64, NperHexCell int, rdegree float64) vlib.VectorC
% In the code, I will create a hexagon centered at (0,0) with radius R. % The snipplets can be used in mobile capacity predicts and general % systems level simulation of cellular networks.
func HexRandPoints ¶
HexRandPoints generates N points uniformly distributed inside a hexagon of radius hexRadius centre complex128, hexRadius float64, Npoints int, rdegree float64 based on DOI: 10.1109/CAMAD.2009.5161465
func HexRandU ¶
% This will create a hexagon centered at (0,0) with radius R. % The snipplets can be used in mobile capacity predicts and general % systems level simulation of cellular networks. rdegree=30, is vertex on top.. rdegree=0, vertex on left & right
func HexVertices ¶
func HexVertices(centre complex128, length float64, degree float64) vlib.VectorC
func HexWrapGrid ¶
func HexWrapGrid(N int, center vlib.Location3D, hexsize float64, RDEGREE float64, TrueCells int) (pts []vlib.Location3D, vCellIDs vlib.VectorI)
func HexWrapGrid19Cell ¶
func HexWrapGrid19Cell(N int, center vlib.Location3D, hexsize float64, RDEGREE float64, TrueCells int) (pts []vlib.Location3D, vCellIDs []int)
func RandPoint ¶
func RandPoint(centre complex128, radius float64) complex128
func RandPointR ¶
func RandPointR(size float64) complex128
/ Simplest point for origin centred, rectangular region of length size
func RectGrid ¶
func RectGrid(NCells int, isd float64, dimensions complex128) (bsCellLocations []vlib.Location3D, vCellIDs vlib.VectorI)
func RectangularEqPoints ¶
func RectangularEqPoints(centre complex128, length, angle float64, N int) vlib.VectorC
func RectangularNPoints ¶
func RectangularNPoints(centre complex128, width, height, angleInDegree float64, N int) vlib.VectorC
func RectangularPoint ¶
func RectangularPoint(centre complex128, width, height, angleInDegree float64) complex128
Types ¶
type DropParameter ¶
type DropParameter struct { Centre vlib.Location3D Type DropType Randomnoss bool // if true, uniformly distributed else equallyspaced in region //Radius in meters Radius float64 `json:"radius"` InnerRadius float64 /// Angles are in degree RotationDegree float64 InnerRotationDegree float64 // Number of Drops NCount int }
func (DropParameter) MarshalJSON ¶
func (d DropParameter) MarshalJSON() ([]byte, error)
func (n Node) MarshalJSON() ([]byte, error) { return json.Marshal(n.Meta) }
type DropSetting ¶
type DropSetting struct { NodeTypes []NodeType Centre vlib.Location3D // minDistance map[NodePair]float64 `json:"-"` CoverageRegion Area // For circular its just radius, Rectangular, its length, width // contains filtered or unexported fields }
func NewDropSetting ¶
func NewDropSetting() *DropSetting
func (*DropSetting) AddNodeType ¶
func (d *DropSetting) AddNodeType(ntype NodeType)
func (*DropSetting) GetNodeIndex ¶
func (d *DropSetting) GetNodeIndex(ntype string) int
func (*DropSetting) GetNodeTypesOfMode ¶
func (d *DropSetting) GetNodeTypesOfMode(mode TxRxMode) []string
func (*DropSetting) GetRxNodeNames ¶
func (d *DropSetting) GetRxNodeNames() []string
Returns the name of the nodetypes which are configured as Receive capabilities
func (*DropSetting) GetTxNodeNames ¶
func (d *DropSetting) GetTxNodeNames() []string
Returns the name of the nodetypes which are configured as Transmit capabilities
func (*DropSetting) Init ¶
func (d *DropSetting) Init()
func (*DropSetting) NodeCount ¶
func (d *DropSetting) NodeCount(ntype string) int
func (*DropSetting) SetCoverage ¶
func (d *DropSetting) SetCoverage(area Area)
func (*DropSetting) SetDefaults ¶
func (d *DropSetting) SetDefaults()
func (*DropSetting) SetNodeCount ¶
func (d *DropSetting) SetNodeCount(ntype string, count int)
func (*DropSetting) SetRxNodeNames ¶
func (d *DropSetting) SetRxNodeNames(typename ...string)
Set NodeTypes of typename(s) as Receive Capabilities
func (*DropSetting) SetTxNodeNames ¶
func (d *DropSetting) SetTxNodeNames(typename ...string)
Set NodeTypes of typename(s) as Transmit Capabilities
type DropSystem ¶
type DropSystem struct { *DropSetting Nodes map[int]Node // contains filtered or unexported fields }
func (*DropSystem) Drop ¶
func (d *DropSystem) Drop(dp *DropParameter) (vlib.VectorC, error)
func (*DropSystem) DropNodeType ¶
func (d *DropSystem) DropNodeType(nodetype string) error
func (*DropSystem) GetNodeIDs ¶
func (d *DropSystem) GetNodeIDs(ntypes ...string) vlib.VectorI
func (*DropSystem) GetNodeType ¶
func (d *DropSystem) GetNodeType(ntype string) *NodeType
func (*DropSystem) GetNodesOfType ¶
func (d *DropSystem) GetNodesOfType(ntype string) []Node
func (DropSystem) GetSetting ¶
func (d DropSystem) GetSetting() *DropSetting
func (*DropSystem) Init ¶
func (d *DropSystem) Init()
func (*DropSystem) Locations3D ¶
func (d *DropSystem) Locations3D(ntype string) []vlib.Location3D
func (*DropSystem) MarshalJSON ¶
func (d *DropSystem) MarshalJSON() ([]byte, error)
func (*DropSystem) NewNode ¶
func (d *DropSystem) NewNode(ntype string) *Node
func (*DropSystem) PopulateHeight ¶
func (d *DropSystem) PopulateHeight(ntype string)
func (*DropSystem) SetAllNodeLocation ¶
func (d *DropSystem) SetAllNodeLocation(ntype string, locations vlib.VectorC)
func (*DropSystem) SetAllNodeLocation3D ¶
func (d *DropSystem) SetAllNodeLocation3D(ntype string, locations []vlib.Location3D)
func (*DropSystem) SetAllNodeProperty ¶
func (d *DropSystem) SetAllNodeProperty(ntype, property string, data interface{})
func (*DropSystem) SetNodeLocation ¶
func (d *DropSystem) SetNodeLocation(ntype string, nid int, location complex128)
func (*DropSystem) SetNodeLocationOf ¶
func (*DropSystem) SetSetting ¶
func (d *DropSystem) SetSetting(setting *DropSetting)
func (*DropSystem) UnmarshalJSON ¶
func (d *DropSystem) UnmarshalJSON(jsondata []byte) error
type Node ¶
type Node struct { Type string ID int Location vlib.Location3D // Height float64 /// moved Location member variable Meta string Indoor bool InCar bool IndoorCenter vlib.Location3D /// Location of the center of Building if its Indoor , assumed at Node at Center if not set Orientation vlib.VectorF AntennaType int Direction float64 VTilt float64 GeoCellID int TxPowerDBm float64 FreqGHz vlib.VectorF Mode TxRxMode `json:"TxRxMode"` Active bool RxNoiseFigureDbm float64 // NoiseFigure of the receiver // contains filtered or unexported fields }
type NodeType ¶
type NodeType struct { Name string Hmin float64 Hmax float64 Count int NodeIDs vlib.VectorI `json:",strings"` Params DropParameter TxPowerDBm float64 Direction float64 // Direction in degree 0 to 360, for omni set to constant 'OMNIDIRECTION' RxNoiseFigureDbm float64 // NoiseFigure of these type of nodes Mode TxRxMode `json:"TxRxMode"` // contains filtered or unexported fields }