GithubHelp home page GithubHelp logo

Comments (7)

ronisbr avatar ronisbr commented on June 11, 2024 1

Yes! You found the problem :) I will close the bug, feel free to open if anything changes.

from satellitetoolbox.jl.

ThatcherC avatar ThatcherC commented on June 11, 2024 1

Resolved by JuliaNLSolvers/OptimBase.jl#15! Good to go

from satellitetoolbox.jl.

ronisbr avatar ronisbr commented on June 11, 2024

Hi @addifi

I think you are using an old version of SatelliteToolbox.jl, can you please check if you are with the latest one? This code works perfectly here:

Captura de Tela 2021-02-21 às 19 09 24

from satellitetoolbox.jl.

ThatcherC avatar ThatcherC commented on June 11, 2024

I actually get the same error with the latest SatelliteToolbox:

julia> using SatelliteToolbox

julia> tle = tle"""ZHUHAI-1 03A            
       1 44534U 19060A   21133.54533740  .00001252  00000-0  63266-4 0  9994
       2 44534  97.4348 243.6245 0015236  15.0533  80.6320 15.18815987 91379"""
1-element Vector{TLE}:
 TLE: ZHUHAI-1 03A (Epoch = 2021-05-13T13:05:17)

julia> tleprop = init_orbit_propagator(Val(:sgp4), tle[1]);
ERROR: MethodError: no method matching init_orbit_propagator(::Val{:sgp4}, ::TLE)
Closest candidates are:
  init_orbit_propagator(::Type{Val{:twobody}}, ::TLE) at /home/thatch/.julia/packages/SatelliteToolbox/0jge1/src/orbit/propagators/api/init_orbit_propagator.jl:300
  init_orbit_propagator(::Type{Val{:twobody}}, ::TLE, ::Number) at /home/thatch/.julia/packages/SatelliteToolbox/0jge1/src/orbit/propagators/api/init_orbit_propagator.jl:300
  init_orbit_propagator(::Type{Val{:sgp4}}, ::TLE) at /home/thatch/.julia/packages/SatelliteToolbox/0jge1/src/orbit/propagators/api/init_orbit_propagator.jl:333
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[4]:1

julia> 

However, if I replace the parentheses around around :sgp4 with curly braces, everything works fine (this could be a workaround for the issue @addifi saw):

julia> tleprop = init_orbit_propagator(Val{:sgp4}, tle[1]);

julia> 

I remember a long time ago (a year and a half or so?) I had to use the Val{:sgp4} syntax, but at some point it switched to Val(:sgp4) which I think makes a bit more sense. Odd that it's switched back.

Is there any way the function could be rewritten so that you could pass the :sgp4 or :J2 etc. symbols to the function without wrapping it in a Val() or Val{}?

from satellitetoolbox.jl.

ronisbr avatar ronisbr commented on June 11, 2024

Hi @ThatcherC ,

I think you are using an old version of SatelliteToolbox. Can you please check which version is installed?

from satellitetoolbox.jl.

ronisbr avatar ronisbr commented on June 11, 2024

Probably your version of SatelliteToolbox.jl was downgraded due to some compatibility issue. Can you please run Pkg.update() and paste the result?

from satellitetoolbox.jl.

ThatcherC avatar ThatcherC commented on June 11, 2024

Hi @ronisbr - I think you're right!

The output of my update commands didn't show me anything too helpful:

collapsed update output

