This version is being developed to update the previous one from 2021. The reason for the update is due to the fact that the latest versions of Julia (18 and 19) no longer use certain libraries, so when someone updates Julia, they find that the compilation no longer succeeds. That's why I modified some pieces of code, especially the code in the TilesDatabase.jl module, followed by the Route.jl and photoscenary.jl modules, in order to make the database management library (deprecated JuliaDB) compatible with DataFrames.jl, which is now the standard library for non-SQL databases in Julia. The downloadImage() module has also been modified, leveraging the powerful Images library with the download() method. This resolves potential download issues with errors in the length of files present using the old GET method.
Correction of Unicode characters (Aa for example Chinese characters) in file names as https://docs.julialang.org/en/v1/manual/strings/#Unicode-and-UTF-8 Commons.jl in the getFileName function The old code is: filename[1:fl-1] the new code is: filename[1:prevind(filename,fl)]
Modified the common.jl module, the module has been reorganized with the structure: module PhotoscenaryCommons and the file name is: PhotoscenaryCommons.jl
Various errors have been corrected in the management of the automatic variation of the file size according to the distance. Vertical distance has also been introduced in order to reduce the size of the tiles on the vertical. The calculation is inserted in the function: getSizePixelWidthByDistance and has this algorithm: sizePixelFound = Int64 (size - round ((size-sizeDwn) * sqrt (distance ^ 2 + altitudeNm ^ 3.0) * 1.5 / radius)) The cubic exponent is used to increase the size reduction factor also as a function of the height with respect to the ground.
The function has been changed connector.getFGFSPositionSetTask introducing the radiusStepFactor parameter with value 0.5 This allows a more frequent update when the program is connected with FGFS and dynamically downloads the tiles images.
These changes allow to have a dynamic management of the images of the tiles during the flight and works well up to mach 0.9 with a fast ADSL connection (20 Mbit / s)
The automatic path completion has been inserted if the program is connected to FGFS with the --connect parameter. The path will be the one described in the parameter: /sim/fg-scenery
The autosave mode is only active if the program is connected to FGFS or if it is following a route. This mode allows you to define a save path (if not explicitly defined with the --save parameter), with the path of the Orthophotos followed by the sub-name '-saved'. For example: Path to locate the DDS/PNG orthophotos files: '/media/abassign/test/fgfs-scenery/photoscenery/Orthophotos' Path to save the DDS/PNG orthophotos files: '/media/abassign/test/fgfs-scenery/photoscenery/Orthophotos-saved'
If you want to inhibit the autosave mode, just enter the --nosave parameter in the command line.
The automatic deletion of the files takes place during the scanning of the files in the preparatory phase for the execution.
The support for closing the program with CTRL-C has been improved, but it is still not perfect as a result of an error in the case that the --connect option is active and the FGFS program is not yet active.
the createFilesListTypeDDSandPNG (...) function has been modified by inserting a mutithread search. In this way instead of taking for example 40 seconds to analyze all the images (about 8000 in the test computer) it takes 10 seconds with 6 threads. This search function is essential for managing the automatic saving of images if their resolution is changed.
Since version 0.3.9 the automatic conversion of files produced with Skyvector has been defined. The file in .gpx format is automatically converted to produce the equivalent route to the file produced by the FGFS route manager.
More precise search of the route files inserted with the --route parameter. The files are searched first if they are inside the directory containing the program, if they are not inside the directory, the scan is done inside the user's home directory.
Continue to reorganize the code, now the module: Route.jl has been introduced which contains the functions used by the --route parameter and the airport database used with the --icao option.
Program exit was reactivated after all processes were terminated. This feature did not work with version 0.3.8.
Upon a user recommendation, I have inserted the automatic rebuild of the airports.jdb database file if found corrupt. The database file takes the data from the airports.csv file always present in the directory that contains the photoscenary.ij program.
The CodecZlib module is sometimes problematic in version management if highly complex packages are installed. The only practical solution is to require the module to be recompiled with the Pkg.build function. Not being able to know the actual installation status of the files, I found it much more convenient to run this command anyway even if the CodecZlib module was well installed.
A method has been added for automatic loading of the aircraft position (lat and lon parameters) when they are not defined and when FGFS has enabled the telnet connection via the FGFS launch parameter: --telnet = 5000 In this way it is possible to execute photoscenary.jl without parameters, loading the images of the airport in which the aircraft is located.
The bug was due to a different management of the paths by windows compared to the Linux environment.
Under certain conditions the program does not take the path defined as a parameter, the problem has been solved by modifying a path analysis function.