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

Example in docs is incorrect/incomplete #55

Open
ErikBuer opened this issue Feb 9, 2025 · 1 comment
Open

Example in docs is incorrect/incomplete #55

ErikBuer opened this issue Feb 9, 2025 · 1 comment

Comments

@ErikBuer
Copy link

ErikBuer commented Feb 9, 2025

I can't run the code in the example.

https://github.com/JuliaGNSS/Tracking.jl/blob/d34a870addf05d81246ce98e466d8d8527816309/docs/src/index.md?plain=1#L60C1-L71C4

Running the example in a reply yields the following error:

julia> state = TrackingState(GPSL1, carrier_doppler, code_phase)
ERROR: MethodError: no method matching TrackingState(::Type{GPSL1}, ::Unitful.Quantity{Int64, 𝐓⁻¹, Unitful.FreeUnits{(Hz,), 𝐓⁻¹, nothing}}, ::Int64)
The type `TrackingState` exists, but no method is defined for this combination of argument types when trying to construct it.

Closest candidates are:
  TrackingState(::S, ::Any, ::Any; code_doppler, carrier_phase, carrier_loop_filter, code_loop_filter, sc_bit_detector, num_ants, correlator, integrated_samples, prompt_accumulator, cn0_estimator) where S<:GNSSSignals.AbstractGNSS
   @ Tracking ~/.julia/packages/Tracking/lSwFl/src/tracking_state.jl:105
  TrackingState(::S, ::Unitful.Quantity{Float64, 𝐓⁻¹, Unitful.FreeUnits{(Hz,), 𝐓⁻¹, nothing}}, ::Unitful.Quantity{Float64, 𝐓⁻¹, Unitful.FreeUnits{(Hz,), 𝐓⁻¹, nothing}}, ::Unitful.Quantity{Float64, 𝐓⁻¹, Unitful.FreeUnits{(Hz,), 𝐓⁻¹, nothing}}, ::Unitful.Quantity{Float64, 𝐓⁻¹, Unitful.FreeUnits{(Hz,), 𝐓⁻¹, nothing}}, ::Float64, ::Float64, ::C, ::CALF, ::COLF, ::SecondaryCodeOrBitDetector, ::Int64, ::ComplexF64, ::CN, ::DS, ::CAR, ::COR) where {S<:GNSSSignals.AbstractGNSS, C<:Tracking.AbstractCorrelator, CALF<:TrackingLoopFilters.AbstractLoopFilter, COLF<:TrackingLoopFilters.AbstractLoopFilter, CN<:AbstractCN0Estimator, DS<:Tracking.DownconvertedSignalCPU, CAR<:Tracking.CarrierReplicaCPU, COR<:Vector{Int8}}
   @ Tracking ~/.julia/packages/Tracking/lSwFl/src/tracking_state.jl:70

Stacktrace:
 [1] top-level scope
   @ REPL[7]:1

Perhaps one should write the example as an @example to ensure its validity.

@ErikBuer
Copy link
Author

ErikBuer commented Feb 9, 2025

It seems the problem is in passing the type GPSL1.

Should be:

state = TrackingState(GPSL1(), carrier_doppler, code_phase)

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

1 participant