update metdata.set1axis with cumulativesky flag. return trackerdict with time keys for gendaylit flow.
@@ -1540,8 +1540,7 @@ class MetObj:
'''
axis_tilt = 0 # only support 0 tilt trackers for now
-
-
+ self.cumulativesky = cumulativesky # track whether we're using cumulativesky or gendaylit
# get 1-axis tracker angles for this location, rounded to nearest 'angledelta'
trackingdata = self._getTrackingAngles(axis_azimuth, limit_angle, angledelta, axis_tilt = 0, backtrack = backtrack, gcr = gcr )
@@ -1553,7 +1552,18 @@ class MetObj:
# create a separate metfile for each unique tracker theta angle. return dict of filenames and details
trackerdict = self._makeTrackerCSV(theta_list,trackingdata)
else:
- trackerdict = None
+ # trackerdict uses timestamp as keys. return azimuth and tilt for each timestamp
+ times = [str(i)[5:-12].replace('-','_').replace(' ','_') for i in self.datetime]
+ trackerdict = dict.fromkeys(times)
+
+ for i,time in enumerate(trackerdict) :
+ trackerdict[time] = {}
+ trackerdict[time]['surf_azm'] = self.surface_azimuth[i]
+ trackerdict[time]['surf_tilt'] = self.surface_tilt[i]
+ trackerdict[time]['theta'] = self.tracker_theta[i]
+ trackerdict[time]['ghi'] = self.ghi[i]
+ trackerdict[time]['dhi'] = self.dhi[i]
+
return trackerdict
