LoginSignup
1
0

More than 5 years have passed since last update.

nasa space apps challenge

Last updated at Posted at 2017-03-21

概要

nasa space apps challengeに行けないので、勝手にハッカソンしてみる。
人工衛星の軌道を計算してみる。

2行軌道要素形式

アメリカ航空宇宙局 (NASA) と北アメリカ航空宇宙防衛司令部 (NORAD) が現在でも使用している、人工衛星の地心座標系におけるケプラー軌道要素のテキスト形式のフォーマットである。

orb.js

calc the position of satellites
https://github.com/lizard-isana/orb.js
人工衛星の位置を計算する方法
衛星の位置計算に必要なのは core.js と satellite.js の二つ.。
軌道要素をこういうオブジェクト形式で作っておいて

var tle = {
    "first_line":  "1 25544U 98067A   11318.51274148  .00016717  00000-0  10270-3 0  9003",
    "second_line": "2 25544  51.6365 124.1685 0021724  56.2169 304.1052 15.60123650 24381"
}

軌道要素でSatellite オブジェクトを初期化

var satellite = new Orb.Satellite(tle);

jsのDateからOrb.jsのTimeオブジェクトを作って

var date = new Date();
var time = new Orb.Time(date);

地理座標系(geographic coodinates)で位置を計算

var geo = satellite.position.geographic(time);

これで

geo = {
    longitude: [経度],
    latitude: [緯度],
    altitude: [高度km]
}

というオブジェクトが返ります。

成果物

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0