FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
radar::Platform Class Reference

Represents a simulation platform with motion and rotation paths. More...

#include "platform.h"

Public Member Functions

 Platform (std::string name, const SimId id=0) noexcept
 Constructs a Platform with the specified name.
 
 Platform (const Platform &)=delete
 
Platformoperator= (const Platform &)=delete
 
 ~Platform ()=default
 
 Platform (Platform &&)=default
 
Platformoperator= (Platform &&)=default
 
math::PathgetMotionPath () const noexcept
 Gets the motion path of the platform.
 
math::RotationPathgetRotationPath () const noexcept
 Gets the rotation path of the platform.
 
math::Vec3 getPosition (const RealType time) const
 Gets the position of the platform at a specific time.
 
math::SVec3 getRotation (const RealType time) const
 Gets the rotation of the platform at a specific time.
 
const std::string & getName () const noexcept
 Gets the name of the platform.
 
SimId getId () const noexcept
 Gets the unique ID of the platform.
 
void setRotationPath (std::unique_ptr< math::RotationPath > path) noexcept
 Sets the rotation path of the platform.
 
void setMotionPath (std::unique_ptr< math::Path > path) noexcept
 Sets the motion path of the platform.
 
void setName (std::string name) noexcept
 Sets the name of the platform.
 

Detailed Description

Represents a simulation platform with motion and rotation paths.

Definition at line 31 of file platform.h.

Constructor & Destructor Documentation

◆ Platform() [1/3]

radar::Platform::Platform ( std::string  name,
const SimId  id = 0 
)
explicitnoexcept

Constructs a Platform with the specified name.

Parameters
nameThe name of the platform.

Definition at line 39 of file platform.h.

39 :
40 _motion_path(std::make_unique<math::Path>()), _rotation_path(std::make_unique<math::RotationPath>()),
41 _id(id == 0 ? SimIdGenerator::instance().generateId(ObjectType::Platform) : id), _name(std::move(name))
42 {
43 }
static SimIdGenerator & instance()
Get the singleton instance of SimIdGenerator.
Definition sim_id.h:48

◆ Platform() [2/3]

radar::Platform::Platform ( const Platform )
delete

◆ ~Platform()

radar::Platform::~Platform ( )
default

◆ Platform() [3/3]

radar::Platform::Platform ( Platform &&  )
default

Member Function Documentation

◆ getId()

SimId radar::Platform::getId ( ) const
noexcept

Gets the unique ID of the platform.

Returns
The platform SimId.

Definition at line 97 of file platform.h.

97{ return _id; }

Referenced by radar::to_json().

+ Here is the caller graph for this function:

◆ getMotionPath()

math::Path * radar::Platform::getMotionPath ( ) const
noexcept

Gets the motion path of the platform.

Returns
A pointer to the motion path of the platform.

Definition at line 60 of file platform.h.

60{ return _motion_path.get(); }

Referenced by serial::kml_generator_utils::generateAntennaKml(), serial::kml_generator_utils::generateDirectionalAntennaKml(), serial::kml_generator_utils::generateDynamicPathKml(), serial::kml_generator_utils::generatePlatformPathKml(), serial::kml_generator_utils::generateStaticPlacemarkKml(), serial::kml_generator_utils::generateTrackEndpointsKml(), serial::xml_parser_utils::parseMotionPath(), serial::kml_generator_utils::processPlatform(), serial::xml_serializer_utils::serializePlatform(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getName()

const std::string & radar::Platform::getName ( ) const
noexcept

◆ getPosition()

math::Vec3 radar::Platform::getPosition ( const RealType  time) const

Gets the position of the platform at a specific time.

Parameters
timeThe time for which the position is requested.
Returns
A vector representing the position of the platform.

Definition at line 75 of file platform.h.

75{ return _motion_path->getPosition(time); }

Referenced by simulation::calculateDirectPathContribution(), simulation::calculateReflectedPathContribution(), and radar::Object::getPosition().

+ Here is the caller graph for this function:

◆ getRotation()

math::SVec3 radar::Platform::getRotation ( const RealType  time) const

Gets the rotation of the platform at a specific time.

Parameters
timeThe time for which the rotation is requested.
Returns
A vector representing the rotation of the platform.

Definition at line 83 of file platform.h.

83{ return _rotation_path->getPosition(time); }

Referenced by radar::Object::getRotation().

+ Here is the caller graph for this function:

◆ getRotationPath()

math::RotationPath * radar::Platform::getRotationPath ( ) const
noexcept

Gets the rotation path of the platform.

Returns
A pointer to the rotation path of the platform.

Definition at line 67 of file platform.h.

67{ return _rotation_path.get(); }

Referenced by serial::kml_generator_utils::generateDirectionalAntennaKml(), serial::xml_parser_utils::parseFixedRotation(), serial::xml_parser_utils::parseRotationPath(), serial::xml_serializer_utils::serializePlatform(), and radar::to_json().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

Platform & radar::Platform::operator= ( const Platform )
delete

◆ operator=() [2/2]

Platform & radar::Platform::operator= ( Platform &&  )
default

◆ setMotionPath()

void radar::Platform::setMotionPath ( std::unique_ptr< math::Path path)
noexcept

Sets the motion path of the platform.

Parameters
pathA unique pointer to the new motion path.

Definition at line 111 of file platform.h.

111{ _motion_path = std::move(path); }

Referenced by serial::update_platform_paths_from_json().

+ Here is the caller graph for this function:

◆ setName()

void radar::Platform::setName ( std::string  name)
noexcept

Sets the name of the platform.

Parameters
nameThe new name of the platform.

Definition at line 118 of file platform.h.

118{ _name = std::move(name); }

◆ setRotationPath()

void radar::Platform::setRotationPath ( std::unique_ptr< math::RotationPath path)
noexcept

Sets the rotation path of the platform.

Parameters
pathA unique pointer to the new rotation path.

Definition at line 104 of file platform.h.

104{ _rotation_path = std::move(path); }

Referenced by serial::update_platform_paths_from_json().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: