14#include <GeographicLib/Geocentric.hpp>
15#include <GeographicLib/LocalCartesian.hpp>
16#include <GeographicLib/UTMUPS.hpp>
41 { proj->Reverse(pos.
x, pos.
y, pos.
z, lat, lon, alt); };
48 ctx.
converter = [zone, northp](
const math::Vec3& pos,
double& lat,
double& lon,
double& alt)
51 GeographicLib::UTMUPS::Reverse(zone, northp, pos.x, pos.y, lat, lon, gamma, k);
58 const auto& earth = GeographicLib::Geocentric::WGS84();
60 { earth.Reverse(pos.
x, pos.
y, pos.
z, lat, lon, alt); };
65 std::ofstream kml_file(outputKmlPath.c_str());
66 if (!kml_file.is_open())
75 catch (
const std::exception& e)
The World class manages the simulator environment.
A class representing a vector in rectangular coordinates.
RealType x
The x component of the vector.
RealType z
The z component of the vector.
RealType y
The y component of the vector.
static bool generateKml(const core::World &world, const std::string &outputKmlPath)
Generates a KML file from a pre-built simulation world.
KML file generator for geographical visualization of FERS scenarios.
Utility definitions and functions for generating KML files from simulation scenarios.
Header file for the logging system.
@ ERROR
Error level for error events.
@ UTM
Universal Transverse Mercator.
@ ENU
East-North-Up local tangent plane (default)
@ ECEF
Earth-Centered, Earth-Fixed.
void generateKmlToStream(std::ostream &out, const core::World &world, const KmlContext &ctx)
Master entry point designed to convert the comprehensive simulation world state into a valid KML docu...
Defines the Parameters struct and provides methods for managing simulation parameters.
double origin_longitude
Geodetic origin longitude.
double origin_altitude
Geodetic origin altitude (in meters)
CoordinateFrame coordinate_frame
Scenario coordinate frame.
int utm_zone
UTM zone (1-60), if applicable.
bool utm_north_hemisphere
UTM hemisphere, if applicable.
double origin_latitude
Geodetic origin latitude.
Context data required during KML generation.
params::Parameters parameters
A copy of the global simulation parameters.
ConverterFunc converter
Function used to translate simulation Cartesian space into geographic coords.