Vorlage:Entfernung
(Unterschied zwischen Versionen)
Zeile 27: | Zeile 27: | ||
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> | + | </noinclude><includeonly>5</includeonly> |
− | <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> | + | <!--<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>--> |
Version vom 23. März 2014, 18:06 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 25,98 km
Entfernung: 26.01 km