3dgeo-heidelberg / helios

http://uni-heidelberg.de/helios
Other
194 stars 44 forks source link

Adding new legs coordinate to a survey #473

Open thivageran97 opened 4 weeks ago

thivageran97 commented 4 weeks ago

Hi there, i believe it is possible to add a new leg coordinate/location based on the example you have provided on the pyhelios example 2. I tried running it with my scene and there seem to be an issue. I think in my case when i change the values manually on the xml file and run it works fine but when i try adding the legs there seem to be an issue. would be great if you could help me figure out how i can do if i just want to add legs without parsing any values for the scanner like in the example where some values are parsed for the scanner. Also would like to know what do you mean by altitude on the example is the height of the scanner that you're referring to?

han16nah commented 2 weeks ago

Dear @thivageran97

I assume you are referring to this notebook. With my tests using our pre-release (branch alpha-dev or better pytests_rev), this works. However, if I comment out the lines with the scanner settings, the simulation runs forever and does not produce an output. If you do not pass a pulseFreq, for example, then it will be set to 0 and hence there will be no simulation output. If you are starting with a base survey which already has a leg and you just want to add further legs, you can use the method newLegFromTemplate where you copy all platform and scanner settings from an existing leg to then, e.g., just modify one value.

Something like:

num_legs = 5
base_leg = simi.sim.getLeg(0)
for l in range(1, num_legs):  # Generate new legs based on template
    new_leg = simi.sim.newLegFromTemplate(l, base_leg)
    leg.getPlatformSettings().x += 2  # 2 m to the right

If you are still facing issues, please send me a code snippet which I can have a look at. And tell me which HELIOS++ version and operating system you are using. 🙂

Regarding the altitude: That is the the absolute height of the platform. If there is no scannerMount and beamOrigin offset defined in the platform and scanner definitions (see XMLs) that that is equal to the beam origin, other wise, these offsets will be added. Did this answer your question?

Cheers,

Hannah