User:Legoboyvdlp/genapts850 documentation: Difference between revisions
Jump to navigation
Jump to search
Legoboyvdlp (talk | contribs) (begin rough documentation of genapt) |
Legoboyvdlp (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
= Program Arguments = | = Program Arguments = | ||
--log-level set SG_LOG priority by calling setLoggingPriority() | ; --log-level : set SG_LOG priority by calling setLoggingPriority() | ||
--work set work_dir | ; --work : set work_dir | ||
--input set input_file | ; --input : set input_file | ||
--start-id set start_id | ; --start-id : set start_id | ||
--nudge set nudge | ; --nudge : set nudge | ||
--snap set gSnap | ; --snap : set gSnap | ||
--min-lon set SGGeod min longitude | ; --min-lon : set SGGeod min longitude | ||
--max-lon set SGGeod max longitude | ; --max-lon : set SGGeod max longitude | ||
--min-lat set SGGeod min latitude | ; --min-lat : set SGGeod min latitude | ||
--max-lat set SGGeod max latitude | ; --max-lat : set SGGeod max latitude | ||
--airport set airport_id | ; --airport : set airport_id | ||
--clear-dem-path empty elev_src vector | ; --clear-dem-path : empty elev_src vector | ||
--dem-path append to elev_src | ; --dem-path : append to elev_src | ||
--verbose set log level to BULK | ; --verbose : set log level to BULK | ||
--max-slope set slope_max | ; --max-slope : set slope_max | ||
--threads=arg set num_threads | ; --threads=arg : set num_threads | ||
--threads automatically set num_threads | ; --threads automatically : set num_threads | ||
--debug-dir | ; --debug-dir : | ||
--debug-runways | ; --debug-runways : | ||
--debug-pavements | ; --debug-pavements : | ||
--debug-taxiways | ; --debug-taxiways : | ||
--debug-features | ; --debug-features : | ||
--help output help text and exit | ; --help : output help text and exit | ||
= main.cxx = | = main.cxx = | ||
main.cxx is the main file, where execution of the program starts. | main.cxx is the main file, where execution of the program starts. | ||
== main() == | == main() == | ||
return type: void | ; return type : void | ||
=== Arguments === | |||
int argc: default commandline argument handling | ; int argc : default commandline argument handling | ||
char **argv: default commandline argument handling | ; char **argv : default commandline argument handling | ||
=== Code Path === | |||
# Store current time from std::chrono::high_resolution_clock::now() | |||
# Declare, clear, and fill the elev_src vector by calling setup_default_elevation_sources() | |||
# Iterate through and parse commandline arguments | |||
# Create a tgRectangle instance using the specified min / max; sanify input such that inverting it is detected and corrected automatically. | |||
# Attempt to open the apt.dat or apt.dat.gz using sg_gzifstream in order to check apt.dat version | |||
# Construct a Scheduler class instance wrapped in unique_ptr | |||
# Add any debug items to the Scheduler | |||
# If airport_id is set, add a single airport to the Scheduler with AddAirport() and invoke Schedule() | |||
# Else, if start_id is set skip to start_id and add remaining airports with AddAirports() within the boundary and then invoke Schedule() | |||
# Else add all airports with AddAirports() within boundary and then invoke Schedule() | |||
# Call now() again and output elapsed time | |||
# Exit program | |||
= Scheduler.cxx = | |||
Scheduler.cxx adds items to the queue and invokes threaded instances of class Parser to work through the queue. | |||
== Scheduler == | |||
Class Scheduler | |||
=== Public Methods === | |||
; FindAirport : search an input file to attempt to find a specified icao code | |||
; AddAirport : iterate through an input file to attempt to find a specific airport and add it to the queue | |||
; AddAirports : iterate through an input file, with a possible starting offset and return all airports which are wholly within the bounding box and add them to the queue | |||
; RetryAirport : current unused | |||
; Schedule : create threaded instances of Parser class and work through the airports | |||
; set_debug : | |||
=== Private Methods === | |||
; IsAirportDefinition : search a specific line for an ICAO code; if a match is found return true, else return false | |||
=== Private Attributes === | |||
; filename : the input apt.dat file | |||
; elevation : the elevation source list | |||
; work_dir : the working directory | |||
Revision as of 19:35, 19 January 2020
Program Arguments
- --log-level
- set SG_LOG priority by calling setLoggingPriority()
- --work
- set work_dir
- --input
- set input_file
- --start-id
- set start_id
- --nudge
- set nudge
- --snap
- set gSnap
- --min-lon
- set SGGeod min longitude
- --max-lon
- set SGGeod max longitude
- --min-lat
- set SGGeod min latitude
- --max-lat
- set SGGeod max latitude
- --airport
- set airport_id
- --clear-dem-path
- empty elev_src vector
- --dem-path
- append to elev_src
- --verbose
- set log level to BULK
- --max-slope
- set slope_max
- --threads=arg
- set num_threads
- --threads automatically
- set num_threads
- --debug-dir
- --debug-runways
- --debug-pavements
- --debug-taxiways
- --debug-features
- --help
- output help text and exit
main.cxx
main.cxx is the main file, where execution of the program starts.
main()
- return type
- void
Arguments
- int argc
- default commandline argument handling
- char **argv
- default commandline argument handling
Code Path
- Store current time from std::chrono::high_resolution_clock::now()
- Declare, clear, and fill the elev_src vector by calling setup_default_elevation_sources()
- Iterate through and parse commandline arguments
- Create a tgRectangle instance using the specified min / max; sanify input such that inverting it is detected and corrected automatically.
- Attempt to open the apt.dat or apt.dat.gz using sg_gzifstream in order to check apt.dat version
- Construct a Scheduler class instance wrapped in unique_ptr
- Add any debug items to the Scheduler
- If airport_id is set, add a single airport to the Scheduler with AddAirport() and invoke Schedule()
- Else, if start_id is set skip to start_id and add remaining airports with AddAirports() within the boundary and then invoke Schedule()
- Else add all airports with AddAirports() within boundary and then invoke Schedule()
- Call now() again and output elapsed time
- Exit program
Scheduler.cxx
Scheduler.cxx adds items to the queue and invokes threaded instances of class Parser to work through the queue.
Scheduler
Class Scheduler
Public Methods
- FindAirport
- search an input file to attempt to find a specified icao code
- AddAirport
- iterate through an input file to attempt to find a specific airport and add it to the queue
- AddAirports
- iterate through an input file, with a possible starting offset and return all airports which are wholly within the bounding box and add them to the queue
- RetryAirport
- current unused
- Schedule
- create threaded instances of Parser class and work through the airports
- set_debug
Private Methods
- IsAirportDefinition
- search a specific line for an ICAO code; if a match is found return true, else return false
Private Attributes
- filename
- the input apt.dat file
- elevation
- the elevation source list
- work_dir
- the working directory