Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6727135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:00:44+00:00 2026-05-26T10:00:44+00:00

I’ve a query on the results given by the PyEphem module relating to Observer()

  • 0

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 observer has a marked effect on sunset time. However in the following code, I see next to no difference:

import ephem

emphemObj = ephem.Observer()
emphemObj.date = '2011/08/09'
emphemObj.lat = '53.4167'
emphemObj.long = '-3'
emphemObj.elevation = 0

ephemResult = ephem.Sun()
ephemResult.compute(emphemObj)
print "Sunset time @ 0m: " + str(emphemObj.previous_rising(ephemResult))

emphemObj.elevation = 10000
ephemResult.compute(emphemObj)
print "Sunset time @ 10000m: " + str(emphemObj.previous_rising(ephemResult))

I get the output:

Sunset time @ 0m: 2011/8/8 04:38:34
Sunset time @ 10000m: 2011/8/8 04:38:34

I’m fairly sure I’m doing something wrong rather than this being a bug, but having tried a number of different ways, I’m afraid I keep winding up with the same results. Does anyone know what I’m doing wrong here?

I posted this on https://launchpad.net/pyephem already, but I’ve had no response. I’m hoping I’ve not fundamentally misunderstood the purpose of the elevation function…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:00:44+00:00Added an answer on May 26, 2026 at 10:00 am

    The elevation of an observer means the elevation above sea level of their location — like the altitude of Flagstaff, Arizona, for example. But it is presumed that not only the observer and their telescope or binoculars is this distance above sea level; it is presumed that the ground — and thus the horizon — are also at this altitude. So an increased elevation gives you no advantage relative to the horizon, because the horizon moves with you when you move to a higher-altitude city.

    After a few minutes with a pencil and yellow pad of paper, it looks like the angle down to the horizon hza is related to the earth’s radius r and your height above the ground h as follows:

    hza = - acos(r / (h + r))
    

    So following on from your example above:

    import math
    height = 10000
    hza = - math.acos(ephem.earth_radius / (height + ephem.earth_radius))
    emphemObj.horizon = hza
    print "Sunrise time @ 10000m: " + str(emphemObj.previous_rising(ephemResult))
    

    I get the output:

    Sunrise time @ 10000m: 2011/8/8 04:08:18
    

    (Note that “sunrise” goes with previous_rising() and “sunset” goes with next_setting()!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am currently running into a problem where an element is coming back from
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.