% pole.m

% formulae corrected on 26 Jan 2008

test =0;


PoleHeight = 10;		% input height in meters 

TopDeg = 91;
TopMin = 30;
TopSec = 20;

BotDeg = 91;
BotMin = 50;
BotSec = 30;




%%%%%%%%%%%%%%%%%%%%%%%%

TopRadians = deg2rad(TopDeg + TopMin/60 + TopSec/3600);
BottomRadians = deg2rad(BotDeg + BotMin/60 + BotSec/3600);

if test==1
    % the topangle comes from the height demo m-file
    TopRadians =  pi/2 + topangle;
    botangle = topangle + angA;
    BottomRadians = pi/2 + botangle;
    PoleHeight = 30
end

   Delta = BottomRadians-TopRadians;
   %H = pi/2 - TopRadians;
     H = pi - TopRadians;
   I = pi - H;
   J = ((PoleHeight * sin(I))/sin(Delta));
   StationHeight = (J * sin(BottomRadians))
   %print([' Station Height is : ' num2str(StationHeight)]);

