Name: Yang , Vorname: Ying Student ID: 359144
PV Assignment 1
Exercise 1
Code:
%Exercise 1
close all
clear all
%define input values
DOY=172;
TZ=2;
lambda_g=13.2;
fi_g=52.3;
LT=6:1:20;
%call function sundata to get sun enevation and azimuth
[ Am, Ys, SAz] = sundata(lambda_g,fi_g,TZ,DOY,LT);
plot(SAz,Ys);
xlabel('Azimuth in degrees As');
ylabel('Altitude Position in degrees Ys');
title('Berlin(13.2,52.3) on 21.06.2013(172/365)');
grid on;
Function sundata:
function [ Am, Ys, SAz] = sundata(lambda_g,fi_g,TZ,DOY,LT)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
J=360*DOY/365;
TEQ=0.0066+7.3525*cos((J+85.9)*pi/
180)+9.9359*cos((2*J+108.9)*pi/180)+0.3387*cos((3*J+105.2)*pi/
180);
delta=0.3948-23.2559*cos((J+9.1)*pi/180)-
0.3915*cos((2*J+5.4)*pi/180)-0.176*cos((3*J+26)*pi/180); % delta
units->degree
for k=1:1:15
TLT(k)=LT(k)-TZ+ (4*lambda_g+TEQ)/60;
W(k)=(12-TLT(k))*15;
Ys(k)=asin(
cos(W(k)*pi/180)*cos(fi_g*pi/180)*cos(delta*pi/180)
评论0
最新资源