# findSubstationLocation

Locates the substation coordinates

## Contents

- Syntax
- Description
- Inputs
- Outputs
- Example

## Syntax

    coordinates = findSubstationLocation(DSSCircObj);

## Description

Function to find the coordinates of the substation. This is used for plotting the substation on circuit diagrams. The substation is located at the bus coordinate with the shortest "distance".

## Inputs

- `DSSCircObj` - link to OpenDSS active circuit and command text (from DSSStartup)

## Outputs

- `coordinates` is the [Y X] coordinates for the substation bus location

## Example

Returns the substation location

    [DSSCircObj, DSSText, gridpvPath] = DSSStartup;
    DSSText.command = ['Compile "' gridpvPath 'ExampleCircuit\master_Ckt24.dss"'];
    DSSText.command = 'solve';
    coordinates = findSubstationLocation(DSSCircObj)
    %

    coordinates =

       31.6160  -80.9734