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

Represents a radar system on a platform. More...

#include "radar_obj.h"

+ Inheritance diagram for radar::Radar:
+ Collaboration diagram for radar::Radar:

Public Member Functions

 Radar (Platform *platform, std::string name) noexcept
 Constructs a Radar object.
 
 ~Radar () override=default
 
 Radar (const Radar &)=delete
 
Radaroperator= (const Radar &)=delete
 
 Radar (Radar &&)=delete
 
Radaroperator= (Radar &&)=delete
 
const RadargetAttached () const noexcept
 Retrieves the attached radar object.
 
const antenna::AntennagetAntenna () const noexcept
 Gets the antenna associated with this radar.
 
RealType getGain (const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const
 Calculates the radar gain based on input angles and wavelength.
 
virtual RealType getNoiseTemperature (const math::SVec3 &angle) const noexcept
 Gets the noise temperature of the radar.
 
std::shared_ptr< timing::TiminggetTiming () const
 Retrieves the timing source for the radar.
 
void setTiming (const std::shared_ptr< timing::Timing > &tim)
 Sets the timing source for the radar.
 
void setAntenna (const antenna::Antenna *ant)
 Sets the antenna for the radar.
 
void setAttached (const Radar *obj)
 Attaches another radar object to this radar.
 
math::Vec3 getPosition (const RealType time) const
 Retrieves the position of the object.
 
math::SVec3 getRotation (const RealType time) const
 Retrieves the rotation of the object.
 
PlatformgetPlatform () const noexcept
 Retrieves the associated platform of the object.
 
const std::string & getName () const noexcept
 Retrieves the name of the object.
 

Protected Attributes

std::shared_ptr< timing::Timing_timing
 Timing source for the radar.
 

Detailed Description

Represents a radar system on a platform.

Definition at line 45 of file radar_obj.h.

Constructor & Destructor Documentation

◆ Radar() [1/3]

radar::Radar::Radar ( Platform platform,
std::string  name 
)
noexcept

Constructs a Radar object.

Parameters
platformPointer to the platform on which the radar is mounted.
nameName of the radar object.

Definition at line 54 of file radar_obj.h.

54: Object(platform, std::move(name)) {}
Object(Platform *platform, std::string name) noexcept
Constructor for Object.
Definition object.h:32

◆ ~Radar()

radar::Radar::~Radar ( )
overridedefault

◆ Radar() [2/3]

radar::Radar::Radar ( const Radar )
delete

◆ Radar() [3/3]

radar::Radar::Radar ( Radar &&  )
delete

Member Function Documentation

◆ getAntenna()

const antenna::Antenna * radar::Radar::getAntenna ( ) const
noexcept

Gets the antenna associated with this radar.

Returns
Pointer to the associated antenna.

Definition at line 78 of file radar_obj.h.

78{ return _antenna; }

Referenced by radar::to_json(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getAttached()

const Radar * radar::Radar::getAttached ( ) const
noexcept

Retrieves the attached radar object.

Returns
Pointer to the attached radar object.

Definition at line 71 of file radar_obj.h.

71{ return _attached; }

Referenced by simulation::calculatePreviewLinks(), and simulation::calculateResponse().

+ Here is the caller graph for this function:

◆ getGain()

RealType radar::Radar::getGain ( const math::SVec3 angle,
const math::SVec3 refangle,
RealType  wavelength 
) const

Calculates the radar gain based on input angles and wavelength.

Parameters
angleThe radar's pointing angle.
refangleThe reference angle for comparison.
wavelengthThe wavelength of the radar signal.
Returns
The calculated radar gain.

Definition at line 26 of file radar_obj.cpp.

27 {
28 return _antenna->getGain(angle, refangle, wavelength);
29 }
virtual RealType getGain(const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const =0
Computes the gain of the antenna based on the input angle and reference angle.

References antenna::Antenna::getGain().

+ Here is the call graph for this function:

◆ getName()

const std::string & radar::Object::getName ( ) const
noexceptinherited

Retrieves the name of the object.

Returns
A const reference to the string representing the object's name.

Definition at line 68 of file object.h.

68{ return _name; }

Referenced by simulation::calculatePreviewLinks(), simulation::calculateResponse(), processing::finalizeCwReceiver(), serial::Response::getTransmitterName(), processing::runPulsedFinalizer(), radar::Receiver::setNoiseTemperature(), radar::to_json(), radar::to_json(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getNoiseTemperature()

RealType radar::Radar::getNoiseTemperature ( const math::SVec3 angle) const
virtualnoexcept

Gets the noise temperature of the radar.

Parameters
angleThe angle at which the noise temperature is calculated.
Returns
The calculated noise temperature.

Reimplemented in radar::Receiver.

Definition at line 31 of file radar_obj.cpp.

32 {
33 return _antenna->getNoiseTemperature(angle);
34 }
virtual RealType getNoiseTemperature(const math::SVec3 &) const noexcept
Computes the noise temperature of the antenna based on the angle.

Referenced by radar::Receiver::getNoiseTemperature().

+ Here is the caller graph for this function:

◆ getPlatform()

Platform * radar::Object::getPlatform ( ) const
noexceptinherited

Retrieves the associated platform of the object.

Returns
A pointer to the Platform object associated with this object.

Definition at line 61 of file object.h.

61{ return _platform; }

Referenced by simulation::calculateDirectPathContribution(), simulation::calculateReflectedPathContribution(), and simulation::calculateResponse().

+ Here is the caller graph for this function:

◆ getPosition()

math::Vec3 radar::Object::getPosition ( const RealType  time) const
inherited

Retrieves the position of the object.

Parameters
timeThe time at which to get the position of the object.
Returns
A math::Vec3 representing the position of the object.

Definition at line 46 of file object.h.

46{ return _platform->getPosition(time); }
math::Vec3 getPosition(const RealType time) const
Gets the position of the platform at a specific time.
Definition platform.h:74

References radar::Platform::getPosition().

Referenced by simulation::calculatePreviewLinks(), simulation::solveRe(), and simulation::solveReDirect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRotation()

math::SVec3 radar::Object::getRotation ( const RealType  time) const
inherited

Retrieves the rotation of the object.

Parameters
timeThe time at which to get the rotation of the object.
Returns
A math::SVec3 representing the rotation of the object.

Definition at line 54 of file object.h.

54{ return _platform->getRotation(time); }
math::SVec3 getRotation(const RealType time) const
Gets the rotation of the platform at a specific time.
Definition platform.h:82

References radar::Platform::getRotation().

Referenced by radar::FileTarget::getRcs(), and processing::runPulsedFinalizer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTiming()

std::shared_ptr< timing::Timing > radar::Radar::getTiming ( ) const

Retrieves the timing source for the radar.

Returns
Shared pointer to the timing source.

Definition at line 66 of file radar_obj.cpp.

67 {
68 if (!_timing)
69 {
70 LOG(Level::FATAL, "Radar::GetTiming called before timing set");
71 throw std::runtime_error("Radar::GetTiming called before timing set");
72 }
73 return _timing;
74 }
std::shared_ptr< timing::Timing > _timing
Timing source for the radar.
Definition radar_obj.h:129
#define LOG(level,...)
Definition logging.h:19

References _timing, and LOG.

Referenced by processing::finalizeCwReceiver(), processing::runPulsedFinalizer(), radar::to_json(), and radar::to_json().

+ Here is the caller graph for this function:

◆ operator=() [1/2]

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

◆ operator=() [2/2]

Radar & radar::Radar::operator= ( Radar &&  )
delete

◆ setAntenna()

void radar::Radar::setAntenna ( const antenna::Antenna ant)

Sets the antenna for the radar.

Parameters
antPointer to the antenna to set.

Definition at line 46 of file radar_obj.cpp.

47 {
48 if (!ant)
49 {
50 LOG(Level::FATAL, "Transmitter's antenna set to null");
51 throw std::logic_error("Transmitter's antenna set to null");
52 }
53 _antenna = ant;
54 }

References LOG.

◆ setAttached()

void radar::Radar::setAttached ( const Radar obj)

Attaches another radar object to this radar.

Parameters
objPointer to the radar object to attach.
Exceptions
std::runtime_errorIf another object is already attached.

Definition at line 56 of file radar_obj.cpp.

57 {
58 if (_attached)
59 {
60 LOG(Level::FATAL, "Attempted to attach second object to transmitter");
61 throw std::runtime_error("Attempted to attach second object to transmitter");
62 }
63 _attached = obj;
64 }

References LOG.

◆ setTiming()

void radar::Radar::setTiming ( const std::shared_ptr< timing::Timing > &  tim)

Sets the timing source for the radar.

Parameters
timShared pointer to the timing source to set.

Definition at line 36 of file radar_obj.cpp.

37 {
38 if (!tim)
39 {
40 LOG(Level::FATAL, "Radar timing source must not be null");
41 throw std::runtime_error("Radar timing source must not be null");
42 }
43 _timing = tim;
44 }

References _timing, and LOG.

Member Data Documentation

◆ _timing

std::shared_ptr<timing::Timing> radar::Radar::_timing
protected

Timing source for the radar.

Definition at line 129 of file radar_obj.h.

Referenced by getTiming(), radar::Receiver::getWindowStart(), and setTiming().


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