Commit 8ae807ab authored by Alexander Lapshin's avatar Alexander Lapshin

rnb interpolation

parent 4904b2fb
......@@ -275,6 +275,20 @@ Vect6 OrbBlocksStore::get_pos(const TimeJD& date, const bool tks) const
throw Exp() << "no orbit found";
}
std::pair<Vect6, Vect3> OrbBlocksStore::get_pos_rnb(const TimeJD& date, const bool tks) const
{
for (const auto& block : m_blocks) {
if (date >= block.get_beg() && date <= block.get_end()) {
return {
block.get_interpolator()->get_pos(date, tks),
block.get_interpolator()->get_rnb(date, tks)
};
}
}
throw Exp() << "no orbit found";
}
const SInitOrbit& OrbBlocksStore::get_orbit(const TimeJD& date) const
{
for (const auto& block : m_blocks) {
......
......@@ -17,6 +17,7 @@ public:
void init();
SInitOrbits calc_orbits(std::vector<TimeJD> dates, bool variates) const;
Vect6 get_pos(const TimeJD& date, bool tks = false) const;
std::pair<Vect6, Vect3> get_pos_rnb(const TimeJD& date, bool tks = false) const;
const SInitOrbit& get_orbit(const TimeJD& date) const;
const OrbBlocks& get_blocks() const { return m_blocks; }
std::vector<orb_block_data> get_orb_data() const;
......@@ -25,6 +26,8 @@ public:
const TimeJD& get_end_before_filter() const { return m_end_before_filter; }
void load(const jsonval& parent);
bool is_initiated() const { return m_initiated; }
bool has_rnb() const { return m_has_rnb; }
void set_rnb_flag(const bool flag) { m_has_rnb = flag; }
private:
void init_min_dist(const SInitOrbits& orbits, const TimeJD& beg, const TimeJD& end, bool forced);
void calc_min_dist(const SInitOrbit& orb1, const SInitOrbit& orb2, const TimeJD& beg, const TimeJD& end, TimeJD& result_jd, double& result_dist) const;
......@@ -33,4 +36,5 @@ private:
TimeJD m_beg_before_filter;
TimeJD m_end_before_filter;
bool m_initiated{false};
bool m_has_rnb{false};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment