Board index FlightGear Development Scenery

Photoscenery generator for Julia compiler

Questions and discussion about enhancing and populating the FlightGear world.

Re: Photoscenery generator for Julia compiler

Postby abassign » Tue Jun 08, 2021 8:11 am

Gijs wrote in Mon Jun 07, 2021 1:37 pm:Nice work on documenting it all on the wiki! However, there are some issues with your uploads. I've tried to reach you in all possible ways, could you please read your talk page?


Hello sorry if I answer you only now, I think this is a useful context to discuss also the drafting of the application's user manual.

As you will notice, I insert images with names that are completely out of context, which certainly make it difficult to attribute an attribution to the image. But at the same time, from the wiki, you can see where the image is used and this fact gives back its context. Certainly a manual is full of images, otherwise it is difficult to communicate information to those who read it, but what does the name of the file mean if it is still linked to the manual?

Let's see some possible alternatives:

Give a name that shows the first page with which the file is linked?

For example the image:
"Screenshot 20210606 212142.png"
I could rename it:
"Julia_photoscenery_generator Screenshot 20210606 212142.png"
can it be better this way?
What do you think about it ?

Greetings
Adriano
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 949
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Photoscenery generator for Julia compiler

Postby Hooray » Tue Jun 08, 2021 2:41 pm

Speaking in general, the more information the better:

type/category of image: Screenshot
Related software: Julia Photoscenery
Topic: Setup Screen
date: 06/2021

=> "Screenshot showing Julia Photoscenery version 1.0 Setup Screen taken in 06/2021 by abassign.png"

Note that you can simply reuse the same fields for the meta information that you should enter when uploading images

This may seem excessive, but will make it much easier for you and others to easily help maintain/update related wiki articles, categories and uploads.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Photoscenery generator for Julia compiler

Postby abassign » Tue Jun 08, 2021 10:10 pm

I just updated the GIT with version 0.2.11 of the photoscenary.jl program which fixes some bugs found by users with Windows OS.

https://github.com/abassign/Photoscenary
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 949
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Photoscenery generator for Julia compiler

Postby benih » Thu Jun 24, 2021 8:05 pm

Just gave it a shot.
System: debian testing linux
julia version 1.5.3

The first run did download and compile alot of different stuff, but succeeded.

Then:
Code: Select all
beni@segin:/usr/share/games/flightgear-build/Julia_Photoscenary_generator$ julia photoscenary.jl --help
The actiual Julia is 1.5.3 The current version is correct,
In order to obtain the best performancesy install the 1.6.x or later version

Photoscenary.jl ver: 0.3.0 date: Testing 20210618 System prerequisite test

Here it hangs. CTRL-C then gives:
Code: Select all
^C
signal (2): Unterbrechung
in expression starting at /usr/share/games/flightgear-build/Julia_Photoscenary_generator/photoscenary.jl:75
epoll_pwait at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
uv__io_poll at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
uv_run at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
jl_task_get_next at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
poptask at ./task.jl:704
wait at ./task.jl:712 [inlined]
wait at ./condition.jl:106
wait at ./process.jl:621
success at ./process.jl:483 [inlined]
compilecache at ./loading.jl:1287
_require at ./loading.jl:1030
require at ./loading.jl:928
require at ./loading.jl:923
unknown function (ip: 0x7f121ff627b2)
unknown function (ip: 0x7f121ff639d2)
top-level scope at /usr/share/games/flightgear-build/Julia_Photoscenary_generator/photoscenary.jl:80
unknown function (ip: 0x7f121ff63798)
unknown function (ip: 0x7f121ff3df11)
jl_load_rewrite at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
include at ./Base.jl:380
include at ./Base.jl:368
exec_options at ./client.jl:296
_start at ./client.jl:506
jfptr__start_36893.clone_1 at /usr/lib/x86_64-linux-gnu/julia/sys.so (unknown line)
unknown function (ip: 0x55c2b6a80755)
unknown function (ip: 0x55c2b6a80332)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x55c2b6a803d9)
unknown function (ip: (nil))
Allocations: 2545 (Pool: 2536; Big: 9); GC: 0
beni@segin:/usr/share/games/flightgear-build/Julia_Photoscenary_generator$ ERROR: LoadError: InterruptException:
Stacktrace:
 [1] compilecache(::Base.PkgId, ::String) at ./loading.jl:1286
 [2] _require(::Base.PkgId) at ./loading.jl:1030
 [3] require(::Base.PkgId) at ./loading.jl:928
 [4] require(::Module, ::Symbol) at ./loading.jl:923
 [5] include(::Function, ::Module, ::String) at ./Base.jl:380
 [6] include(::Module, ::String) at ./Base.jl:368
 [7] top-level scope at none:2
 [8] eval at ./boot.jl:331 [inlined]
 [9] eval(::Expr) at ./client.jl:467
 [10] top-level scope at ./none:3
