Closed BaptisteCecconi closed 4 years ago
Hi Baptiste,
I wasn't aware that WGC will be used by 3rd party but sure that's completely doable!
I think the wgc
can be directly use to pass the url
string to the actual API endpoint if the value is neither JPL
not ESA
and if it is not already a Api
object (I like the idea to fall back automatically on the JPL endpoint by default).
I will fix soon #1 (I found how to solve the current bug) first, then I will do a new PR for this issue.
Do you think I should also add a parser to load a global variable (like WCG_URL
) to setup the default URL endpoint to query?
Hi Benoît,
we have an ongoing action (started with Chuck and Boris a few years ago) to setup an instance of WGC in Paris. We have several tools and pipelines that are planning to use WGC API for ephemeris calculations. We prefer to have a local instance, with up-to-date SPICE kernels, rather than sending requests to JPL or ESA (with the risk of being blacklisted when intensive requests are sent).
To answer your comments:
I think the
wgc
can be directly use to pass theurl
string to the actual API endpoint if the value is neitherJPL
notESA
and if it is not already aApi
object (I like the idea to fall back automatically on the JPL endpoint by default).
yes, I think it would be acceptable to provide the url
to the API endpoint. However, this means that an Api
object would be instantiated together with each Calculation
. That might be an issue if many Calculation
objects are instantiated. It will increase the load on the WGC server, since a /kernel-set
query is done each time, instead of once per API endpoint and session.
Do you think I should also add a parser to load a global variable (like
WCG_URL
) to setup the default URL endpoint to query?
Yes, that would be useful, but you would lose the "fallback to JPL endpoint" feature.
For a local processing pipeline, we are planning to setup a local instance of WebGeoCalc at Observatoire de Paris. Although that instance would probably not be accessible from the outer internet, we would need to be able to query that API, and so there is a need for a method to set API URL.
I've checked #1 and I would suggest to pass an API object instance in the
wgc
keyword ofCalculation()
, rather of the WGC API short name as a string.This would then give: