Vorlage:Entfernung

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 32: Zeile 32:
 
Entfernung: {{#expr:{{#expr:6378.137*acos(sin{{#var:bb1}}*sin{{#var:bb2}}+cos({{#var:bb1}})*cos{{#var:bb2}}*cos({{#var:ll2}}-{{#var:ll1}}))}} round 2}} km
 
Entfernung: {{#expr:{{#expr:6378.137*acos(sin{{#var:bb1}}*sin{{#var:bb2}}+cos({{#var:bb1}})*cos{{#var:bb2}}*cos({{#var:ll2}}-{{#var:ll1}}))}} round 2}} km
  
</noinclude><includeonly><!--{{#vardefine:b1|{{#explode:{{{1|}}}|,|0}}}}{{#vardefine:l1|{{#explode:{{{1|}}}| |1}}}}{{#vardefine:bb1|{{#expr:{{#var:b1}}*pi/180}}}}{{#vardefine:ll1|{{#expr:{{#var:l1}}*pi/180}}}}{{#vardefine:b2|{{#explode:{{{2|}}}|,|0}}}}{{#vardefine:l2|{{#explode:{{{2|}}}| |1}}}}{{#vardefine:bb2|{{#expr:{{#var:b2}}*pi/180}}}}{{#vardefine:ll2|{{#expr:{{#var:l2}}*pi/180}}}}{{#expr:{{#expr:6378.137*acos(sin{{#var:bb1}}*sin{{#var:bb2}}+cos({{#var:bb1}})*cos{{#var:bb2}}*cos({{#var:ll2}}-{{#var:ll1}}))}} round 2}}-->{{#vardefine:e|{{#geodistance:{{{1|}}}|{{{2|}}}|unit=km}}}}{{#vardefine:l|{{#LEN:{{#var:e}}}}}}{{#vardefine:ll|{{#expr:{{#var:l}}-3}}}}{{#replace:{{#sub:{{#var:e}}|0|{{#var:ll}}}}|,|.}}</includeonly>
+
</noinclude><includeonly>{{#vardefine:b1|{{#explode:{{{1|}}}|,|0}}}}{{#vardefine:l1|{{#explode:{{{1|}}}| |1}}}}{{#vardefine:bb1|{{#expr:{{#var:b1}}*pi/180}}}}{{#vardefine:ll1|{{#expr:{{#var:l1}}*pi/180}}}}{{#vardefine:b2|{{#explode:{{{2|}}}|,|0}}}}{{#vardefine:l2|{{#explode:{{{2|}}}| |1}}}}{{#vardefine:bb2|{{#expr:{{#var:b2}}*pi/180}}}}{{#vardefine:ll2|{{#expr:{{#var:l2}}*pi/180}}}}{{#expr:{{#expr:6378.137*acos(sin{{#var:bb1}}*sin{{#var:bb2}}+cos({{#var:bb1}})*cos{{#var:bb2}}*cos({{#var:ll2}}-{{#var:ll1}}))}} round 2}}</includeonly><!--{{#vardefine:e|{{#geodistance:{{{1|}}}|{{{2|}}}|unit=km}}}}{{#vardefine:l|{{#LEN:{{#var:e}}}}}}{{#vardefine:ll|{{#expr:{{#var:l}}-3}}}}{{#replace:{{#sub:{{#var:e}}|0|{{#var:ll}}}}|,|.}}-->

Version vom 26. März 2014, 21:55 Uhr

Input:  Geokoordinate 1 {{{1}}}
        Geokoordinate 2 {{{2}}}
Output: Entfernung=ARCCOS[ SIN(Breite1)*SIN(Breite2) + COS(Breite1)*COS(Breite2)*COS(Länge2-Länge1) ] * 6378,137
Beispiel: Geokoordinate 1: Linnich: 50.977773, 6.268931 (lat, lon) (breite,länge)
          Geokoordinate 2: Aachen: 50.7753455, 6.0838868

Linnich
Geo:
k1: }}50.977773, 6.268931
b1: 50.977773
l1: 6.268931
bb1:0.889729984184
ll1:0.10941348653

Aachen

k2: }}50.7753455, 6.0838868
b2: 50.7753455
l2: 6.0838868
bb2:0.886196957813
ll2:0.106183855979

geodistance

e: 25,98 km
l: 8
ll: 5

25.98

Entfernung: 26.01 km


Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Adressen
Lebensmittel
Tierfutter
Schilddrüse
Öffentlichkeitsarbeit
Medien
Wissenschaft
Jodgeschichten
Wiki
Werkzeuge