User:Legoboyvdlp/genapts850 documentation

From FlightGear wiki
< User:Legoboyvdlp
Revision as of 22:42, 18 January 2020 by Legoboyvdlp (talk | contribs) (begin rough documentation of genapt)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

1. A timer is marked 2. A vector with strings of elevation sources is filled to match against by calling setup_default_elevation_sources() 3. arguments are iterated through and parsed 4. create a tgRectangle instance using min / max; sanify input such that inverting it is detected and corrected automatically 5. Attempt to open apt.dat or apt.dat.gz using sg_gzifstream in. 6. check apt.dat version 7. Construct scheduler instance wrapped in unique_ptr 8. add debug pavements, etc 9. if airport_id set add single airport with AddAirport() and invoke Schedule() 10. elsif start_id set skip to start_id and add remaining airports with AddAirports() within boundary then invoke Schedule() 11. else add all airports with AddAirports() within boundary then invoke Schedule() 12. mark clock finished and output elapsed time