Program Listing for File lunar_nav_constellation.h

Return to documentation for file (agents/lunar_nav_constellation.h)

#pragma once

#include <string>
#include <vector>

#include "lupnt/agents/agent.h"
#include "lupnt/agents/spacecraft.h"

namespace lupnt {

  class LunarNavConstellation : public Agent {
  public:
    LunarNavConstellation() = default;
    explicit LunarNavConstellation(Config& config);

    void Setup() override;
    void Step(Real t) override;

    Cart6 GetStateAt(Real t) const override;

    int NumSatellites() const { return static_cast<int>(sats_.size()); }
    const std::string& SatelliteName(int j) const { return sat_names_[j]; }
    Cart6 GetSatelliteStateAt(int j, Real t) const { return sats_[j]->GetStateAt(t); }

  private:
    void AddSatellite(const Config& shared, const YAML::Node& initial_state, const std::string& nm);

    std::vector<Ptr<Spacecraft>> sats_;
    std::vector<std::string> sat_names_;
  };

}  // namespace lupnt