I am trying to track the position of the moon with ephem TLE data and then store it in data.csv files. However, I can't find it!
The code below is an example on what I am trying to do, this is for the ISS, its the TLE numbers in "line 1" and "line 2" for the moon I can“t find.
import logging
import logzero
from logzero import logger
from sense_hat import SenseHat
import os
import ephem
dir_path = os.path.dirname(os.path.realpath(__file__))
sh = SenseHat()
logzero.logfile(dir_path+"/iss.csv")
name = "ISS (ZARYA)"
line1 = "1 25544U 98067A 18032.92935684 .00002966 00000-0 52197-4 0 99911 25544U 98067A 18032.92935684 .00002966 00000-0 52197-4 0 9991"
line2 = "2 25544 51.6438 332.9972 0003094 62.2964 46.0975 15.54039537 97480"
iss = ephem.readtle(name, line1, line2)
iss.compute()
formatter = logging.Formatter('%(name)s - %(asctime)-15s - %(levelname)s: %(message)s');
logzero.formatter(formatter)
sublat = iss.sublat
sublong = iss.sublong
logger.info("%s,%s", sublong, sublat, )