PyEphem provides the Python language with routines for computing the location of celestial objects like the sun, moon, and planets, as well as for any asteroids, comets, and earth satellites for which the caller can provide orbital elements. Rise, set, and transit times can be computed for any object, and basic coordinate computations are also supported.
Questions tagged [pyephem]
272 questions
19
votes
3 answers
Calculating dawn and sunset times using PyEphem
Is it possible to calculate Dawn, Dusk, and sunset times using PyEphem? I've used PyEphem to produce day and night time, but I didn't find anything on sunset/dusk/dawn

dassouki
- 6,286
- 7
- 51
- 81
12
votes
3 answers
Python coordinate transformation ECI to ECEF
I am using sgp4 python package (developed by Brandon Rhodes); I am inputting the TLE information for ISS(Zarya). I get the position of the satellite at a certain date, in the in ECI coordinate system. However, I want to convert it to ECEF coordinate…

Ioana Zelko
- 123
- 1
- 7
10
votes
1 answer
How do I make pylint recognize twisted and ephem members?
I very much like having pylint tell me if I'm using a non-existent member. However, my new project is using both twisted and the ephem modules, which seem to confuse pylint.
How can I get rid of these (incorrect) pylint warnings without either…

DonGar
- 7,344
- 8
- 29
- 32
9
votes
1 answer
Results for Observer() seemingly not accounting for elevation effects in PyEphem
I've a query on the results given by the PyEphem module relating to Observer() queries, and the effects of elevation. I understand from a couple of sources (such as http://curious.astro.cornell.edu/question.php?number=388) that the elevation of the…

Smingos
- 280
- 1
- 3
- 9
9
votes
4 answers
Calculate "Solar Noon" using ephem, translating to local time
I have looked at the examples here on using ephem to calculate sunrise and sunset, and have that working great.
I get in trouble when I try to calculate the midpoint between those two times. Here's what I have:
import datetime
import ephem
o =…

Lorin Rivers
- 7,912
- 1
- 18
- 9
8
votes
1 answer
Compute shadow length using PyEphem
I am using PyEphem and want to calculate the length of a shadow (assume a stick of unit length is planted in the ground). The length will be given by cot(phi), where phi is the solar elevation angle (please correct me if I'm wrong). I'm not sure…

Roberto Alvarez
- 83
- 1
- 3
7
votes
2 answers
Is there a sunset/sunrise function built into Astropy yet?
I have seen a couple of answers referring to PyEphem on here and how that can produce sunset/sunrise times, however it would be more useful to me if I could find a solution using solely Astropy packages. At the moment the closest I have found is the…

Dean
- 259
- 3
- 10
7
votes
1 answer
How to calculate the angle of the sun above the horizon using pyEphem
I'm new to PyEphem and this is probably a simple question. I want to calculate the angle of the sun above the horizon at a certain GPS point and date. My code is as follows:
import ephem
import datetime
date =…

user2669257
- 71
- 1
- 2
7
votes
1 answer
Pyephem Algorithms Reference
I have never used pyephem before, and I'm not expert in satellite positioning.
I'd like to exploit pyephem to calculate the position of a satellite using TLE.
I have to do something very easy, like that:
tle=["ISS (ZARYA)","1 25544U 98067A …

aurghs
- 101
- 3
6
votes
2 answers
Using pyephem to calculate when a satellite crosses a Longitude
I am having a hard time figuring out how to calculate when a satellite crosses a specific Longitude. It would be nice to able to provide a time period and a TLE and be able to return all the times at which the satellite crosses a given longitude…

user2156697
- 81
- 1
- 4
5
votes
2 answers
How to calculate longitude using PyEphem
tried to calculate sun lat and long using PyEphem but not matching with ephemeris
SUN: 2011 MAY 04 We 04 14:46:08 13TA12 = 43 degrees approx (As per website www.findyourfate.com)
a = Sun()
a.compute('2011-05-04')
>>> a.hlon
274:18:49.1
>>>…

Narendra Kamma
- 1,431
- 1
- 11
- 19
5
votes
1 answer
Efficient way to propagate satellite catalog over time
Problem statement
I need to propagate the entire catalog of recent TLEs (need a free account to view) from space-track.org using skyfield or similar. There are typically 15k-16k TLEs in the list. I have it working, but it is very slow. On the order…

Engineero
- 12,340
- 5
- 53
- 75
5
votes
1 answer
pyephem compute elevation angle
I would like to compute easily the elevation angle of a satellite in python with the library PyEphem in function of a particular observer.
This matter is really new for me so I'm using the picture below to be sure we are talking about the same…

SebML
- 63
- 1
- 4
5
votes
1 answer
PyEphem: dates of solstices and equinoxes and their validity on longer time scales
My question is what the time span is over which PyEphem provides accurate results for the dates of the solstices and equinoxes and the solar geometry.
So far, I found the limits B.C. 9998-03-20 to A.D. 9999-12-31 in this very informative post on…

Rens
- 51
- 3
5
votes
1 answer
Perl's Inline::Python fails on pyephem
#!/bin/perl
use Inline Python;
$s = new Sun();
print "SUN: $s\n";
$m = new Moon();
__END__
__Python__
from ephem import Sun as Sun;
from ephem import Moon as Moon;
The code above yields:
SUN:
Can't bless…
user354134