function [ RDH,RDHE ] = RDHHE( H,HB,RDOH,RDO2H,RNO,PEHE )
%RDHHE H+ AND HE+ RELATIVE PERECENTAGE DENSITY
%
%      SUBROUTINE RDHHE (H,HB,RDOH,RDO2H,RNO,PEHE,RDH,RDHE)                      
% BILITZA,FEB.82,H+ AND HE+ RELATIVE PERECENTAGE DENSITY BELOW                  
% 1000 KM. THE O+ AND O2+ REL. PER. DENSITIES SHOULD BE GIVEN                   
% (RDOH,RDO2H). HB IS THE ALTITUDE OF MAXIMAL O+ DENSITY. PEHE                  
% IS THE PRECENTAGE OF HE+ IONS COMPARED TO ALL LIGHT IONS.                     
% RNO IS THE RATIO OF NO+ TO O2+DENSITY AT H=HB.   
  RDHE=0.0;
  RDH=0.0;
  if H > HB
    REST=100.0-RDOH-RDO2H-RNO*RDO2H;
    RDH=REST*(1.-PEHE/100.);
    RDHE=REST*PEHE/100.;
  end
end

