浏览代码

i.vi: fix PVI formula (#1985)

* Fix wrong mathematical formula in the PVI index computation in i.vi

* fix #1984
Ondrej Pesek 3 年之前
父节点
当前提交
951d8a873c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      imagery/i.vi/pvi.c

+ 1 - 1
imagery/i.vi/pvi.c

@@ -17,7 +17,7 @@ double p_vi(double redchan, double nirchan)
 	result = -1.0;
     }
     else {
-	result = (sin(1) * nirchan) / (cos(1) * redchan);
+	result = (sin(1) * nirchan) - (cos(1) * redchan);
     }
     return result;
 }