diff --git a/grss/utils.py b/grss/utils.py index 1dad90f1..49e3736f 100644 --- a/grss/utils.py +++ b/grss/utils.py @@ -12,7 +12,7 @@ grss_path = os.path.dirname(os.path.abspath(__file__)) default_kernel_path = f'{grss_path}/kernels/' -def _connected_to_internet(url='http://www.google.com/', timeout=5): +def _connected_to_internet(url='http://www.google.com/', timeout=30): try: _ = requests.head(url, timeout=timeout) return True diff --git a/src/grss.cpp b/src/grss.cpp index 695f35e0..a706ad1b 100644 --- a/src/grss.cpp +++ b/src/grss.cpp @@ -167,18 +167,25 @@ PYBIND11_MODULE(libgrss, m) { )mydelimiter") .def(py::init<>()) .def_readwrite("t", &CloseApproachParameters::t, R"mydelimiter( - Time of the close approach. + Time of the close approach or impact. )mydelimiter") .def_readwrite("xRel", &CloseApproachParameters::xRel, R"mydelimiter( + Relative state of the close approach or impact. + )mydelimiter") + .def_readwrite("tCA", &CloseApproachParameters::tCA, R"mydelimiter( + Time of the close approach. + )mydelimiter") + .def_readwrite("xRelCA", &CloseApproachParameters::xRelCA, + R"mydelimiter( Relative state of the close approach. )mydelimiter") .def_readwrite("tMap", &CloseApproachParameters::tMap, R"mydelimiter( - Time of the mapping point. + Time of mapping. )mydelimiter") .def_readwrite("xRelMap", &CloseApproachParameters::xRelMap, R"mydelimiter( - Relative state of the mapping point. + Relative state at map time. )mydelimiter") .def_readwrite("dist", &CloseApproachParameters::dist, R"mydelimiter( Distance of the close approach. diff --git a/src/pck.cpp b/src/pck.cpp index f15f2d9a..377709dd 100644 --- a/src/pck.cpp +++ b/src/pck.cpp @@ -589,6 +589,16 @@ void iau_to_euler(const real t0_mjd, std::string iauFrame, real *euler){ cdec0 = -6.163; cw0 = 302.695; cw1 = 56.3625225; + } else if (iauFrame == "IAU_BENNU"){ + // from https://naif.jpl.nasa.gov/pub/naif/pds/pds4/orex/orex_spice/spice_kernels/pck/bennu_v17.tpc + // BODY2101955_POLE_RA = ( 85.45864 0. 0. ) + // BODY2101955_POLE_DEC = ( -60.36468 0. 0. ) + // BODY2101955_PM = ( 150.48977 2011.143058731885 2.0E-06 ) + cra0 = 85.45864; + cdec0 = -60.36468; + cw0 = 150.48977; + cw1 = 2011.143058731885; + cw2 = 2.0e-06; } else { throw std::runtime_error("iau_to_euler: The IAU frame is not supported."); } @@ -713,7 +723,8 @@ void get_pck_rotMat(const std::string &from, const std::string &to, "IAU_EARTH", "IAU_MOON", "IAU_MARS", "IAU_JUPITER", "IAU_SATURN", "IAU_URANUS", - "IAU_NEPTUNE", "IAU_PLUTO"}; + "IAU_NEPTUNE", "IAU_PLUTO", + "IAU_BENNU"}; // make sure either from or to frame is J2000 int bodyFrameIdx = -1; if (from == "J2000"){