1+ module DiffEqFactorExt
12
2- @info " IncrementalInference.jl is loading tools related to DifferentialEquations.jl"
3+ @info " IncrementalInference.jl is loading extensions related to DifferentialEquations.jl"
34
4- using . DifferentialEquations
5+ using DifferentialEquations
6+ import DifferentialEquations: solve
57
6- import . DifferentialEquations : solve
8+ using Dates
79
8- import IncrementalInference: getSample, getManifold
10+ using IncrementalInference
11+ import IncrementalInference: getSample, getManifold, DERelative
912
10- export DERelative
13+ using DocStringExtensions
1114
12- """
13- $TYPEDEF
15+ export DERelative
1416
15- Build a full ODE solution into a relative factor to condense possible sensor data into a relative transformation,
16- but keeping the parameter estimation process fluid. Assumes first and second variable in order
17- are of same dimension and compatible manifolds, such that ODE runs from Xi to Xi+1 on all
18- dimensions. Internal state vector can be decoupled onto different domain as needed.
1917
20- Notes
21- - Based on DifferentialEquations.jl
22- - `getSample` step does the `solve(ODEProblem)` step.
23- - `tspan` is taken from variables only once at object construction -- i.e. won't detect changed timestamps.
24- - Regular factor evaluation is done as full dimension `AbstractRelativeRoots`, and is basic linear difference.
25-
26- DevNotes
27- - FIXME see 1025, `multihypo=` will not yet work.
28- - FIXME Lots of consolidation and standardization to do, see RoME.jl #244 regarding Manifolds.jl.
29- - TODO does not yet handle case where a factor spans across two timezones.
30- """
31- struct DERelative{T <: InferenceVariable , P, D} <: AbstractRelativeRoots
32- domain:: Type{T}
33- forwardProblem:: P
34- backwardProblem:: P
35- # second element of this data tuple is additional variables that will be passed down as a parameter
36- data:: D
37- specialSampler:: Function
38- end
3918
4019getManifold (de:: DERelative{T} ) where {T} = getManifold (de. domain)
4120
@@ -132,6 +111,8 @@ function _solveFactorODE!(measArr, prob, u0pts, Xtra...)
132111 return sol
133112end
134113
114+ getSample (cf:: CalcFactor{<:DERelative} ) = error (" getSample(::CalcFactor{<:DERelative}) not implemented yet" )
115+
135116# FIXME see #1025, `multihypo=` will not work properly yet
136117function sampleFactor (cf:: CalcFactor{<:DERelative} , N:: Int = 1 )
137118 #
220201# ode.problem.f.f
221202
222203#
204+
205+ end # module
0 commit comments