项目作者: vancky

项目描述 :
call horizon online matlab version
高级语言: Matlab
项目地址: git://github.com/vancky/callHorizonMatlab.git
创建时间: 2017-02-10T12:53:27Z
项目社区:https://github.com/vancky/callHorizonMatlab

开源协议:GNU General Public License v3.0

下载


callHorizonMatlab

Call horizons online matlab version .
A matlab version of callhorizons.
But not the same ,you have to read horizons_doc carefully ,and check the data carefully .

Baisc Useage

download file queryHorizons.m in your matlab path

  1. runtests('queryHorizonsTest');% run the test

Initialization for discrete epochs ,only supply for the jd or mjd format,you can use cspice to do more time transform.

A test script is added for use of doing scripts to get ephemeris from JPL

  1. target=queryHorizons('499');% for Mars
  2. target=target.set_discreteepochs([2457446.177083, 2457446.182343,2457448.182343]);
  3. target=target.get_ephemerides('O44');% lijiang Station
  4. % you can get elements like
  5. target=target.get_elements() % sun centered
  6. target=target.get_elements('SSB') % SSB centered

initialization for equal interval epochs, supply for format ‘YYYY-MM-DD [HH-MM-SS]’

  1. target=queryHorizons('Ceres');
  2. target=target.set_epochrange('2016-02-26', '2016-10-25', '1d')
  3. target=target.get_ephemerides('O44');
  4. target=target.get_vectors();% get vector in (J2000, earth mean equator plane,SSB center)

get data

  1. ''''
  2. target.originSrc % the origin source from Horizon
  3. target.data % the formated ephemrides from source , a matlab table format
  4. target.official_name % check the name of object
  5. target.getitme('RA',1) % get the first RA
  6. target.data{1,'RA'} % the same to the up
  7. target.getitme('RA',:) % get all RA
  8. target.fields % show all items
  9. ''''

importants

  • get_ephemerides , default station is O44(lijiang Observatory,you can change it in line 278),default reference system is J2000
  • get_elements,default center is 10(sun,you can change it in line 444),default reference frame is J2000,default reference plane is ecliptic and mean equinox of J2000.
  • get_vectors ,default center is 0(Solar System barycenter,SSB), default reference frame is J2000,default reference plane is earth mean equator and equinox .
    Any suggests or comments ,contact vanckyli[at]gmail.com !
    Have fun!
  • when run test file failed ,you may set a break point in the last lines of get_ephemerides() or get_elements() or get_vectors() functions, to the
    print src(pos4:pos5) and comparison with self.data table !Sometimes , it is failed for JPL updating it’s ephemeris !