``` (@v1.6) pkg> update Updating registry at `~/.julia/registries/General` Updating git-repo `https://github.com/JuliaRegistries/General.git` Updating git-repo `https://github.com/fonsp/Pluto.jl.git` Installed XML2_jll ────────── v2.9.12+0 Installed Libmount_jll ────── v2.35.0+0 Installed Libiconv_jll ────── v1.16.1+0 Installed PCRE_jll ────────── v8.44.0+0 Installed Libffi_jll ──────── v3.2.2+0 Installed ArrayInterface ──── v3.1.13 Installed Plots ───────────── v1.15.0 Installed FastBroadcast ───── v0.1.7 Installed LoopVectorization ─ v0.12.20 Downloaded artifact: XML2 Downloaded artifact: XML2 Downloaded artifact: PCRE Downloaded artifact: PCRE Downloaded artifact: Libffi Downloaded artifact: Libffi Downloaded artifact: Libmount Downloaded artifact: Libmount Downloaded artifact: Libiconv Downloaded artifact: Libiconv Updating `~/.julia/environments/v1.6/Project.toml` [91a5bcdd] ↑ Plots v1.14.0 ⇒ v1.15.0 [c3e4b0f8] ~ Pluto v0.14.5 `https://github.com/fonsp/Pluto.jl.git#main` ⇒ v0.14.5 `https://github.com/fonsp/Pluto.jl.git#main` Updating `~/.julia/environments/v1.6/Manifest.toml` [4fba245c] ↑ ArrayInterface v3.1.12 ⇒ v3.1.13 [7034ab61] ↑ FastBroadcast v0.1.6 ⇒ v0.1.7 [bdcacae8] ↑ LoopVectorization v0.12.19 ⇒ v0.12.20 [91a5bcdd] ↑ Plots v1.14.0 ⇒ v1.15.0 [c3e4b0f8] ~ Pluto v0.14.5 `https://github.com/fonsp/Pluto.jl.git#main` ⇒ v0.14.5 `https://github.com/fonsp/Pluto.jl.git#main` [e9f186c6] ↑ Libffi_jll v3.2.1+4 ⇒ v3.2.2+0 [94ce4f54] ↑ Libiconv_jll v1.16.0+7 ⇒ v1.16.1+0 [4b2f31a3] ↑ Libmount_jll v2.34.0+3 ⇒ v2.35.0+0 [2f80f16e] ↑ PCRE_jll v8.42.0+4 ⇒ v8.44.0+0 [02c8fc9c] ↑ XML2_jll v2.9.11+0 ⇒ v2.9.12+0 Progress [========================================>] 82/82 82 dependencies successfully precompiled in 157 seconds (201 already precompiled)

julia> using Pkg

julia> Pkg.update()
Updating registry at ~/.julia/registries/General
Updating git-repo https://github.com/JuliaRegistries/General.git
Updating git-repo https://github.com/fonsp/Pluto.jl.git
No Changes to ~/.julia/environments/v1.6/Project.toml
No Changes to ~/.julia/environments/v1.6/Manifest.toml

