Completed
Push — master ( e40365...d4de89 )
by Yannick
30:56
created
tools-geoid.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,9 @@  discard block
 block discarded – undo
11 11
 	print '<h1>'._("Geoid Height Calculator").'</h1>';
12 12
 	print '</div>';
13 13
 	print '<p>Not available</p>';
14
-	if (isset($globalDebug) && $globalDebug) echo '<p>'.$e.'</p>';
14
+	if (isset($globalDebug) && $globalDebug) {
15
+		echo '<p>'.$e.'</p>';
16
+	}
15 17
 	require_once('footer.php');
16 18
 }
17 19
 $title = _("Geoid Height Calculator");
@@ -68,8 +70,11 @@  discard block
 block discarded – undo
68 70
 		print '<div class="col-sm-6">'.round($altitude-$geoid,3).'</div>';
69 71
 	}
70 72
 	print '<div class="col-sm-6"><b>Earth Gravity Model</b></div>';
71
-	if (isset($globalGeoidSource) && $globalGeoidSource != '') $geoidsource = $globalGeoidSource;
72
-	else $geoidsource = 'EGM96-15';
73
+	if (isset($globalGeoidSource) && $globalGeoidSource != '') {
74
+		$geoidsource = $globalGeoidSource;
75
+	} else {
76
+		$geoidsource = 'EGM96-15';
77
+	}
73 78
 	print '<div class="col-sm-6">'.$geoidsource.'</div>';
74 79
 	print '</div>';
75 80
 }
Please login to merge, or discard this patch.
require/class.GeoidHeight.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,8 +38,11 @@  discard block
 block discarded – undo
38 38
 		global $globalGeoidSource;
39 39
 		//if ($name == '') $name = dirname(__FILE__).'/../install/tmp/egm2008-1.pgm';
40 40
 		if ($name == '') {
41
-			if (isset($globalGeoidSource) && $globalGeoidSource != '') $name = dirname(__FILE__).'/../data/'.$globalGeoidSource.'.pgm';
42
-			else $name = dirname(__FILE__).'/../data/egm96-15.pgm';
41
+			if (isset($globalGeoidSource) && $globalGeoidSource != '') {
42
+				$name = dirname(__FILE__).'/../data/'.$globalGeoidSource.'.pgm';
43
+			} else {
44
+				$name = dirname(__FILE__).'/../data/egm96-15.pgm';
45
+			}
43 46
 		}
44 47
 
45 48
 		if (file_exists($name) === FALSE) {
@@ -159,7 +162,9 @@  discard block
 block discarded – undo
159 162
 				}
160 163
 			}
161 164
 			$this->t = $t;
162
-		} else $t = $this->t;
165
+		} else {
166
+			$t = $this->t;
167
+		}
163 168
 		if (!($cubic)) {
164 169
 			$a = (((1 - $fx) * $this->v00) + ($fx * $this->v01));
165 170
 			$b = (((1 - $fx) * $this->v10) + ($fx * $this->v11));
Please login to merge, or discard this patch.