Agrarsense
Public Member Functions | Public Attributes | List of all members
FWeatherParameters Struct Reference

#include <WeatherParameters.h>

Public Member Functions

bool IsWinterSnowCondition ()
 
bool IsWinterSeason ()
 
bool IsLidarNoiseModelCondition ()
 
FString ToString () const
 
FString ToStringHumanReadable () const
 

Public Attributes

float Temperature = 10.0f
 
float Precipitation = 0.0f
 
float PrecipitationParticleSize = 1.0f
 
float Cloudiness = 0.05f
 
float Fog = 0.0f
 
float FogFalloff = 0.2f
 
float WindIntensity = 0.0f
 
float WindDirection = 15.0f
 
float SnowAmount = 0.0f
 
float TreeSnowiness = 0.0f
 
int Month = 7
 
int Time = 12
 

Detailed Description

Definition at line 11 of file WeatherParameters.h.

Member Function Documentation

◆ IsLidarNoiseModelCondition()

bool FWeatherParameters::IsLidarNoiseModelCondition ( )
inline

Checks if the current weather conditions allow for a Lidar noise model to be used.

Returns
true if the Lidar noise model can be applied in the current weather.

Definition at line 65 of file WeatherParameters.h.

66 {
67 return Temperature <= 0.0f && Precipitation != 0.0f;
68 }

Referenced by ALidar::SimulateRaycastLidar().

◆ IsWinterSeason()

bool FWeatherParameters::IsWinterSeason ( )
inline

Definition at line 56 of file WeatherParameters.h.

57 {
58 return (Month == 12 || Month <= 3);
59 }

Referenced by AInstancedRenderer::OnWeatherParametersChanged().

◆ IsWinterSnowCondition()

bool FWeatherParameters::IsWinterSnowCondition ( )
inline

Definition at line 51 of file WeatherParameters.h.

52 {
53 return SnowAmount != 0.0f;
54 }

Referenced by ALidar::SimulateRaycastLidar().

◆ ToString()

FString FWeatherParameters::ToString ( ) const
inline

Definition at line 70 of file WeatherParameters.h.

71 {
72 return FString::Printf(
73 TEXT("%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %d, %d"),
78 Fog,
84 Month,
85 Time
86 );
87 }

◆ ToStringHumanReadable()

FString FWeatherParameters::ToStringHumanReadable ( ) const
inline

Definition at line 89 of file WeatherParameters.h.

90 {
91 return FString::Printf(
92 TEXT("Temperature: %.2f, Precipitation: %.2f, Precipitation Particle Size: %.2f, Cloudiness: %.2f, Fog: %.2f, Fog Falloff: %.2f, Wind Intensity: %.2f, Wind Direction: %.2f, Snow Amount: %.2f, Tree Snowiness: %.2f, Month: %d, Time: %d"),
97 Fog,
103 Month,
104 Time
105 );
106 }

Referenced by AWeather::SendWeatherData().

Member Data Documentation

◆ Cloudiness

float FWeatherParameters::Cloudiness = 0.05f

Definition at line 25 of file WeatherParameters.h.

◆ Fog

float FWeatherParameters::Fog = 0.0f

Definition at line 28 of file WeatherParameters.h.

◆ FogFalloff

float FWeatherParameters::FogFalloff = 0.2f

Definition at line 31 of file WeatherParameters.h.

◆ Month

int FWeatherParameters::Month = 7

Definition at line 46 of file WeatherParameters.h.

Referenced by AWeather::GetCurrentSeason().

◆ Precipitation

float FWeatherParameters::Precipitation = 0.0f

Definition at line 19 of file WeatherParameters.h.

Referenced by LidarNoiseModel::CheckSnowflakeHit().

◆ PrecipitationParticleSize

float FWeatherParameters::PrecipitationParticleSize = 1.0f

Definition at line 22 of file WeatherParameters.h.

Referenced by LidarNoiseModel::CheckSnowflakeHit().

◆ SnowAmount

float FWeatherParameters::SnowAmount = 0.0f

Definition at line 40 of file WeatherParameters.h.

Referenced by ALidar::OnWeatherChanged().

◆ Temperature

float FWeatherParameters::Temperature = 10.0f

Definition at line 16 of file WeatherParameters.h.

◆ Time

int FWeatherParameters::Time = 12

Definition at line 49 of file WeatherParameters.h.

◆ TreeSnowiness

float FWeatherParameters::TreeSnowiness = 0.0f

Definition at line 43 of file WeatherParameters.h.

◆ WindDirection

float FWeatherParameters::WindDirection = 15.0f

Definition at line 37 of file WeatherParameters.h.

◆ WindIntensity

float FWeatherParameters::WindIntensity = 0.0f

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