Skip to content

Instantly share code, notes, and snippets.

View amasolini's full-sized avatar

Alejandro Masolini amasolini

View GitHub Profile
@amasolini
amasolini / gist:7c4fa9a23c6fbe8514e358df106e4bfb
Created March 26, 2017 06:50 — forked from hannorein/gist:5638999
The functions parameters are: gjd - geocentric JD based on UTC ra - right ascension (J2000) de - declination The function returns heliocentric correction helcor. Using helcor, you can computed Heliocentric JD from Geocentric JD. The relation is: HJD = GJD + helcor. We do not compute Barycentric JD (BJD).
function computeHELCOR($gjd, $ra, $de) {
// $eps=23.45*Pi()/180;
$ra = EREgI_Replace(" ", "", $ra);
$de = EREgI_Replace(" ", "", $de);
$ra_hh = IntVal(substr($ra, 0, 2));
$ra_mm = IntVal(substr($ra, 2, 2));
$ra_vv = DoubleVal(substr($ra, 4, 4));
$de_dd = IntVal(substr($de, 0, 3));
$de_mm = IntVal(substr($de, 3, 2));
@amasolini
amasolini / 0_reuse_code.js
Created November 21, 2016 17:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console