julia>
```

But checking the status of my SatelliteToolbox install, it's pretty old:

(@v1.6) pkg> status SatelliteToolbox
      Status `~/.julia/environments/v1.6/Project.toml`
  [6ac157d9] SatelliteToolbox v0.6.2

Turns out it's the interaction between SatelliteToolbox and the LsqFit package that's causing this problem for me. I removed LsqFit, installed the latest STB with (@v1.6) pkg> add [email protected] and check it was up-to-date:

(@v1.6) pkg> status SatelliteToolbox
      Status `~/.julia/environments/v1.6/Project.toml`
  [6ac157d9] SatelliteToolbox v0.8.0

(looks great). When I then go to reinstall LsqFit, SatelliteToolbox gets knocked back a few versions for some reason:

(@v1.6) pkg> add LsqFit
   Resolving package versions...
    Updating `~/.julia/environments/v1.6/Project.toml`
  [a93c6f00] ↑ DataFrames v0.22.7 ⇒ v1.1.1
  [2fda8390] + LsqFit v0.12.0
  [6ac157d9] ↓ SatelliteToolbox v0.8.0 ⇒ v0.6.2
    Updating `~/.julia/environments/v1.6/Manifest.toml`
  [324d7699] - CategoricalArrays v0.9.7
  [a93c6f00] ↑ DataFrames v0.22.7 ⇒ v1.1.1
  [a98d9a8b] ↓ Interpolations v0.13.2 ⇒ v0.12.10
  [2fda8390] + LsqFit v0.12.0
  [e1d29d7a] ↑ Missings v0.4.5 ⇒ v1.0.0
  [87e2bd06] + OptimBase v2.0.1
  [fbd9d27c] ↓ OptionalData v0.3.0 ⇒ v0.2.1
  [3a141323] ↓ PolynomialRoots v1.0.0 ⇒ v0.2.0
  [08abe8d2] ↑ PrettyTables v0.11.1 ⇒ v1.0.1
  [189a3867] ↓ Reexport v1.0.0 ⇒ v0.2.0
  [74f56ac7] ↓ ReferenceFrameRotations v0.5.7 ⇒ v0.5.6
  [6ac157d9] ↓ SatelliteToolbox v0.8.0 ⇒ v0.6.2
  [a2af1166] ↑ SortingAlgorithms v0.3.1 ⇒ v1.0.0
  [90137ffa] ↓ StaticArrays v1.2.0 ⇒ v0.12.5
  [856f2bd8] - StructTypes v1.7.2
  Progress [========================================>]  68/68
68 dependencies successfully precompiled in 153 seconds (215 already precompiled)

Trying to again install the latest SatelliteToolbox after this provides a bit more info:

(@v1.6) pkg> add [email protected]
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Reexport [189a3867]:
 Reexport [189a3867] log:
 ├─possible versions are: 0.2.0-1.0.0 or uninstalled
 ├─restricted by compatibility requirements with SatelliteToolbox [6ac157d9] to versions: 1.0.0
 │ └─SatelliteToolbox [6ac157d9] log:
 │   ├─possible versions are: 0.3.0-0.8.0 or uninstalled
 │   └─restricted to versions 0.8.0 by an explicit requirement, leaving only versions 0.8.0
 └─restricted by compatibility requirements with OptimBase [87e2bd06] to versions: 0.2.0 — no versions left
   └─OptimBase [87e2bd06] log:
     ├─possible versions are: 2.0.0-2.0.1 or uninstalled
     └─restricted by compatibility requirements with LsqFit [2fda8390] to versions: 2.0.0-2.0.1
       └─LsqFit [2fda8390] log:
         ├─possible versions are: 0.5.0-0.12.0 or uninstalled
         ├─restricted to versions * by an explicit requirement, leaving only versions 0.5.0-0.12.0
         └─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.11.0-0.12.0 or uninstalled, leaving only versions: 0.11.0-0.12.0
           └─Distributions [31c24e10] log:
             ├─possible versions are: 0.16.0-0.25.1 or uninstalled
             ├─restricted by compatibility requirements with LsqFit [2fda8390] to versions: 0.16.0-0.24.18
             │ └─LsqFit [2fda8390] log: see above
             ├─restricted by compatibility requirements with Symbolics [0c5d862f] to versions: 0.23.0-0.24.18
             │ └─Symbolics [0c5d862f] log:
             │   ├─possible versions are: 0.1.0-0.1.25 or uninstalled
             │   └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.25
             └─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: [0.16.0-0.23.11, 0.24.5-0.25.1] or uninstalled, leaving only versions: [0.23.0-0.23.11, 0.24.5-0.24.18]
               └─StaticArrays [90137ffa] log:
                 ├─possible versions are: 0.8.0-1.2.0 or uninstalled
                 └─restricted by compatibility requirements with SatelliteToolbox [6ac157d9] to versions: 1.0.0-1.2.0
                   └─SatelliteToolbox [6ac157d9] log: see above

(@v1.6) pkg> 

It looks to be like LsqFit uses OptimBase, which is requiring a much older version of Reexport than SatelliteToolbox, so I guess this really isn't a SatelliteToolbox issue at all - OptimBase is just forcing the use of an old package. I might cross-post this issue on that repo and see if they'll update! For now I'll probably just make two separate Julia environments so I can use the latest SatelliteToolbox.

from satellitetoolbox.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.