Skip to content

Instantly share code, notes, and snippets.

View lizard-isana's full-sized avatar

Isana Kashiwai lizard-isana

View GitHub Profile

orb.js(v2)- JavaScript Library for Astronomical Calculations

Sorry, currently no English readme. see examlpes.md or gist below.
https://gist.github.com/lizard-isana/36ed368eca0ac8c6f2fd4fdab5641bf9

orb.jsはJavaScriptで手軽に天体の位置計算を行うことを目的としたライブラリです。
※v1とv2ではメソッドや引数に大幅な修正が入っているため互換性がありません。くれぐれもご注意ください。

  • 8惑星(VSOP87)および月・太陽位置
  • ケプラー軌道要素からの天体位置
  • 2行軌道要素からの人工衛星位置(SGP4)

orb.v2.js examples

Please note: There is no compatibility v1 and v2.

Files

orb.v2.js:
all-in-one package

orb-core.v2.js:
Truncated version of orb.js. Core functions for orb-satellite.v2.js or orb-planetary.v2.js.

//introduction to orb.js
// https://github.com/lizard-isana/orb.js
// Planet Position
var date = new Date();
var time = new Orb.Time(date);
var SS = new Orb.SolarSystem();
var mars = new SS.Mars();
var p1 = mars.position.ecliptic(time); // x, y, z
// Orb.js のご紹介
// https://github.com/lizard-isana/orb.js
// Orb.js は、Webサイトなどで手軽に天体の位置計算を行うことを目的としたJavaScriptライブラリです
// 5行で惑星の位置が取れたりします
var date = new Date();
var time = new Orb.Time(date);
var SS = new Orb.SolarSystem();
@lizard-isana
lizard-isana / orbview_url_parameters.txt
Last active December 4, 2015 05:14
Orbview: URL Parameters
Orbview: URL Parameters
http://www.lizard-tail.com/isana/orbview/
※本アプリケーションは開発中です。予告なく仕様がころころ変わります。ご了承ください。
OrbView は太陽系内天体および地球軌道物体の軌道をWebGLを使って3Dで表示するWebアプリです。
データは軌道上物体の軌道要素を1日1回Space-Trac.orgより、地球近傍天体の軌道要素を1日1回、小惑星および彗星の軌道を月に1回Miner Planet Centerから取得しています。
表示可能天体
小惑星モード:
惑星、地球の月、地球近傍天体(>13k個)、小惑星(>600k個)、彗星(>3k個)、および任意の軌道要素
@lizard-isana
lizard-isana / satellite_position_indicator.txt
Last active October 12, 2015 02:27
SatPlot: URL parameters
SatPlot
http://www.lizard-tail.com/isana/tle/plot/
SatPlotは米戦略軍(USSTRATCOM)が提供している2行軌道要素(TLE)を元に衛星の位置を地図上にプロットするWebアプリケーションです(が、他にも色々出来ます)。TLE Retriever( http://www.lizard-tail.com/isana/tle/ )と対で使うことを想定していますが、URLのパラメーターを直接設定することで単体でも使用できます。
URL Parameters
【共通】
視点の中心 省略すると0,0
latlng=緯度,経度
@lizard-isana
lizard-isana / doy.js
Created May 25, 2012 01:15
Bookmarklet: display the day number of the year
//1月1日からの経過日をブラウザの右下隅に表示するブックマークレット
javascript:(function(){
function fill(num){if(num<10){return "0"+num}else{return num}}
try{
document.body.removeChild(w);
}catch(e){
w=document.createElement('div');
var ws=w.style;
ws.position='fixed';
ws.zIndex='1000';
@lizard-isana
lizard-isana / orbjs_tips_20120513.js
Created May 14, 2012 23:46
How to calc the position of satellites with Orb.js
// orb.js tips 2012.04.19
// How to calc the position of satellites
// https://github.com/lizard-isana/orb.js
// You should include core.js and satellite.js in your script.
// https://github.com/lizard-isana/orb.js/blob/master/core.js
// https://github.com/lizard-isana/orb.js/blob/master/satellite.js
// Define your TLE.
var tle = {
@lizard-isana
lizard-isana / orbjs_tips_satellite_120419.txt
Last active October 3, 2015 07:38
Orb.js: How to calc the position of satellites
// orb.js tips 2012.04.19
// How to calc the position of satellites
// https://github.com/lizard-isana/orb.js
// demo: http://www.lizard-tail.com/isana/lab/orb/
// 人工衛星の位置を計算する方法
// 衛星の位置計算に必要なのは core.js と satellite.js の二つ.。
// https://github.com/lizard-isana/orb.js/blob/master/core.js
// https://github.com/lizard-isana/orb.js/blob/master/satellite.js
@lizard-isana
lizard-isana / orbjs_tips_radec_120419.txt
Last active October 3, 2015 07:37
Orb.js: How to convert RA/Dec to horizontal coodinates
// orb.js tips 2012.04.19
// How to convert RA/Dec to horizontal coodinates
// https://github.com/lizard-isana/orb.js
// demo: http://www.lizard-tail.com/isana/lab/orb/
// RA/Decから天体の今現在見える位置を計算する方法
// 使うのは core.js のみ
// https://github.com/lizard-isana/orb.js/blob/master/core.js
// JavaScriptのDateオブジェクトから、Orb.Timeオブジェクトを作る