Skip to content

Commit

Permalink
Shorten the table generator
Browse files Browse the repository at this point in the history
Co-authored-by: Soeren Schoenbrod <[email protected]>
  • Loading branch information
minecraft2048 and zsoerenm authored Jun 11, 2024
1 parent f8f9ecf commit 84ebdc7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Acquisition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@ end

function Base.show(io::IO, ::MIME"text/plain", acq_channels::Vector{Acquisition.AcquisitionResults{T1,T2}}) where {T1,T2}
header = ["PRN"; "CN0 (dBHz)"; "Carrier Doppler (Hz)"; "Code phase (chips)"]
data = Matrix{Any}(undef, length(acq_channels),length(header))

for (idx,acq) in enumerate(acq_channels)
data[idx,1] = acq.prn
data[idx,2] = acq.CN0
data[idx,3] = acq.carrier_doppler
data[idx,4] = acq.code_phase
end
data = reduce(vcat, map(acq -> [acq.prn, acq.CN0, acq.carrier_doppler, acq.code_phase]', acq_channels))
hl_good = Highlighter((data,i,j)->(j==2) && (data[i,j] > 42), crayon"green")
hl_bad = Highlighter((data,i,j)->(j==2) && (data[i,j] < 42), crayon"red")

Expand Down

0 comments on commit 84ebdc7

Please sign in to comment.