FERS
0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
kml_generator.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-only
2
//
3
// Copyright (c) 2025-present FERS Contributors (see AUTHORS.md).
4
//
5
// See the GNU GPLv2 LICENSE file in the FERS project root for more information.
6
7
/**
8
* @file kml_generator.h
9
* @brief KML file generator for geographical visualization of FERS scenarios.
10
*/
11
12
#pragma once
13
14
#include <expected>
15
#include <string>
16
17
namespace
core
18
{
19
class
World;
20
}
21
22
namespace
serial
23
{
24
/**
25
* @class KmlGenerator
26
* @brief Generates KML files from FERS simulation scenarios for geographical visualization.
27
*
28
* This class generates KML files for geographical visualization of FERS scenarios. It
29
* converts the stored platform coordinates to geodetic KML output using the
30
* user-specified KML/geospatial coordinate system in the XML file. This affects
31
* KML conversion only; the signal simulation uses the raw platform vectors directly.
32
* The KML/geospatial coordinate system can be one of:
33
*
34
* - ENU (East-North-Up): Default. Local Cartesian coordinates (x, y, z) are
35
* treated as meters in an ENU tangent plane centered at a geodetic `<origin>`.
36
*
37
* - UTM (Universal Transverse Mercator): Coordinates (x, y, z) are treated as
38
* easting (m), northing (m), and altitude (m) within a specified UTM zone and
39
* hemisphere.
40
*
41
* - ECEF (Earth-Centered, Earth-Fixed): Coordinates (x, y, z) are treated as
42
* geocentric X, Y, Z values in meters.
43
*
44
* All input coordinates are converted to WGS84 geodetic coordinates (latitude,
45
* longitude, altitude) for the final KML output. The KML is written with
46
* `<altitudeMode>absolute</altitudeMode>`, where altitude is relative to Mean Sea
47
* Level (MSL).
48
*/
49
class
KmlGenerator
50
{
51
public
:
52
/**
53
* @brief Generates a KML file from a pre-built simulation world.
54
*
55
* @param world The simulation world containing all objects and paths.
56
* @param outputKmlPath The path for the output KML file.
57
* @return Success or an error message describing why generation failed.
58
*/
59
static
std::expected<void, std::string>
generateKml
(
const
core::World
& world,
const
std::string&
outputKmlPath
);
60
};
61
}
core::World
The World class manages the simulator environment.
Definition
world.h:39
serial::KmlGenerator
Generates KML files from FERS simulation scenarios for geographical visualization.
Definition
kml_generator.h:50
serial::KmlGenerator::generateKml
static std::expected< void, std::string > generateKml(const core::World &world, const std::string &outputKmlPath)
Generates a KML file from a pre-built simulation world.
Definition
kml_generator.cpp:28
core
Definition
memory_projection.cpp:36
serial
Definition
antenna_factory.h:30
max
math::Vec3 max
Definition
sim_threading.cpp:233
packages
libfers
src
serial
kml_generator.h
Generated by
1.9.8