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

Make RaySolver work with Measurement data type #3

Open
mchitre opened this issue Nov 30, 2020 · 0 comments
Open

Make RaySolver work with Measurement data type #3

mchitre opened this issue Nov 30, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mchitre
Copy link
Member

mchitre commented Nov 30, 2020

Measurement from Measurements.jl fails with RaySolver.

Example:

julia> env = UnderwaterEnvironment();
julia> pm = RaySolver(env);
julia> f(d) = transmissionloss(pm, AcousticSource(0.0, -10.0, 1000.0), AcousticReceiver(d, -7.0))
f (generic function with 1 method)

julia> f(1000.0)
52.65450803568578

julia> f(1000.0 ± 1.0)
ERROR: TaskFailedException
    nested task error: MethodError: no method matching Float64(::Measurement{Float64})
      ...
    
    Stacktrace:
      [1] convert(#unused#::Type{Float64}, x::Measurement{Float64})
        @ Base ./number.jl:7
      ...
      [9] perform_step!(...)
      ...
     [11] solve!(...)
      ...
     [19] traceray(...)
        @ AcousticRayTracers ~/Projects/AcousticRayTracers.jl/src/RaySolver.jl:248
     [20] traceray (repeats 2 times)
        @ ~/Projects/AcousticRayTracers.jl/src/RaySolver.jl:231 [inlined]
     [21] macro expansion
        @ ~/Projects/AcousticRayTracers.jl/src/RaySolver.jl:71 [inlined]
      ...
@mchitre mchitre added the bug Something isn't working label Nov 30, 2020
@mchitre mchitre self-assigned this Nov 30, 2020
@mchitre mchitre added enhancement New feature or request and removed bug Something isn't working labels Nov 30, 2020
@mchitre mchitre changed the title RaySolver fails with Measurement data type Make RaySolver work with Measurement data type Nov 30, 2020
@mchitre mchitre transferred this issue from org-arl/UnderwaterAcoustics.jl Apr 10, 2023
@mchitre mchitre added this to the v0.2.0 milestone Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant