parallelvisions between information and perception

Posted
24 May 2009 @ 12am

Tagged
Graphics

Add this entry to はてなブックマーク

Calculation of the great circle/大圏航路の計算

日本の全航空路線(大圏航路バージョン)

日本の全航空路線(大圏航路バージョン)

以前の日本の航空路線プロットはあらかじめ地球を平面と仮定し、出発点と到着地を三次元放物線で結んだものだったが、通常航路の描画に使われる(そして実際の飛行機が近似の線上を飛ぶ)のは球面上の大圏航路である。というわけで大圏航路バージョンを作成してみた。2地点の経度緯度が与えられたときの大圏航路の導出法は以下。

2地点の経度緯度をそれぞれ

(lon1, lat1), (lon2, lat2)

とすると、この2点間の中心角は

d = acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))

とかける。角度はラジアン。値 f の0から1までの変化を2点間の移動に相当するとして、経路上の経度緯度は以下のように求められる。

A = sin((1-f)*d)/sin(d)
B = sin(f*d)/sin(d)
x = A*cos(lat1)*cos(lon1) + B*cos(lat2)*cos(lon2)
y = A*cos(lat1)*sin(lon1) + B*cos(lat2)*sin(lon2)
z = A*sin(lat1) + B*sin(lat2)
lat = atan2(z,sqrt(x^2+y^2))
lon = atan2(y,x)

これで f を適当な間隔で計算してプロットすれば大圏航路を描くことができる。日本の全航空路線にこれを適用したものが上の画像だが、日本くらいの範囲だと直線で結んだものとあまり変わらないかもしれない。いちおう両方をアップしておく

逆三角関数は頭痛を誘発するので以下をありがたく参考にした。

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • Technorati
  • Tumblr
  • TwitThis

No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment