|
FERS 1.0.0
The Flexible Extensible Radar Simulator
|
Classes | |
| struct | KmlContext |
| Context data required during KML generation. More... | |
Typedefs | |
| using | ConverterFunc = std::function< void(const math::Vec3 &, double &, double &, double &)> |
| Callback signature used for converting math coordinates to lat/lon/altitude. | |
Functions | |
| double | sincAntennaGain (double theta, double alpha, double beta, double gamma) |
| Calculates a normalized sinc-based antenna gain mapping. | |
| double | find3DbDropAngle (double alpha, double beta, double gamma) |
| Numerically determines the 3dB drop angle for a parameterized generic antenna. | |
| double | findGaussian3DbDropAngle (const antenna::Gaussian *gaussianAnt) |
| Calculates the 3dB drop angle for a Gaussian antenna. | |
| double | findParabolic3DbDropAngle (const antenna::Parabolic *parabolicAnt, double wavelength) |
| Calculates the 3dB drop angle for a Parabolic antenna. | |
| double | findSquareHorn3DbDropAngle (const antenna::SquareHorn *squarehornAnt, double wavelength) |
| Calculates the 3dB drop angle for a Square Horn antenna. | |
| std::string | formatCoordinates (double lon, double lat, double alt) |
Formats coordinates into a comma-separated string suitable for KML <coordinates>. | |
| void | calculateDestinationCoordinate (double startLatitude, double startLongitude, double angle, double distance, double &destLatitude, double &destLongitude) |
| Calculates a destination coordinate given a starting position, bearing, and distance. | |
| std::vector< std::pair< double, double > > | generateCircleCoordinates (double lat, double lon, double radius_km) |
| Generates a collection of points tracing a circle around a center coordinate. | |
| void | writeKmlHeaderAndStyles (std::ostream &out, const KmlContext &ctx) |
| Writes the standard KML preamble and style definitions to the output stream. | |
| void | writePoint (std::ostream &out, const std::string &indent, const std::string &name, const std::string &styleUrl, const std::string &coordinates, double objectAltitude, double referenceAltitude) |
Writes a KML <Point> placemark to the output stream. | |
| void | writeAntennaBeamLine (std::ostream &out, const std::string &indent, const std::string &name, const std::string &style, const std::string &startCoords, const std::string &endCoords) |
| Writes a visual cone/beam line representing the antenna look direction. | |
| std::string | getPlacemarkStyleForPlatform (const std::vector< const radar::Object * > &objects) |
| Determines the proper KML style definition ID to use based on the platform's attached objects. | |
| const radar::Radar * | getPrimaryRadar (const std::vector< const radar::Object * > &objects) |
| Identifies the primary radar object within a platform for styling and direction tracking. | |
| void | generateIsotropicAntennaKml (std::ostream &out, const math::Vec3 &position, const KmlContext &ctx, const std::string &indent) |
| Renders the visual representation for an isotropic antenna into the output stream. | |
| void | generateDirectionalAntennaKml (std::ostream &out, const radar::Platform *platform, const KmlContext &ctx, const std::optional< double > &angle3DbDropDeg, const std::string &indent) |
| Renders the visual pointing representation for a directional (beam) antenna. | |
| void | generateAntennaKml (std::ostream &out, const radar::Platform *platform, const radar::Radar *radar, const KmlContext &ctx, const std::string &indent) |
| Dispatch function that selects and generates the appropriate KML for a given radar's antenna. | |
| void | generateDynamicPathKml (std::ostream &out, const radar::Platform *platform, const std::string &styleUrl, double refAlt, const KmlContext &ctx, const std::string &indent) |
| Generates KML for a continuously moving dynamic platform path. | |
| void | generateTrackEndpointsKml (std::ostream &out, const radar::Platform *platform, double refAlt, const KmlContext &ctx, const std::string &indent) |
| Generates KML rendering start and end pushpins for a moving platform's track. | |
| void | generateStaticPlacemarkKml (std::ostream &out, const radar::Platform *platform, const std::string &styleUrl, double refAlt, const KmlContext &ctx, const std::string &indent) |
| Generates a simple static placemark KML for a non-moving platform. | |
| void | generatePlatformPathKml (std::ostream &out, const radar::Platform *platform, const std::string &style, double refAlt, const KmlContext &ctx, const std::string &indent) |
| Dispatches the generation of a platform's path representation (static vs dynamic). | |
| void | processPlatform (std::ostream &out, const radar::Platform *platform, const std::vector< const radar::Object * > &objects, const KmlContext &ctx, double referenceAltitude, const std::string &indent) |
| Orchestrates full processing and rendering of an individual platform into the KML stream. | |
| 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 document. | |
Variables | |
| constexpr int | TRACK_NUM_DIVISIONS = 100 |
| constexpr int | ISOTROPIC_PATTERN_POINTS = 100 |
| constexpr double | ISOTROPIC_PATTERN_RADIUS_KM = 20.0 |
| constexpr double | DIRECTIONAL_ANTENNA_ARROW_LENGTH_M = 20000.0 |
| using serial::kml_generator_utils::ConverterFunc = typedef std::function<void(const math::Vec3&, double&, double&, double&)> |
Callback signature used for converting math coordinates to lat/lon/altitude.
Definition at line 52 of file kml_generator_utils.h.
| void serial::kml_generator_utils::calculateDestinationCoordinate | ( | double | startLatitude, |
| double | startLongitude, | ||
| double | angle, | ||
| double | distance, | ||
| double & | destLatitude, | ||
| double & | destLongitude | ||
| ) |
Calculates a destination coordinate given a starting position, bearing, and distance.
| startLatitude | Starting latitude in degrees. |
| startLongitude | Starting longitude in degrees. |
| angle | Bearing angle in degrees. |
| distance | Distance to travel in meters. |
| destLatitude | Output destination latitude in degrees. |
| destLongitude | Output destination longitude in degrees. |
Definition at line 140 of file kml_generator_utils.cpp.
Referenced by generateCircleCoordinates(), and generateDirectionalAntennaKml().
Here is the caller graph for this function:| double serial::kml_generator_utils::find3DbDropAngle | ( | double | alpha, |
| double | beta, | ||
| double | gamma | ||
| ) |
Numerically determines the 3dB drop angle for a parameterized generic antenna.
| alpha | Primary dimensional scale factor. |
| beta | Secondary dimensional scale factor. |
| gamma | Falloff rate. |
Definition at line 48 of file kml_generator_utils.cpp.
References PI, and sincAntennaGain().
Referenced by generateAntennaKml().
Here is the call graph for this function:
Here is the caller graph for this function:| double serial::kml_generator_utils::findGaussian3DbDropAngle | ( | const antenna::Gaussian * | gaussianAnt | ) |
Calculates the 3dB drop angle for a Gaussian antenna.
| gaussianAnt | Pointer to the Gaussian antenna. |
Definition at line 71 of file kml_generator_utils.cpp.
References antenna::Gaussian::getAzimuthScale(), antenna::Antenna::getName(), LOG, PI, and logging::WARNING.
Referenced by generateAntennaKml().
Here is the call graph for this function:
Here is the caller graph for this function:| double serial::kml_generator_utils::findParabolic3DbDropAngle | ( | const antenna::Parabolic * | parabolicAnt, |
| double | wavelength | ||
| ) |
Calculates the 3dB drop angle for a Parabolic antenna.
| parabolicAnt | Pointer to the Parabolic antenna. |
| wavelength | The operating wavelength. |
Definition at line 85 of file kml_generator_utils.cpp.
References antenna::Parabolic::getDiameter(), antenna::Antenna::getName(), logging::INFO, LOG, PI, and logging::WARNING.
Referenced by generateAntennaKml().
Here is the call graph for this function:
Here is the caller graph for this function:| double serial::kml_generator_utils::findSquareHorn3DbDropAngle | ( | const antenna::SquareHorn * | squarehornAnt, |
| double | wavelength | ||
| ) |
Calculates the 3dB drop angle for a Square Horn antenna.
| squarehornAnt | Pointer to the Square Horn antenna. |
| wavelength | The operating wavelength. |
Definition at line 109 of file kml_generator_utils.cpp.
References antenna::SquareHorn::getDimension(), antenna::Antenna::getName(), logging::INFO, LOG, PI, and logging::WARNING.
Referenced by generateAntennaKml().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string serial::kml_generator_utils::formatCoordinates | ( | double | lon, |
| double | lat, | ||
| double | alt | ||
| ) |
Formats coordinates into a comma-separated string suitable for KML <coordinates>.
| lon | Longitude in degrees. |
| lat | Latitude in degrees. |
| alt | Altitude in meters. |
Definition at line 133 of file kml_generator_utils.cpp.
Referenced by generateDirectionalAntennaKml(), generateIsotropicAntennaKml(), generateStaticPlacemarkKml(), and generateTrackEndpointsKml().
Here is the caller graph for this function:| void serial::kml_generator_utils::generateAntennaKml | ( | std::ostream & | out, |
| const radar::Platform * | platform, | ||
| const radar::Radar * | radar, | ||
| const KmlContext & | ctx, | ||
| const std::string & | indent | ||
| ) |
Dispatch function that selects and generates the appropriate KML for a given radar's antenna.
| out | The stream to write to. |
| platform | The platform containing the radar. |
| radar | The radar to visualize. |
| ctx | The current KML context. |
| indent | The indentation string. |
Definition at line 367 of file kml_generator_utils.cpp.
References params::Parameters::c, find3DbDropAngle(), findGaussian3DbDropAngle(), findParabolic3DbDropAngle(), findSquareHorn3DbDropAngle(), generateDirectionalAntennaKml(), generateIsotropicAntennaKml(), math::Path::getCoords(), radar::Platform::getMotionPath(), antenna::Antenna::getName(), logging::INFO, LOG, and serial::kml_generator_utils::KmlContext::parameters.
Referenced by processPlatform().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::pair< double, double > > serial::kml_generator_utils::generateCircleCoordinates | ( | double | lat, |
| double | lon, | ||
| double | radius_km | ||
| ) |
Generates a collection of points tracing a circle around a center coordinate.
| lat | Center latitude in degrees. |
| lon | Center longitude in degrees. |
| radius_km | Circle radius in kilometers. |
Definition at line 147 of file kml_generator_utils.cpp.
References calculateDestinationCoordinate(), and ISOTROPIC_PATTERN_POINTS.
Referenced by generateIsotropicAntennaKml().
Here is the call graph for this function:
Here is the caller graph for this function:| void serial::kml_generator_utils::generateDirectionalAntennaKml | ( | std::ostream & | out, |
| const radar::Platform * | platform, | ||
| const KmlContext & | ctx, | ||
| const std::optional< double > & | angle3DbDropDeg, | ||
| const std::string & | indent | ||
| ) |
Renders the visual pointing representation for a directional (beam) antenna.
| out | The stream to write to. |
| platform | The platform the antenna is mounted on. |
| ctx | The current KML context. |
| angle3DbDropDeg | An optional computed angular drop-off to dictate the beam width rendering. |
| indent | The indentation string. |
Definition at line 292 of file kml_generator_utils.cpp.
References math::SVec3::azimuth, calculateDestinationCoordinate(), serial::kml_generator_utils::KmlContext::converter, DIRECTIONAL_ANTENNA_ARROW_LENGTH_M, math::SVec3::elevation, EPSILON, formatCoordinates(), math::Path::getCoords(), radar::Platform::getMotionPath(), math::RotationPath::getPosition(), radar::Platform::getRotationPath(), serial::rotation_angle_utils::internal_azimuth_to_external(), serial::rotation_angle_utils::internal_elevation_to_external(), serial::kml_generator_utils::KmlContext::parameters, PI, params::Parameters::rotation_angle_unit, params::rotationAngleUnitToken(), params::Parameters::start, and writeAntennaBeamLine().
Referenced by generateAntennaKml().
Here is the call graph for this function:
Here is the caller graph for this function:| void serial::kml_generator_utils::generateDynamicPathKml | ( | std::ostream & | out, |
| const radar::Platform * | platform, | ||
| const std::string & | styleUrl, | ||
| double | refAlt, | ||
| const KmlContext & | ctx, | ||
| const std::string & | indent | ||
| ) |
Generates KML for a continuously moving dynamic platform path.
| out | The stream to write to. |
| platform | The platform undergoing dynamic motion. |
| styleUrl | The style ID for the path line. |
| refAlt | The baseline reference altitude. |
| ctx | The current KML context. |
| indent | The indentation string. |
Definition at line 440 of file kml_generator_utils.cpp.
References serial::kml_generator_utils::KmlContext::converter, math::Path::getCoords(), radar::Platform::getMotionPath(), radar::Platform::getName(), math::Path::getPosition(), and TRACK_NUM_DIVISIONS.
Referenced by generatePlatformPathKml().
Here is the call graph for this function:
Here is the caller graph for this function:| void serial::kml_generator_utils::generateIsotropicAntennaKml | ( | std::ostream & | out, |
| const math::Vec3 & | position, | ||
| const KmlContext & | ctx, | ||
| const std::string & | indent | ||
| ) |
Renders the visual representation for an isotropic antenna into the output stream.
| out | The stream to write to. |
| position | The position of the antenna in simulation space. |
| ctx | The current KML context. |
| indent | The indentation string. |
Definition at line 266 of file kml_generator_utils.cpp.
References serial::kml_generator_utils::KmlContext::converter, formatCoordinates(), generateCircleCoordinates(), and ISOTROPIC_PATTERN_RADIUS_KM.
Referenced by generateAntennaKml().
Here is the call graph for this function:
Here is the caller graph for this function:| void serial::kml_generator_utils::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 document.
| out | The output stream where the resulting KML markup goes. |
| world | The aggregated global simulation state. |
| ctx | The configured KML context containing simulation parameters and a coordinate converter. |
Definition at line 586 of file kml_generator_utils.cpp.
References serial::kml_generator_utils::KmlContext::converter, params::Parameters::coordinate_frame, params::ENU, core::World::getReceivers(), core::World::getTargets(), core::World::getTransmitters(), params::Parameters::origin_altitude, params::Parameters::origin_latitude, params::Parameters::origin_longitude, serial::kml_generator_utils::KmlContext::parameters, processPlatform(), and writeKmlHeaderAndStyles().
Referenced by serial::KmlGenerator::generateKml().
Here is the call graph for this function:
Here is the caller graph for this function:| void serial::kml_generator_utils::generatePlatformPathKml | ( | std::ostream & | out, |
| const radar::Platform * | platform, | ||
| const std::string & | style, | ||
| double | refAlt, | ||
| const KmlContext & | ctx, | ||
| const std::string & | indent | ||
| ) |
Dispatches the generation of a platform's path representation (static vs dynamic).
| out | The stream to write to. |
| platform | The platform whose path needs to be rendered. |
| style | The path tracing styling. |
| refAlt | The baseline reference altitude. |
| ctx | The current KML context. |
| indent | The indentation string. |
Definition at line 543 of file kml_generator_utils.cpp.
References generateDynamicPathKml(), generateStaticPlacemarkKml(), generateTrackEndpointsKml(), radar::Platform::getMotionPath(), math::Path::getType(), math::Path::INTERP_CUBIC, and math::Path::INTERP_LINEAR.
Referenced by processPlatform().
Here is the call graph for this function:
Here is the caller graph for this function:| void serial::kml_generator_utils::generateStaticPlacemarkKml | ( | std::ostream & | out, |
| const radar::Platform * | platform, | ||
| const std::string & | styleUrl, | ||
| double | refAlt, | ||
| const KmlContext & | ctx, | ||
| const std::string & | indent | ||
| ) |
Generates a simple static placemark KML for a non-moving platform.
| out | The stream to write to. |
| platform | The stationary platform. |
| styleUrl | The style ID to apply to the placemark. |
| refAlt | The baseline reference altitude. |
| ctx | The current KML context. |
| indent | The indentation string. |
Definition at line 515 of file kml_generator_utils.cpp.
References serial::kml_generator_utils::KmlContext::converter, formatCoordinates(), math::Path::getCoords(), radar::Platform::getMotionPath(), and radar::Platform::getName().
Referenced by generatePlatformPathKml().
Here is the call graph for this function:
Here is the caller graph for this function:| void serial::kml_generator_utils::generateTrackEndpointsKml | ( | std::ostream & | out, |
| const radar::Platform * | platform, | ||
| double | refAlt, | ||
| const KmlContext & | ctx, | ||
| const std::string & | indent | ||
| ) |
Generates KML rendering start and end pushpins for a moving platform's track.
| out | The stream to write to. |
| platform | The platform containing the path boundaries. |
| refAlt | The baseline reference altitude. |
| ctx | The current KML context. |
| indent | The indentation string. |
Definition at line 491 of file kml_generator_utils.cpp.
References serial::kml_generator_utils::KmlContext::converter, formatCoordinates(), math::Path::getCoords(), radar::Platform::getMotionPath(), radar::Platform::getName(), and writePoint().
Referenced by generatePlatformPathKml().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string serial::kml_generator_utils::getPlacemarkStyleForPlatform | ( | const std::vector< const radar::Object * > & | objects | ) |
Determines the proper KML style definition ID to use based on the platform's attached objects.
| objects | A collection of objects attached to the platform. |
Definition at line 227 of file kml_generator_utils.cpp.
Referenced by processPlatform().
Here is the caller graph for this function:| const radar::Radar * serial::kml_generator_utils::getPrimaryRadar | ( | const std::vector< const radar::Object * > & | objects | ) |
Identifies the primary radar object within a platform for styling and direction tracking.
| objects | A collection of objects attached to the platform. |
Definition at line 254 of file kml_generator_utils.cpp.
Referenced by processPlatform().
Here is the caller graph for this function:| void serial::kml_generator_utils::processPlatform | ( | std::ostream & | out, |
| const radar::Platform * | platform, | ||
| const std::vector< const radar::Object * > & | objects, | ||
| const KmlContext & | ctx, | ||
| double | referenceAltitude, | ||
| const std::string & | indent | ||
| ) |
Orchestrates full processing and rendering of an individual platform into the KML stream.
| out | The stream to write to. |
| platform | The platform to process. |
| objects | Attached radar or target objects corresponding to the platform. |
| ctx | The current KML context. |
| referenceAltitude | Baseline reference altitude for the entire platform. |
| indent | The indentation string. |
Definition at line 561 of file kml_generator_utils.cpp.
References generateAntennaKml(), generatePlatformPathKml(), math::Path::getCoords(), radar::Platform::getMotionPath(), radar::Platform::getName(), getPlacemarkStyleForPlatform(), and getPrimaryRadar().
Referenced by generateKmlToStream().
Here is the call graph for this function:
Here is the caller graph for this function:| double serial::kml_generator_utils::sincAntennaGain | ( | double | theta, |
| double | alpha, | ||
| double | beta, | ||
| double | gamma | ||
| ) |
Calculates a normalized sinc-based antenna gain mapping.
| theta | The angle to evaluate. |
| alpha | Primary dimensional scale factor. |
| beta | Secondary dimensional scale factor. |
| gamma | Falloff rate. |
Definition at line 38 of file kml_generator_utils.cpp.
Referenced by find3DbDropAngle().
Here is the caller graph for this function:| void serial::kml_generator_utils::writeAntennaBeamLine | ( | std::ostream & | out, |
| const std::string & | indent, | ||
| const std::string & | name, | ||
| const std::string & | style, | ||
| const std::string & | startCoords, | ||
| const std::string & | endCoords | ||
| ) |
Writes a visual cone/beam line representing the antenna look direction.
| out | The stream to write to. |
| indent | The indentation string. |
| name | The name of the beam projection line. |
| style | The ID of the line style to apply. |
| startCoords | The pre-formatted origin coordinate string. |
| endCoords | The pre-formatted destination coordinate string. |
Definition at line 213 of file kml_generator_utils.cpp.
Referenced by generateDirectionalAntennaKml().
Here is the caller graph for this function:| void serial::kml_generator_utils::writeKmlHeaderAndStyles | ( | std::ostream & | out, |
| const KmlContext & | ctx | ||
| ) |
Writes the standard KML preamble and style definitions to the output stream.
| out | The stream to write to. |
| ctx | The current KML generation context. |
Definition at line 161 of file kml_generator_utils.cpp.
References serial::kml_generator_utils::KmlContext::parameters, and params::Parameters::simulation_name.
Referenced by generateKmlToStream().
Here is the caller graph for this function:| void serial::kml_generator_utils::writePoint | ( | std::ostream & | out, |
| const std::string & | indent, | ||
| const std::string & | name, | ||
| const std::string & | styleUrl, | ||
| const std::string & | coordinates, | ||
| double | objectAltitude, | ||
| double | referenceAltitude | ||
| ) |
Writes a KML <Point> placemark to the output stream.
| out | The stream to write to. |
| indent | The indentation string. |
| name | The name of the point. |
| styleUrl | The ID of the style to apply. |
| coordinates | The pre-formatted coordinate string. |
| objectAltitude | The absolute altitude of the point. |
| referenceAltitude | The reference altitude (e.g. ground level) for relative extrusions. |
Definition at line 196 of file kml_generator_utils.cpp.
Referenced by generateTrackEndpointsKml().
Here is the caller graph for this function:
|
constexpr |
Definition at line 36 of file kml_generator_utils.cpp.
Referenced by generateDirectionalAntennaKml().
|
constexpr |
Definition at line 34 of file kml_generator_utils.cpp.
Referenced by generateCircleCoordinates().
|
constexpr |
Definition at line 35 of file kml_generator_utils.cpp.
Referenced by generateIsotropicAntennaKml().
|
constexpr |
Definition at line 33 of file kml_generator_utils.cpp.
Referenced by generateDynamicPathKml().