This_is_me
New member
- Joined
- Sep 4, 2015
- Messages
- 4
- Reaction score
- 0
- Points
- 0
I'm writing some code to interface with Orbiter to get times of astronomical events (e.g, conjunctions, sunrise/sunset, etc). I've got two questions:
First, what is the difference, if any, between propagation methods used when oapiSimSetMJD() (see p. 102 of API Reference Manual) is called versus when Orbiter is run "normally" (started at some MJD=X and allowed to progress from there through the date of interest)? For example, suppose I needed the position of some celestial body at MJD X? I could do that in several different ways, e.g.,
1) Start Orbiter at MJD X, get the position immediately.
2) Start Orbiter at some other MJD, use oapiSimSetMJD() to set the simulation to MJD X, then get the position.
3) Start Orbiter at some MJD prior to X, then run it forward and get the position when the simulation reaches MJD X.
I assume that Orbiter sets its own time on startup using the oapiSimSetMJD() function, so #1 and #2 are probably identical, but I may as well ask. Mainly, though, I'm wondering what the difference in propagation methods is between #2 and #3?
For what it's worth, I've already done some checks on Orbiter-generated data using method #2 versus data from other sources, and so far the results all look good. And since this is for amateur naked eye stargazing anyway, I'm not going to worry about small errors; I'd just like to know what those difference are, if any.
Second question ... I've looked all over the API Reference but I can't seem to find the right function(s) to do this. Given the longitude and latitude of some point on the Earth's surface, and a specific time, how do I get the vector from the Earth's center to that surface location? Right now, I'm accomplishing this by using a scenario with a DG parked on the Earth's surface at the desired location then reading its position, but that's a pretty clumsy way to do it; I have to edit and change the scenario file whenever I want to examine a different surface location.
Thanks.
First, what is the difference, if any, between propagation methods used when oapiSimSetMJD() (see p. 102 of API Reference Manual) is called versus when Orbiter is run "normally" (started at some MJD=X and allowed to progress from there through the date of interest)? For example, suppose I needed the position of some celestial body at MJD X? I could do that in several different ways, e.g.,
1) Start Orbiter at MJD X, get the position immediately.
2) Start Orbiter at some other MJD, use oapiSimSetMJD() to set the simulation to MJD X, then get the position.
3) Start Orbiter at some MJD prior to X, then run it forward and get the position when the simulation reaches MJD X.
I assume that Orbiter sets its own time on startup using the oapiSimSetMJD() function, so #1 and #2 are probably identical, but I may as well ask. Mainly, though, I'm wondering what the difference in propagation methods is between #2 and #3?
For what it's worth, I've already done some checks on Orbiter-generated data using method #2 versus data from other sources, and so far the results all look good. And since this is for amateur naked eye stargazing anyway, I'm not going to worry about small errors; I'd just like to know what those difference are, if any.
Second question ... I've looked all over the API Reference but I can't seem to find the right function(s) to do this. Given the longitude and latitude of some point on the Earth's surface, and a specific time, how do I get the vector from the Earth's center to that surface location? Right now, I'm accomplishing this by using a scenario with a DG parked on the Earth's surface at the desired location then reading its position, but that's a pretty clumsy way to do it; I have to edit and change the scenario file whenever I want to examine a different surface location.
Thanks.