in expression starting at /home/beni/.julia/packages/ImageView/sCn9Q/src/ImageView.jl:6
^C


I assume my julia is too old?
User avatar
benih
 
Posts: 1711
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Photoscenery generator for Julia compiler

Postby MariuszXC » Fri Jun 25, 2021 11:02 pm

benih wrote in Thu Jun 24, 2021 8:05 pm:Just gave it a shot.
System: debian testing linux
julia version 1.5.3
[...]

I assume my julia is too old?


Probably. I tried with julia 1.6.1 and, after initially pulling a lot of stuff, it seems to download images, i.e. this works:
Code: Select all
$ ~/julia-1.6.1/bin/julia -t 4 photoscenary.jl -p $HOME/fgscenery/ortophoto -i EPGD --map 1 -r 15 -s 0


however, the amount of stuff pulled on initial run is huge:
Code: Select all
$ du -sm .julia/
741   .julia/
INOP
MariuszXC
 
Posts: 1062
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

Re: Photoscenery generator for Julia compiler

Postby abassign » Thu Jul 01, 2021 10:21 am

benih wrote in Thu Jun 24, 2021 8:05 pm:Just gave it a shot.
System: debian testing linux
julia version 1.5.3
...
I assume my julia is too old?


Hi, sorry if I answer your question only now, I had verified that version 1.5.3 does not work correctly with the photoscenary.jl program, you have to switch to version 1.6.1 which, moreover, is really much more efficient. As I have already written Julia is a compiler that is going through a moment of great development as it is increasingly required in the scientific and engineering fields. This fact has as a consequence an increase in requests from many users (including those who do bitcoin mining) as the performances are truly exceptional and the way to use the program in the interactive environment is very similar to that in Python.
I am currently using version 1.7 Beta which is even more interesting, but obviously the program is tested on 1.6.1 which is the latest official release.
To download version 1.6.1 on Linux (Ubuntu and Debian) it is advisable to follow this guide:
https://ferrolho.github.io/blog/2019-01-26/how-to-install-julia-on-ubuntu
You actually take a generic binary from the https://julialang.org/downloads/ URL and place it in \opt and then link with the commands:
Code: Select all
cd ~/Downloads
wget https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.1-linux-x86_64.tar.gz
tar -xvzf julia-1.6.1-linux-x86_64.tar.gz
sudo cp -r julia-1.6.1 /opt/
sudo ln -s /opt/julia-1.6.1/bin/julia /usr/local/bin/julia

Of course it works for other Linux distributions too.
Try if you have problems write on this forum or in the GIT
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 949
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Photoscenery generator for Julia compiler

Postby abassign » Thu Jul 01, 2021 10:28 am

MariuszXC wrote in Fri Jun 25, 2021 11:02 pm:...
Probably. I tried with julia 1.6.1 and, after initially pulling a lot of stuff, it seems to download images, i.e. this works:
....


