Skip to content

Commit

Permalink
Change order of tracking state
Browse files Browse the repository at this point in the history
  • Loading branch information
zsoerenm committed Nov 22, 2022
1 parent fe68069 commit 274d85f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/tracking_loop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ function track(
next_state = TrackingState{S, C, CALF, COLF, CN, DS, CAR, COR, PCF}(
prn,
system,
post_corr_filter,
init_carrier_doppler,
init_code_doppler,
carrier_doppler,
Expand All @@ -217,7 +216,8 @@ function track(
cn0_estimator,
downconverted_signal,
carrier_replica,
code_replica
code_replica,
post_corr_filter,
)
estimated_cn0 = estimate_cn0(cn0_estimator, max_integration_time)
TrackingResults(
Expand Down
20 changes: 10 additions & 10 deletions src/tracking_state.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ struct TrackingState{
}
prn::Int
system::S
post_corr_filter::PCF
init_carrier_doppler::typeof(1.0Hz)
init_code_doppler::typeof(1.0Hz)
carrier_doppler::typeof(1.0Hz)
Expand All @@ -85,6 +84,7 @@ struct TrackingState{
downconverted_signal::DS
carrier::CAR
code::COR
post_corr_filter::PCF
end

function TrackingState(
Expand All @@ -94,7 +94,6 @@ function TrackingState(
TrackingState(
track_state.prn,
track_state.system,
post_corr_filter,
track_state.init_carrier_doppler,
track_state.init_code_doppler,
track_state.carrier_doppler,
Expand All @@ -110,7 +109,8 @@ function TrackingState(
track_state.cn0_estimator,
track_state.downconverted_signal,
track_state.carrier,
track_state.code
track_state.code,
post_corr_filter
)
end

Expand All @@ -135,7 +135,6 @@ function TrackingState(
system::S,
carrier_doppler,
code_phase;
post_corr_filter::PCF = DefaultPostCorrFilter(),
code_doppler = carrier_doppler * get_code_center_frequency_ratio(system),
carrier_phase = 0.0,
carrier_loop_filter::CALF = ThirdOrderBilinearLF(),
Expand All @@ -146,6 +145,7 @@ function TrackingState(
integrated_samples = 0,
prompt_accumulator = zero(ComplexF64),
cn0_estimator::CN = MomentsCN0Estimator(20),
post_corr_filter::PCF = DefaultPostCorrFilter(),
num_samples = 0
) where {
T <: AbstractMatrix,
Expand All @@ -169,7 +169,6 @@ function TrackingState(
TrackingState{S, C, CALF, COLF, CN, typeof(downconverted_signal), typeof(carrier), typeof(code), PCF}(
prn,
system,
post_corr_filter,
carrier_doppler,
code_doppler,
carrier_doppler,
Expand All @@ -185,7 +184,8 @@ function TrackingState(
cn0_estimator,
downconverted_signal,
carrier,
code
code,
post_corr_filter,
)
end

Expand All @@ -196,7 +196,6 @@ function TrackingState(
carrier_doppler,
code_phase;
num_samples,
post_corr_filter::PCF = DefaultPostCorrFilter(),
code_doppler = carrier_doppler * get_code_center_frequency_ratio(system),
carrier_phase = 0.0,
carrier_loop_filter::CALF = ThirdOrderBilinearLF(),
Expand All @@ -206,7 +205,8 @@ function TrackingState(
correlator::C = get_default_correlator(system, num_ants),
integrated_samples = 0,
prompt_accumulator = zero(ComplexF64),
cn0_estimator::CN = MomentsCN0Estimator(20)
cn0_estimator::CN = MomentsCN0Estimator(20),
post_corr_filter::PCF = DefaultPostCorrFilter(),
) where {
T <: CuMatrix,
S <: AbstractGNSS{T},
Expand All @@ -229,7 +229,6 @@ function TrackingState(
TrackingState{S, C, CALF, COLF, CN, Nothing, Nothing, Nothing, PCF}(
prn,
system,
post_corr_filter,
carrier_doppler,
code_doppler,
carrier_doppler,
Expand All @@ -245,7 +244,8 @@ function TrackingState(
cn0_estimator,
downconverted_signal,
carrier,
code
code,
post_corr_filter,
)
end

Expand Down

0 comments on commit 274d85f

Please sign in to comment.