pvl_makelocationstruct
Create a struct to define a site location.
Contents
Syntax
Location = pvl_makelocationstruct(latitude, longitude)
Location = pvl_makelocationstruct(latitude, longitude, altitude)
Description
Creates a location struct for use with some PVLib functions. Site information includes latitude, longitude, and altitude (optional).
Inputs
- latitude - latitude coordinates in decimal degrees. Latitude convention is positive north of the equator.
- longitude - longitude coordinates in decimal degrees. Longitude convention is positive east of the prime meridian.
- altitude - (optional) surface elevation in meters above sea level.
All inputs must be scalars.
Outputs
- Location - Struct consisting of scalar components.
- Location.latitude - Latitude in decimal degrees.
- Location.longitude - Longitude in decimal degrees.
- Location.altitude - Elevation in meters above sea level (if altitude provided).
Example
latitude = 35.05; longitude = -116.5; altitude = 1200; Location = pvl_makelocationstruct(latitude, longitude, altitude)
Location = latitude: 35.0500 longitude: -116.5000 altitude: 1200
See Also
pvl_ephemeris, pvl_maketimestruct, pvl_alt2pres, pvl_pres2alt
Copyright 2014 Sandia National Laboratories