1 #include<stdio.h>
2 #include<math.h>
3 #include<stdlib.h>
4 
5     /*
6        PVI: Perpendicular Vegetation Index
7 
8        PVI = sin(a)NIR-cos(a)red
9        for a  isovegetation lines (lines of equal vegetation) would all be parallel to the soil line therefore a=1
10 
11      */
p_vi(double redchan,double nirchan)12 double p_vi(double redchan, double nirchan)
13 {
14     double result;
15 
16     if ((nirchan + redchan) == 0.0) {
17 	result = -1.0;
18     }
19     else {
20 	result = (sin(1) * nirchan) / (cos(1) * redchan);
21     }
22     return result;
23 }
24 
25 
26