Hello all! I am trying to make a VISUAL model (in C#) to predict lunar and earth eclipse periods for a satellite that I have accurate ephemeris for. I want to calculate everything in ECEF reference frame. How would a go about modeling this system to the accuracy I'm interested in? I assume I need the following: 1) A reference epoch that coincides with a particular position of moon and position/orientation of earth. - how would I arrive at this? 2) A time scale, I assume I can use Terrestrial Time, please correct me if I'm wrong. 3) an ephemeris model. - I would like to be able to update celestial object positions according to a time-slider and/or stop/start button which proceeds at a specified pace. Would calculating my own ephemeris be necessary, or can I use the JPL Horizons data? 4) An earth rotation model. This one is mainly so that I can report coordinates accurately in ECEF, which is the reference frame that I'm interested in. I'm thoroughly bewildered after looking through SOFA documentation. After about an hour of reading I guess I got that I can just use a Terrestrial Time scale, but I'm not real sure how I would use SOFA (certainly I have more to read) to implement my objectives. I've also heard of CSPICE, used by NASA, but haven't looked into it yet because I saw that the toolkit was offered in C, and I don't know if I can use that for a C# program, as I'm not sure how that works. I'm basically just getting started, but any guidance or tutorials or hints/shortcuts that anyone can provide to me will be very much appreciated, and save me a lot of lurking around in the dark until I realize what it is that I need. Thank you so much in advance!