getCoordinates
Gets the coordinates for the buses in busNames
Contents
Syntax
coordinates = getCoordinates(DSSCircObj); coordinates = getCoordinates(DSSCircObj,busNames);
Description
Function to get coordinates for the buses in busNames. If optional input busNames contains a cell array, the function will return a structure for each busName, otherwise coordinates will contain all buses in the circuit.
Inputs
- DSSCircObj - link to OpenDSS active circuit and command text (from DSSStartup)
- busNames - optional cell array of bus names to find locations for
Outputs
- coordinates is the array of bus coordinates corresponding to busNames. The first column is the y values, and second column is x values
Example
Returns the coordinates for buses
[DSSCircObj, DSSText, gridpvPath] = DSSStartup; DSSText.command = ['Compile "' gridpvPath 'ExampleCircuit\master_Ckt24.dss"']; DSSText.command = 'solve'; coordinates = getCoordinates(DSSCircObj); %Get all bus coordinates coordinates = getCoordinates(DSSCircObj,{'N1311915'}) %Get coordinates for bus N1311915 coordinates = getCoordinates(DSSCircObj,[{'N1311915'}; {'n284022'}]) %Get coordinates for two buses %
coordinates = 31.6145 -80.9461 coordinates = 31.6145 -80.9461 31.6493 -80.9596