Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new legs coordinate to a survey #473

Open
thivageran97 opened this issue Oct 15, 2024 · 1 comment
Open

Adding new legs coordinate to a survey #473

thivageran97 opened this issue Oct 15, 2024 · 1 comment

Comments

@thivageran97
Copy link

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants