ITS.ITU.PSeries.P2108 1.0
Part of the NTIA/ITS Propagation Library
Loading...
Searching...
No Matches
Driver.h File Reference

Interface header for this driver executable. More...

Go to the source code of this file.

Macros

#define PRINT   << std::endl << std::left << std::setw(25) <<
 Shortcut for concise print-to-file statements in driver.
 
#define SETW13   << std::setw(13) <<
 Shortcut for setting fixed whitespace padding in driver file output.
 

Functions

void Help (std::ostream &os=std::cout)
 Print help instructions to the terminal.
 
DrvrReturnCode ParseArguments (int argc, char **argv, DrvrParams &params)
 Parse the command line arguments.
 
DrvrReturnCode ValidateInputs (const DrvrParams &params)
 Validate that required inputs are present for the mode specified by the user.
 
ReturnCode CallAeronauticalStatisticalModel (ASMParams &asm_params, std::vector< double > &L_ces__db)
 Top-level control function for Aeronautical Statistical Model operation.
 
DrvrReturnCode ParseASMInputFile (const std::string &in_file, ASMParams &asm_params)
 Parse Aeronautical Statistical Model input parameter file.
 
DrvrReturnCode ParseASMInputStream (std::istream &stream, ASMParams &asm_params)
 Parse input stream (file or string stream) to ASM parameter struct.
 
void WriteASMInputs (std::ofstream &fp, const ASMParams &params)
 Write Aeronautical Statistical Model inputs to the report file.
 
ReturnCode CallHeightGainTerminalCorrectionModel (HGTCMParams &hgtcm_params, std::vector< double > &A_h__db)
 Top-level control function for Height Gain Terminal Correction Model.
 
DrvrReturnCode ParseHGTCMInputFile (const std::string &in_file, HGTCMParams &hgtcm_params)
 Parse Height Gain Terminal Correction Model input parameter file.
 
DrvrReturnCode ParseHGTCMInputStream (std::istream &stream, HGTCMParams &hgtcm_params)
 Parse input stream (file or string stream) to HGTCM parameter struct.
 
void WriteHGTCMInputs (std::ofstream &fp, const HGTCMParams &params)
 Write Height Gain Terminal Correction Model inputs to the report file.
 
ReturnCode CallTerrestrialStatisticalModel (TSMParams &tsm_params, std::vector< double > &L_ctt__db)
 Top-level control function for Terrestrial Statistical Model operation.
 
DrvrReturnCode ParseTSMInputFile (const std::string &in_file, TSMParams &tsm_params)
 Parse Terrestrial Statistical Model input parameter file.
 
DrvrReturnCode ParseTSMInputStream (std::istream &stream, TSMParams &tsm_params)
 Parse input stream (file or string stream) to TSM parameter struct.
 
void WriteTSMInputs (std::ofstream &fp, const TSMParams &params)
 Write Terrestrial Statistical Model inputs to the report file.
 
void PrintClutterTypeLabel (std::ofstream &fp, const ClutterType clutter_type)
 Print text message corresponding to clutter type enum value.
 
std::string GetDatetimeString ()
 Get a string containing the current date and time information.
 
DrvrReturnCode ParseBoolean (const std::string &str, bool &value)
 Parse a boolean value read from the input parameter file.
 
DrvrReturnCode ParseDouble (const std::string &str, double &value)
 Parse a double value read from the input parameter file.
 
DrvrReturnCode ParseInteger (const std::string &str, int &value)
 Parse an integer value read from the input parameter file.
 
void PrintLabel (std::ostream &os, const std::string &lbl)
 Helper function to standardize printing of text labels to file.
 
void StringToLower (std::string &str)
 Convert a string to lowercase.
 
void Version (std::ostream &os=std::cout)
 Print version information to the specified output stream.
 

Detailed Description

Interface header for this driver executable.

Function Documentation

◆ CallAeronauticalStatisticalModel()

ReturnCode CallAeronauticalStatisticalModel ( ASMParams & asm_params,
std::vector< double > & L_ces__db )

Top-level control function for Aeronautical Statistical Model operation.

Parameters
[in]asm_paramsAeronautical Statistical Model input parameter struct
[out]L_ces__dbBasic transmission loss, in dB
Returns
Return code

◆ CallHeightGainTerminalCorrectionModel()

ReturnCode CallHeightGainTerminalCorrectionModel ( HGTCMParams & hgtcm_params,
std::vector< double > & A_h__db )

Top-level control function for Height Gain Terminal Correction Model.

Parameters
[in]hgtcm_paramsHeight Gain Terminal Correction Model input struct
[out]A_h__dbAdditional loss (clutter loss), in dB
Returns
Return code

◆ CallTerrestrialStatisticalModel()

ReturnCode CallTerrestrialStatisticalModel ( TSMParams & tsm_params,
std::vector< double > & L_ctt__db )

Top-level control function for Terrestrial Statistical Model operation.

Parameters
[in]tsm_paramsTerrestrial Statistical Model input parameter struct
[out]L_ctt__dbAdditional loss (clutter loss), in dB
Returns
Return code

◆ GetDatetimeString()

std::string GetDatetimeString ( )

Get a string containing the current date and time information.

Returns
A localized standard date and time string (locale dependent)

◆ Help()

void Help ( std::ostream & os)

Print help instructions to the terminal.

Parameters
[in]osOutput stream for writing; defaults to std::cout

◆ ParseArguments()

DrvrReturnCode ParseArguments ( int argc,
char ** argv,
DrvrParams & params )

Parse the command line arguments.

Parameters
[in]argcNumber of arguments
[in]argvCommand line arguments
[out]paramsStructure with user input params
Returns
Return code

◆ ParseASMInputFile()

DrvrReturnCode ParseASMInputFile ( const std::string & in_file,
ASMParams & asm_params )

Parse Aeronautical Statistical Model input parameter file.

Parameters
[in]in_filePath to ASM input parameter file
[out]asm_paramsASM input parameter struct
Returns
Return code

◆ ParseASMInputStream()

DrvrReturnCode ParseASMInputStream ( std::istream & stream,
ASMParams & asm_params )

Parse input stream (file or string stream) to ASM parameter struct.

Parameters
[in]streamInput stream containing ASM parameters
[out]asm_paramsASM input parameter struct
Returns
Return code

◆ ParseBoolean()

DrvrReturnCode ParseBoolean ( const std::string & str,
bool & value )

Parse a boolean value read from the input parameter file.

Supports either "true" or "false" (case-insensitive) or "0" or "1"

Parameters
[in]strInput file value as string
[out]valueInput file value converted to bool
Returns
Return code

◆ ParseDouble()

DrvrReturnCode ParseDouble ( const std::string & str,
double & value )

Parse a double value read from the input parameter file.

Parameters
[in]strInput file value as string
[out]valueInput file value converted to double
Returns
Return code

◆ ParseHGTCMInputFile()

DrvrReturnCode ParseHGTCMInputFile ( const std::string & in_file,
HGTCMParams & hgtcm_params )

Parse Height Gain Terminal Correction Model input parameter file.

Parameters
[in]in_filePath to HGTCM input parameter file
[out]hgtcm_paramsHGTCM input parameter struct
Returns
Return code

◆ ParseHGTCMInputStream()

DrvrReturnCode ParseHGTCMInputStream ( std::istream & stream,
HGTCMParams & hgtcm_params )

Parse input stream (file or string stream) to HGTCM parameter struct.

Parameters
[in]streamInput stream containing HGTCM parameters
[out]hgtcm_paramsHGTCM input parameter struct
Returns
Return code

◆ ParseInteger()

DrvrReturnCode ParseInteger ( const std::string & str,
int & value )

Parse an integer value read from the input parameter file.

Parameters
[in]strInput file value as string
[out]valueInput file value converted to int
Returns
Return code

◆ ParseTSMInputFile()

DrvrReturnCode ParseTSMInputFile ( const std::string & in_file,
TSMParams & tsm_params )

Parse Terrestrial Statistical Model input parameter file.

Parameters
[in]in_filePath to TSM input parameter file
[out]tsm_paramsTSM input parameter struct
Returns
Return code

◆ ParseTSMInputStream()

DrvrReturnCode ParseTSMInputStream ( std::istream & stream,
TSMParams & tsm_params )

Parse input stream (file or string stream) to TSM parameter struct.

Parameters
[in]streamInput stream containing TSM parameters
[out]tsm_paramsTSM input parameter struct
Returns
Return code

◆ PrintClutterTypeLabel()

void PrintClutterTypeLabel ( std::ofstream & fp,
const ClutterType clutter_type )

Print text message corresponding to clutter type enum value.

Parameters
[in]fpOutput stream, a text file open for writing
[in]clutter_typeHeight Gain Terminal Correction Model clutter type

◆ PrintLabel()

void PrintLabel ( std::ostream & os,
const std::string & lbl )

Helper function to standardize printing of text labels to file.

Parameters
[in]osOutput stream for writing
[in]lblText message

◆ StringToLower()

void StringToLower ( std::string & str)

Convert a string to lowercase.

Parameters
[in,out]strThe string to convert

◆ ValidateInputs()

DrvrReturnCode ValidateInputs ( const DrvrParams & params)

Validate that required inputs are present for the mode specified by the user.

This function DOES NOT check the validity of the parameter values, only that required parameters have been specified by the user

Parameters
[in]paramsStructure with user input parameters
Returns
Return code

◆ Version()

void Version ( std::ostream & os)

Print version information to the specified output stream.

Parameters
[in]osOutput stream for writing; defaults to std::cout

◆ WriteASMInputs()

void WriteASMInputs ( std::ofstream & fp,
const ASMParams & params )

Write Aeronautical Statistical Model inputs to the report file.

Parameters
[in]fpOutput stream, a text file open for writing
[in]paramsASM input parameter struct

◆ WriteHGTCMInputs()

void WriteHGTCMInputs ( std::ofstream & fp,
const HGTCMParams & params )

Write Height Gain Terminal Correction Model inputs to the report file.

Parameters
[in]fpOutput stream, a text file open for writing
[in]paramsHGTCM input parameter struct

◆ WriteTSMInputs()

void WriteTSMInputs ( std::ofstream & fp,
const TSMParams & params )

Write Terrestrial Statistical Model inputs to the report file.

Parameters
[in]fpOutput stream, a text file open for writing
[in]paramsTSM input parameter struct
Privacy Policy FOIA Accessibility Information Quality