5 deleted 8 characters in body
source | link
import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos

load    = Loader('~/Documents/fishing/SkyData')
planets = load('de421.bsp')
earth, sun = planets['earth'], planets['sun']

ts = load.timescale()
tnow    = ts.now()
tmonth = ts.utc(2017, 12, range(1,31))
topo = Topos(latitude_degrees=41.42, longitude_degrees=2.15)

position = earth + topo

print "time (JD):  ", tnow.tt
print "time (UTC): ", tnow.tt_calendar()
print "latitude (degs):   ", topo.latitude.degrees
print "longitude (degs):  ", topo.longitude.degrees
print "galactic (km):    ", position.at(tnow).galactic_position().km
print "barycentric (km): ", position.at(tnow).position.km
print "and just for fun..."
print "galactic latlon (degs): ", [x.degrees for x in position.at(tnow).galactic_latlon()[:2]]
import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos

load    = Loader('~/Documents/fishing/SkyData')
planets = load('de421.bsp')
earth, sun = planets['earth'], planets['sun']

ts = load.timescale()
tnow    = ts.now()
tmonth = ts.utc(2017, 12, range(1,31))
topo = Topos(latitude_degrees=41.42, longitude_degrees=2.15)

position = earth + topo

print "time (JD):  ", tnow.tt
print "time (UTC): ", tnow.tt_calendar()
print "latitude (degs):   ", topo.latitude.degrees
print "longitude (degs):  ", topo.longitude.degrees
print "galactic (km):    ", position.at(tnow).galactic_position().km
print "barycentric (km): ", position.at(tnow).position.km
print "and just for fun..."
print "galactic latlon (degs): ", [x.degrees for x in position.at(tnow).galactic_latlon()[:2]]
import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos

load    = Loader('~/Documents/SkyData')
planets = load('de421.bsp')
earth, sun = planets['earth'], planets['sun']

ts = load.timescale()
tnow    = ts.now()
tmonth = ts.utc(2017, 12, range(1,31))
topo = Topos(latitude_degrees=41.42, longitude_degrees=2.15)

position = earth + topo

print "time (JD):  ", tnow.tt
print "time (UTC): ", tnow.tt_calendar()
print "latitude (degs):   ", topo.latitude.degrees
print "longitude (degs):  ", topo.longitude.degrees
print "galactic (km):    ", position.at(tnow).galactic_position().km
print "barycentric (km): ", position.at(tnow).position.km
print "and just for fun..."
print "galactic latlon (degs): ", [x.degrees for x in position.at(tnow).galactic_latlon()[:2]]
4 added 104 characters in body
source | link

Sure you can! Galactic coordinates have the same origin as other J2000.0 systems; the solar system barycenter (center of mass). This is very close to the Sun, usually but not always inside the Sun, because the larger planets, especially Jupiter, pull it around a little bit. You can read a little more here for example, and also read @zephyr's excellent answer.

Sure you can! Galactic coordinates have the same origin as other J2000.0 systems; the solar system barycenter (center of mass). This is very close to the Sun, usually but not always inside the Sun, because the larger planets, especially Jupiter, pull it around a little bit. You can read a little more here for example.

Sure you can! Galactic coordinates have the same origin as other J2000.0 systems; the solar system barycenter (center of mass). This is very close to the Sun, usually but not always inside the Sun, because the larger planets, especially Jupiter, pull it around a little bit. You can read a little more here for example, and also read @zephyr's excellent answer.

3 added 232 characters in body
source | link
time (JD):   2458099.1777918846
time (UTC):  (2017, 12, 11, 16, 1631, 123.2745955586433411049599826335907)
latitude (degs):    41.42
longitude (degs):   2.15
galactic (km):     [ -1.46344116e+0846347711e+08  -2.87741811e+0689156773e+06  -2.34490940e+07]34254700e+07]
barycentric (km):  [  2.69549375e+0769276456e+07   1.33747053e+0833751808e+08   5.79646169e+07]79665590e+07]
and just for fun...
galactic latlon (degs):  [-9.0922867698877123, 181.13191434418721]
import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos

load    = Loader('~/Documents/fishing/SkyData')
planets = load('de421.bsp')
earth, sun = planets['earth'], planets['sun']

ts = load.timescale()
tnow    = ts.now()
tmonth = ts.utc(2017, 12, range(1,31))
topo = Topos(latitude_degrees=41.42, longitude_degrees=2.15)

position = earth + topo

print "time (JD):  ", tnow.tt
print "time (UTC): ", tnow.tt_calendar()
print "latitude (degs):   ", topo.latitude.degrees
print "longitude (degs):  ", topo.longitude.degrees
print "galactic (km):    ", position.at(tnow).galactic_position().km
print "barycentric (km): ", position.at(tnow).position.km
print "and just for fun..."
print "galactic latlon (degs): ", [x.degrees for x in position.at(tnow).galactic_latlon()[:2]]
time (JD):   2458099.17779
time (UTC):  (2017, 12, 11, 16, 16, 1.2745955586433411)
latitude (degs):    41.42
longitude (degs):   2.15
galactic (km):     [ -1.46344116e+08  -2.87741811e+06  -2.34490940e+07]
barycentric (km):  [  2.69549375e+07   1.33747053e+08   5.79646169e+07]
import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos

load    = Loader('~/Documents/fishing/SkyData')
planets = load('de421.bsp')
earth, sun = planets['earth'], planets['sun']

ts = load.timescale()
tnow    = ts.now()
tmonth = ts.utc(2017, 12, range(1,31))
topo = Topos(latitude_degrees=41.42, longitude_degrees=2.15)

position = earth + topo

print "time (JD):  ", tnow.tt
print "time (UTC): ", tnow.tt_calendar()
print "latitude (degs):   ", topo.latitude.degrees
print "longitude (degs):  ", topo.longitude.degrees
print "galactic (km):    ", position.at(tnow).galactic_position().km
print "barycentric (km): ", position.at(tnow).position.km
time (JD):   2458099.18846
time (UTC):  (2017, 12, 11, 16, 31, 23.049599826335907)
latitude (degs):    41.42
longitude (degs):   2.15
galactic (km):     [ -1.46347711e+08  -2.89156773e+06  -2.34254700e+07]
barycentric (km):  [  2.69276456e+07   1.33751808e+08   5.79665590e+07]
and just for fun...
galactic latlon (degs):  [-9.0922867698877123, 181.13191434418721]
import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos

load    = Loader('~/Documents/fishing/SkyData')
planets = load('de421.bsp')
earth, sun = planets['earth'], planets['sun']

ts = load.timescale()
tnow    = ts.now()
tmonth = ts.utc(2017, 12, range(1,31))
topo = Topos(latitude_degrees=41.42, longitude_degrees=2.15)

position = earth + topo

print "time (JD):  ", tnow.tt
print "time (UTC): ", tnow.tt_calendar()
print "latitude (degs):   ", topo.latitude.degrees
print "longitude (degs):  ", topo.longitude.degrees
print "galactic (km):    ", position.at(tnow).galactic_position().km
print "barycentric (km): ", position.at(tnow).position.km
print "and just for fun..."
print "galactic latlon (degs): ", [x.degrees for x in position.at(tnow).galactic_latlon()[:2]]
2 added 710 characters in body
source | link
1
source | link