.. _program_listing_file_simulations_world.h: Program Listing for File world.h ================================ |exhale_lsh| :ref:`Return to documentation for file ` (``simulations/world.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include "lupnt/core/config.h" #include "lupnt/core/definitions.h" #include "lupnt/core/object.h" #include "lupnt/interfaces/lola_dem.h" #include "lupnt/states/state.h" namespace lupnt { class Simulation; class NBodyDynamics; class World : public Object { public: World() = default; explicit World(Config& world_config); void SetSimulation(Simulation* sim) { sim_ = sim; } Real GetEpoch() const { return epoch_; } Frame GetFrame() const { return frame_; } const Config& GetForceModel() const { return force_model_; } bool HasForceModel() const { return has_force_model_; } Ptr MakeDynamics() const; Ptr MakeDynamics(double cr, double area_m2, double mass_kg) const; Ptr MakeTruthDynamics() const; const Config& GetPlasma() const { return plasma_; } bool HasPlasma() const { return has_plasma_; } double GetGM() const { return gm_; } Vec3d Gravity(const Vec3d& r) const; bool HasTerrain() const { return has_dem_; } const LunarDem& GetDem() const { return dem_; } double GetElevation(double east_m, double north_m) const; Vec3d EnuToWorld(double east_m, double north_m, double up_m) const; const Mat3d& REnuToWorld() const { return R_enu2world_; } const Vec3d& SiteCenterWorld() const { return r_center_world_; } double SiteLatDeg() const { return site_lat_deg_; } double SiteLonDeg() const { return site_lon_deg_; } Cart6 GetStateAt(const std::string& agent_name, Real t) const; private: Simulation* sim_ = nullptr; Real epoch_ = 0.0; Frame frame_ = Frame::MOON_CI; // Orbital force model. bool has_force_model_ = false; Config force_model_; // NBodyDynamics-style force-model block // Ionosphere/plasmasphere signal-delay environment (shared truth property). bool has_plasma_ = false; Config plasma_; // `plasma:` block; schema consumed by the GNSS ODTS app // Point-mass gravity (surface INS). double gm_ = 0.0; // set from `gravity.body` (default MOON) in the constructor // Terrain / DEM (surface scenarios). bool has_dem_ = false; LunarDem dem_; double dem_cx_ = 0.0, dem_cy_ = 0.0; // DEM native center coords Vec3d r_center_world_ = Vec3d::Zero(); // ENU origin in the world frame Mat3d R_enu2world_ = Mat3d::Identity(); // ENU -> world rotation double site_lat_deg_ = 0.0, site_lon_deg_ = 0.0; }; } // namespace lupnt