In fact, the first phase of the program is to search for all the DDS files present in the home, this phase is quite fast and now in version 0.3.1 it is clearly shown with the count and size of the scenario .DDS files. Note that any other DDS files that may be present are not counted as they are not placed inside the Orthophotos folders.
This search, of course, takes a few seconds which can increase if you have thousands of images. Note that this check also verifies if the files are well formatted.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 949
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Photoscenery generator for Julia compiler

Postby merspieler » Thu Jul 01, 2021 11:20 am

abassign wrote in Thu Jul 01, 2021 10:21 am:, I had verified that version 1.5.3 does not work correctly with the photoscenary.jl program,



wait... I'm on 1.5.3 too and I had it working...
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2296
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Photoscenery generator for Julia compiler

Postby MariuszXC » Thu Jul 01, 2021 11:23 am

abassign wrote in Thu Jul 01, 2021 10:28 am:
MariuszXC wrote in Fri Jun 25, 2021 11:02 pm:...tried with julia 1.6.1 and, after initially pulling a lot of stuff...

In fact, the first phase of the program is to search for all the DDS files...


I did not refer to the photoscenary.jl program, but to the julia compiler/environment itself. It pulled a ton of stuff on initial run (sizes in megabytes) :
Code: Select all
$ du -sm .julia/*
478  .julia/artifacts
64    .julia/compiled
1    .julia/environments
1    .julia/logs
85    .julia/packages
115    .julia/registries
1    .julia/scratchspaces

But that is fine, as long as it is contained in one place, there is nothing a rm -rf wouldn't cure ;)
INOP
MariuszXC
 
Posts: 1062
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

Re: Photoscenery generator for Julia compiler

Postby abassign » Thu Jul 01, 2021 12:57 pm

merspieler wrote in Thu Jul 01, 2021 11:20 am:
abassign wrote in Thu Jul 01, 2021 10:21 am:, I had verified that version 1.5.3 does not work correctly with the photoscenary.jl program,

wait... I'm on 1.5.3 too and I had it working...


:D

This is good news, as for now I have not included any particular 1.6.x typical instructions. So if it works it is obvious that you can use it as is (I put a note in the wiki manual), however if there are any problems it may be advisable to upgrade to 1.6.x which is the testing version.
However, the 1.6.x (and even more the 1.7.x currently in beta 2) has an incredible advantage in the start of the program which is 5-10 times faster. In 1.6.x they have inserted the compilation in parallel that uses all the cores.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 949
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Photoscenery generator for Julia compiler

Postby abassign » Thu Jul 01, 2021 1:39 pm

Today or released version 0.3.1 of the photoscenary.jl program
Hope you enjoy it and it makes life even easier.

It is very convenient to download the orthographic images of the territory actually flown over by the plane. In this case, the system will use the aircraft's course as reference, interspersed with points of radius -r. The program will then download only the images actually needed, thus minimizing the amount of data to download.

The parameter to activate this function is this:
Code: Select all
--connect "<IP address>:<port>"

When the program finds this parameter, checks if the syntax of the address is correct and listens showing a line that has as, first character and an arrow that rotates 45 degrees every second, followed by the sentence that begins with the text:

Try the frist connection to Flightgear with address: ...

This delay can last for an indefinite time, until Flightgear is activated with, obviously, the Telnet connection port activated, as explained in the wiki manual:
https://wiki.flightgear.org/Julia_photoscenery_generator#Preparation_of_Flightgear_to_allow_you_to_communicate_with_the_photoscenary.jl_program

When Flightgear is activated, the program realizes it and starts evaluating the geographic position of the aircraft and then, if necessary, downloading and positioning the DDS images in the photorealistic scenario.
If you close Flightgear again, the program will be put on hold again, a situation indicated by the message:

Try connect to Flightgear with address: ...

To exit the program it is necessary to type the key sequence: [CTRL] + [C]
Exiting the program will have no effect on the downloaded DDS files as the program operates through transactional methods.

I think this function can make it ever so easy to generate scenarios, just fly where we want to see the scenario and if you want to see it immediately just click on the Debug menu and request the reload of the scenario.
All the other functions are still active, so you can preset the resolution you want, the type of coverage, the coverage range.
The nice thing about this feature is that you will greatly reduce the graphic material to be downloaded. In fact, normally you load images for rather large areas, but normally you fly in certain areas, for example an IFR route or a combat area. So with this option you will only load what you can see! If the resolution is low (the standard is 2048) the files are relatively small and for a subsonic plane it means that the download will proceed quite in sync with the flight.

This is a minimal command to achieve coverage within 10 nm of radius and 2048 resolution (-s 2)

Code: Select all
julia -t 4 photoscenary.jl --connect "127.0.0.1:5000"


Obviously, always remember to have activated FGFS with the the option:

Code: Select all
--telnet=5000


At this point I don't know what else I can add to the program, if you have something to ask ask and I'll check if I can add it.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 949
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Photoscenery generator for Julia compiler

Postby Volador » Fri Jul 02, 2021 10:55 pm

@abassign, I've just installed and I must complement all the work you've done on this and the detailed documentation. As for ideas for other features I could only think of a map overlay (perhaps intgrated into the osm or terramaster for the model/ scenery locations) that showed the areas/tiles that had been downloaded on the local drive perhaps with a colour code or numeral that indicated the resolution - but given the fact downloads can happen automatically maybe this is just superfluous - not really needed but would be a nice thing to look at?
User avatar
Volador
 
Posts: 1142
Joined: Tue Sep 01, 2020 4:58 pm
Callsign: Volador, G-VLDR
Version: 2020.4
OS: Windows 10, 64 bit

Re: Photoscenery generator for Julia compiler

Postby abassign » Mon Jul 05, 2021 9:39 pm

Volador wrote in Fri Jul 02, 2021 10:55 pm:I could only think of a map overlay (perhaps intgrated into the osm or terramaster for the model/ scenery locations) that showed the areas/tiles that had been downloaded on the local drive perhaps with a colour code or numeral that indicated the resolution


Also in my opinion it would be nice to see the evolution of the map and the actual coverage of the tiles with the relative resolution. The problem is to build a series of functions that display the map with active tiles. Currently, every time I load the program, all the tiles in .DDS format and their resolution are read. Therefore producing a map would not be difficult, the difficult thing is to couple the data with a credible representation of the planet.
This work takes some time, but currently I don't have any as the time I can devote to the project I am using to build a more direct integration with Flightgear. The reason is that I want to test the possibility of using Julia applications in place of NASAL and C ++ applications so that I can do things that are currently difficult for kernel developers to achieve. When I get a good coupling method with FGFS I could introduce more advanced graphics functions and then insert the nice function you proposed.
And if anyone would like to learn Julia and make the graphical interface himself ... I remember that Julia is easy to learn for those who know how to use Python, but in exchange for this little effort, truly exceptional performance and the availability of a incredible amount of libraries.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 949
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: Photoscenery generator for Julia compiler

Postby Manus » Fri Jul 09, 2021 10:18 am

I have problems to run this tool.
After installation is ran into a error on the first run with the "Hello World" Script. The Installation seems to be ok, no errors where reported during the setup.

Here is a screenshot of the error message:

Image

If someone has an idea how to fix it please let me know ^^
Manus
 
Posts: 9
Joined: Thu Jun 07, 2018 10:20 am

Re: Photoscenery generator for Julia compiler

Postby MariuszXC » Fri Jul 09, 2021 10:23 am

Try to run it a few times. I think I had similar issues on a first run or two, Julia seemed to pull additional dependencies and was failinig initially. After a couple of attempts things stabilised and photoscenary.jl began to run as expected.
INOP
MariuszXC
 
Posts: 1062
Joined: Tue May 18, 2021 5:38 pm
Location: Europe
Callsign: SP-MRM
Version: 2020.4
OS: Ubuntu 16.04

PreviousNext

Return to Scenery

Who is online

Users browsing this forum: No registered users and 6 guests