Skip to content

Commit

Permalink
chore: documentation fixes (#6)
Browse files Browse the repository at this point in the history
remove unused dependencies
  • Loading branch information
Doublonmousse authored Jun 7, 2024
1 parent ffc56a8 commit 17ef7c0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 40 deletions.
3 changes: 0 additions & 3 deletions docs/notations.typ
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#set page(width: 16cm, margin: 0.5em, height: auto)
#let definition(content) = box(fill: luma(92%), width: 100%, inset: 0.5em, stroke: black)[#content]

#import "@preview/lovelace:0.2.0": *
#show: setup-lovelace.with(body-inset: 0pt)

#let pr = $nu$
#let time = $t$
== Notations
Expand Down
8 changes: 2 additions & 6 deletions docs/position_modeling.typ
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#set page(width: 16cm, margin: 0.5em, height: auto)
#let definition(content) = box(fill: luma(92%), width: 100%, inset: 0.5em, stroke: black)[#content]

#import "@preview/lovelace:0.2.0": *
#show: setup-lovelace.with(body-inset: 0pt)

#let pr = $nu$
#let time = $t$


== Position modeling

#definition[The raw input is processed as follow

raw input $->$ wobble smoother $->$ upsampled $->$ position modeling]

#definition[
Expand Down Expand Up @@ -44,7 +40,7 @@ the output
- Output : smoothed stream ${(p_f [k],v_f [k],a_f [k]), 0 <= k <=n}$
We define $Phi[k] = p[k]$. An euler scheme integration scheme is used with the initial conditions being $v[0] = 0$ and $p_f [0] = p[0]$ (same
initial conditions)

Update rule is simply
$
a_f [j] = (p[j]- p_f [j-1]) / k_"spring" - k_"drag" v_f [j-1]\
Expand Down
49 changes: 22 additions & 27 deletions docs/resampling.typ
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
#set page(width: 16cm, margin: 0.5em, height: auto)
#let definition(content) = box(fill: luma(92%), width: 100%, inset: 0.5em, stroke: black)[#content]

#import "@preview/lovelace:0.2.0": *
#show: setup-lovelace.with(body-inset: 0pt)

#let pr = $nu$
#let time = $t$


== Resampling
#let inv = $v$

*Algorithm* : Upsampling\
*Input* : ${inv[k] = (x[k],y[k],t[k]), 0 <= k <= n}$ and a target rate `sampling_min_output_rate`\,
Interpolate time and position between each $k$ by linearly adding interpolated values
\
This is done by adding linearly interpolated values so that the output stream is
$
{
inv[0], underbrace(u_0[1]\, dots\, u_0[n_0-1], "interpolated"), inv[
1
], underbrace(u_1[1]\, dots\, u_1[n_1 - 1 ], "interpolated"),inv[2], dots
}
$
Each $n_i$ is the minimum integer such that
$
& (t[i]-t[i-1]) / n_i < Delta_"target"\
<=> & n_i = ceil((t[i+1]-t[i])/Delta_"target")
$
and the linear interpolation means
$
u_j [k] = (1 - k / n_j) inv[j] + k / n_i inv[j+1]
$\
*Output* : ${(x'[k'],y'[k'],t'[k']), 0 <= k; <= n'}$ the upsampled position and times. This verifies $
forall k', t'[k'] - t'[k'-1] < Delta_"target" = 1/#text[`sampling_min_output_rate`]
$\
*Input* : ${inv[k] = (x[k],y[k],t[k]), 0 <= k <= n}$ and a target rate `sampling_min_output_rate`\, Interpolate time and
position between each $k$ by linearly adding interpolated values\
This is done by adding linearly interpolated values so that the output stream is
$
{
inv[0], underbrace(u_0[1]\, dots\, u_0[n_0-1], "interpolated"), inv[
1
], underbrace(u_1[1]\, dots\, u_1[n_1 - 1 ], "interpolated"),inv[2], dots
}
$
Each $n_i$ is the minimum integer such that
$
& (t[i]-t[i-1]) / n_i < Delta_"target"\
<=> & n_i = ceil((t[i+1]-t[i])/Delta_"target")
$
and the linear interpolation means
$
u_j [k] = (1 - k / n_j) inv[j] + k / n_i inv[j+1]
$\
*Output* : ${(x'[k'],y'[k'],t'[k']), 0 <= k; <= n'}$ the upsampled position and times. This verifies $
forall k', t'[k'] - t'[k'-1] < Delta_"target" = 1/#text[`sampling_min_output_rate`]
$\
*Remark* : As this is a streaming algorithm, we only calculate this interpolation with respect to the latest stroke
position.
5 changes: 1 addition & 4 deletions docs/wobble.typ
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#set page(width: 16cm, margin: 0.5em, height: auto)
#let definition(content) = box(fill: luma(92%), width: 100%, inset: 0.5em, stroke: black)[#content]

#import "@preview/lovelace:0.2.0": *
#show: setup-lovelace.with(body-inset: 0pt)

#let pr = $nu$
#let time = $t$

Expand Down Expand Up @@ -49,4 +46,4 @@ $
where $p'[j] = (x'[j],y'[j])$\
*Output*: ${(x'[k],y'[k]) in RR^2, 0<= k <=n}$ the filtered positions.\ Hence for low local speeds, the smoothing is
maximum (we take exactly the average position over the time $Delta T$) and for high speed there is no smoothing. We also
note that the first position is thus never filtered.
note that the first position is thus never filtered.

0 comments on commit 17ef7c0

Please sign in to comment.