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

Use get_codes from GNSSSignals #38

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
Acquisition = "0.0.2"
CUDA = "3.5"
DocStringExtensions = "0.6, 0.7, 0.8"
GNSSSignals = "0.15.4"
GNSSSignals = "0.15.5"
LoopVectorization = "0.8, 0.9, 0.10, 0.11, 0.12"
StaticArrays = "0.9, 0.10, 0.11, 0.12, 1.0"
StructArrays = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions src/tracking_loop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ function track(
correlator = get_correlator(state)
num_ants = get_num_ants(correlator)
size(signal, 2) == num_ants || throw(ArgumentError("The second dimension of the signal should be equal to the number of antennas specified by num_ants = NumAnts(N) in the TrackingState."))
if typeof(system.codes) <: CuMatrix
if typeof(get_codes(system)) <: CuMatrix
typeof(signal) <: StructArray || throw(ArgumentError("Signal is not a StructArray, initialize the signal properly and try again."))
typeof(signal.re) <: CuArray && typeof(state.system.codes) <: CuArray || throw(ArgumentError("Signal and GNSS codes are not of the same type. Please check if CPU or GPU is used."))
typeof(signal.re) <: CuArray && typeof(get_codes(system)) <: CuArray || throw(ArgumentError("Signal and GNSS codes are not of the same type. Please check if CPU or GPU is used."))
end
downconverted_signal_temp = get_downconverted_signal(state)
downconverted_signal = resize!(downconverted_signal_temp, size(signal, 1), signal)
Expand Down