From 1f9ef1d6b80d6e07cdd20df00a2318b71f25ad53 Mon Sep 17 00:00:00 2001
From: Manuel Grizonnet <manuel.grizonnet@orfeo-toolbox.org>
Date: Fri, 29 Aug 2014 15:02:18 +0200
Subject: [PATCH] BUG: modify satellite orientation angle value to follow
 convention of atmospheric corrections computation

---
 Code/IO/otbPleiadesImageMetadataInterface.cxx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Code/IO/otbPleiadesImageMetadataInterface.cxx b/Code/IO/otbPleiadesImageMetadataInterface.cxx
index 66b8b76641..f04923faac 100644
--- a/Code/IO/otbPleiadesImageMetadataInterface.cxx
+++ b/Code/IO/otbPleiadesImageMetadataInterface.cxx
@@ -682,6 +682,13 @@ PleiadesImageMetadataInterface::GetSatElevation() const
   // MSD: for the moment take only topCenter value
   std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.incident_angle");
   double value = atof(valueString.c_str());
+
+  //Convention use in input of atmospheric correction parameters computation is
+  //"90 - satOrientation". Pleiades does not seem to follow this convention so
+  //inverse the formula here to be able to take the angle read in the metadata
+  //as input for 6S
+  value = 90. - value;
+
   return value;
 }
 
-- 
GitLab