User:Legoboyvdlp/genapts850 documentation: Difference between revisions
Jump to navigation
Jump to search
Legoboyvdlp (talk | contribs) |
Legoboyvdlp (talk | contribs) |
(No difference)
|
Latest revision as of 19:36, 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
- long; search an input file to attempt to find a specified icao code and return its position in the file
- AddAirport
- void; iterate through an input file to attempt to find a specific airport and add it to the queue
- AddAirports
- bool; 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
- void; 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