Skip to content
Snippets Groups Projects
Verified Commit 3d9809b4 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Docstring and an addition method for orientations

parent ba781fac
No related branches found
No related tags found
1 merge request!32Orientations readout and interpolation
"""
A data structure to hold orientations data. This struct should be instantiated by
`Base.read(filename, Orientations)`.
"""
struct Orientations
module_ids::Set{Int}
times::Dict{Int, Vector{Float64}}
......@@ -39,6 +45,7 @@ function (o::Orientations)(module_id::Integer, time::Real)
slerp(q1, q2, t)
end
(o::Orientations)(module_id::Integer) = (t=o.times[module_id], q=o.quaternions[module_id])
function Base.read(filename::AbstractString, T::Type{Orientations})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment