WIP RTR Reporting
This commit is contained in:
@@ -200,11 +200,17 @@ class Building extends mfBaseModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getLaeaCoordinates() {
|
||||
if(!$this->gps_lat || !$this->gps_lat) {
|
||||
return false;
|
||||
public function getLaeaCoordinates($gps_lat = 0, $gps_long = 0) {
|
||||
if(!$gps_lat || !$gps_long) {
|
||||
$gps_lat = $this->gps_lat;
|
||||
$gps_long = $this->gps_long;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(!$gps_lat || !$gps_long) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Elipsenparameter der Erdoberfläche
|
||||
$a = 6378137;
|
||||
$e = 0.081819191;
|
||||
@@ -221,8 +227,8 @@ class Building extends mfBaseModel {
|
||||
$PI = M_PI;
|
||||
|
||||
// Umrechnung der Eingabekoordinaten in rad
|
||||
$Lat = $this->gps_lat * $PI / 180;
|
||||
$Lon = $this->gps_long * $PI / 180;
|
||||
$Lat = $gps_lat * $PI / 180;
|
||||
$Lon = $gps_long * $PI / 180;
|
||||
|
||||
// Berechnungen
|
||||
$q = (1 - $e ** 2) * ((sin($Lat) / (1 - $e ** 2 * sin($Lat) ** 2)) - ((1 / (2 * $e)) * log((1 - $e * sin($Lat)) / (1 + $e * sin($Lat)))));
|
||||
|
||||
Reference in New Issue
Block a user