Wrapper class providing Helios-friendly interface to Prague Sky Model. More...
#include <PragueSkyModelInterface.h>
Public Member Functions | |
| PragueSkyModelInterface () | |
| Constructor - creates uninitialized interface. | |
| ~PragueSkyModelInterface () | |
| Destructor - cleans up Prague model instance. | |
| void | initialize (const std::string &dataset_path) |
| Initialize the Prague Sky Model with dataset file. | |
| bool | isInitialized () const |
| Check if model has been initialized. | |
| float | getSkyRadiance (const vec3 &view_direction, const vec3 &sun_direction, float wavelength_nm, float visibility_km, float albedo=-1.0f) const |
| Get sky radiance at a single wavelength and direction. | |
| float | computeIntegratedSkyRadiance (const vec3 &view_direction, const vec3 &sun_direction, float visibility_km, const std::vector< vec2 > &camera_response, float albedo=-1.0f) const |
| Compute sky radiance integrated over camera spectral response. | |
| void | getAvailableRanges (float &min_wavelength_nm, float &max_wavelength_nm, float &min_visibility_km, float &max_visibility_km, float &min_elevation_deg, float &max_elevation_deg) const |
| Get available data ranges from loaded dataset. | |
Static Public Member Functions | |
| static float | turbidityToVisibility (float turbidity) |
| Convert Helios turbidity (AOD) to Prague visibility (km) | |
Wrapper class providing Helios-friendly interface to Prague Sky Model.
This class:
Definition at line 46 of file PragueSkyModelInterface.h.
| PragueSkyModelInterface::PragueSkyModelInterface | ( | ) |
Constructor - creates uninitialized interface.
Definition at line 28 of file PragueSkyModelInterface.cpp.
| PragueSkyModelInterface::~PragueSkyModelInterface | ( | ) |
Destructor - cleans up Prague model instance.
Definition at line 32 of file PragueSkyModelInterface.cpp.
| float PragueSkyModelInterface::computeIntegratedSkyRadiance | ( | const vec3 & | view_direction, |
| const vec3 & | sun_direction, | ||
| float | visibility_km, | ||
| const std::vector< vec2 > & | camera_response, | ||
| float | albedo = -1.0f |
||
| ) | const |
Compute sky radiance integrated over camera spectral response.
Integrates: ∫ L(λ) × R(λ) dλ / ∫ R(λ) dλ where L(λ) is sky radiance and R(λ) is camera spectral response.
| [in] | view_direction | Viewing direction (normalized vector) |
| [in] | sun_direction | Sun direction (normalized vector) |
| [in] | visibility_km | Atmospheric visibility in kilometers |
| [in] | camera_response | Camera spectral response [(lambda_nm, response), ...] Must be sorted by wavelength. Response values are unitless (0-1). |
| [in] | albedo | Ground albedo [0-1] (optional, uses dataset default if <0) |
Definition at line 156 of file PragueSkyModelInterface.cpp.
| void PragueSkyModelInterface::getAvailableRanges | ( | float & | min_wavelength_nm, |
| float & | max_wavelength_nm, | ||
| float & | min_visibility_km, | ||
| float & | max_visibility_km, | ||
| float & | min_elevation_deg, | ||
| float & | max_elevation_deg | ||
| ) | const |
Get available data ranges from loaded dataset.
| [out] | min_wavelength_nm | Minimum wavelength (nm) |
| [out] | max_wavelength_nm | Maximum wavelength (nm) |
| [out] | min_visibility_km | Minimum visibility (km) |
| [out] | max_visibility_km | Maximum visibility (km) |
| [out] | min_elevation_deg | Minimum solar elevation (degrees) |
| [out] | max_elevation_deg | Maximum solar elevation (degrees) |
Definition at line 227 of file PragueSkyModelInterface.cpp.
| float PragueSkyModelInterface::getSkyRadiance | ( | const vec3 & | view_direction, |
| const vec3 & | sun_direction, | ||
| float | wavelength_nm, | ||
| float | visibility_km, | ||
| float | albedo = -1.0f |
||
| ) | const |
Get sky radiance at a single wavelength and direction.
| [in] | view_direction | Viewing direction (normalized vector) |
| [in] | sun_direction | Sun direction (normalized vector from origin to sun) |
| [in] | wavelength_nm | Wavelength in nanometers [360-1480 nm] |
| [in] | visibility_km | Atmospheric visibility in kilometers [20-131.8 km] |
| [in] | albedo | Ground albedo [0-1] (optional, uses dataset default if <0) |
Definition at line 105 of file PragueSkyModelInterface.cpp.
| void PragueSkyModelInterface::initialize | ( | const std::string & | dataset_path | ) |
Initialize the Prague Sky Model with dataset file.
| [in] | dataset_path | Absolute path to Prague dataset (.dat file) |
Definition at line 37 of file PragueSkyModelInterface.cpp.
| bool PragueSkyModelInterface::isInitialized | ( | ) | const |
Check if model has been initialized.
Definition at line 70 of file PragueSkyModelInterface.cpp.
|
static |
Convert Helios turbidity (AOD) to Prague visibility (km)
Uses Koschmieder formula: V ≈ 3.9 / turbidity Clamps result to Prague dataset range [20, 131.8 km]
| [in] | turbidity | Ångström aerosol optical depth at 500 nm |
Definition at line 208 of file PragueSkyModelInterface.cpp.