question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An Earth Occultation calculation for Satellites

See original GitHub issue

I am trying to figure out if a satellite’s view of a particular RA/DEC target is occulted by the Earth over a large range of times. I have some code which I think should do this, but I am not sure the results make perfect sense. I am also uncertain as to whether or not the coordinates I am choosing for each part of the calculation make sense. Here is the code snippet that calculates the minimum distance between the Earth center and the line of sight between

        target_pos = skyfield.positionlib.position_from_radec(target_ra, target_dec)
        target_ecliptic = target_pos.ecliptic_position().au
        earth_ecliptic = Earth.at(ut).ecliptic_position().au
        sat_ecliptic = satellite.at(ut).ecliptic_position().au

        
        limit_dist = (EARTH_RADIUS + limiting_altitude) / AU_TO_KM
        #print(limit_dist)
        dist_list = []
        n_times = numpy.shape(ut)[0]
        for j in range(n_times):
            this_sat = sat_ecliptic[:,j]
            this_earth = earth_ecliptic[:,j]
            # this_sat is satellite position relative to Earth, whereas this_earth
            # and target_ecliptic are positions in ecliptic coordinates.
            # This is why we add this_sat and this_earth below.

            diff_sat_target = this_sat + this_earth  - target_ecliptic
            diff_target_earth = target_ecliptic - this_earth

            cross = numpy.cross(diff_sat_target,diff_target_earth)

            lcross = numpy.sqrt(numpy.dot(cross,cross))

            dist_list.append(lcross / numpy.sqrt(numpy.dot(diff_sat_target,diff_sat_target)))
        dist_arr = numpy.array(dist_list)

with the elements of dist_arr being tested against the limit_dist assumed above. The behavior I am finding, however, does not necessarily jive with my expectations given the satellite’s nearly equatorial orbit. So three questions:

  1. Are all of these positions in a consistent coordinate system?
  2. If not, what changes need to be made to put them in one?
  3. Would this be something you would be interested in integrating into skyfield moving forward?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
steveehlertcommented, Jun 8, 2020

I looked over the example and it looks great! I think we have all of the math figured out so I suppose it is just a matter of putting the proper functionalities in at this point. Let me know if you need any help with that!

1reaction
steveehlertcommented, May 26, 2020

If you are interested in identifying what point on the Earth gives you the first “impact” then yes you will want to keep min instead of max. I am only interested in knowing whether either intersection point was positive for this particular project, so I kept max.

Also, I have now done the time bin by time bin comparison, which provides perfect agreement on 10,000 time bins.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Predictions of Occultations by the Earth as Seen ... - NASA/ADS
Occasionally the Moon and some stars will be seen to be occulted by the Earth. The main reason for calculating the circumstances of...
Read more >
Radio Occultation Using Earth Satellites Background and ...
Using the POD information about the LEO and the GPS satellites, one can accurately calculate the phase accumulation from satellite kinematics. Subtracting this ......
Read more >
Comparison and Analysis of Stellar Occultation Simulation ...
Abstract: In this study, we analyze the accuracy of the stellar occultation technique to detect the oxy- gen number density and temperature ...
Read more >
Satellite shadows through stellar occultations
Methods. Orbital geometry is used to calculate the impact of stellar occultations by satellites on the photometry of individual stars as well as...
Read more >
Fast Determination of Satellite-to-Moon Visibility Using ... - NCBI
The most primitive way to calculate the satellite-to-site ... so when applying satellites to the Moon, the Earth occultation problem needs ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found