Skip to content

Commit

Permalink
Merge pull request #7 from SwarmUS/correction_how_to
Browse files Browse the repository at this point in the history
validation with xav
  • Loading branch information
dubh3401 authored Nov 24, 2021
2 parents b60e942 + 4a5b3f4 commit da24229
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The script can be run from `src/parser`.
Refer to the [angle documentation](https://swarmus.github.io/SwarmUS-doc/sections/reference/Interloc/how_it_works/angle/) for a better understanding of the antenna pairs and their selection. <br />
`EXPORT_PDOA` : `True` will prompt the second set of plots (slopes extraction) and save the calibration result in a **pickle** format.
#### Behavioral descriptionand user interaction
Upon runnning the script, the first plot to appear will ask the user to select points from which to offset the whole dataset. Theoretically, the plot should represent a **sin** wave. The goal is to offset the signal until it wraps minimally. If the **sin** is not wrapping, no points need to be selected, as no offset needs to be applied, simply close the plot. Otherwise, the points selected should then be the very bottom of a **sin** *parabola* section. Also, to obtain a better estimation of the offset needed, it is possible to select the very bottom of the *parabola*, and a top of this *parabola* that has wrapped over. Many points can be selected, the mean of the *y axis* will be used as the offset. This process has to be repeted for the number of `usedPairs` selected. Here is an exemple of the process.<br />
Upon runnning the script, the first plot to appear will ask the user to select points from which to offset the whole dataset. Theoretically, the plot should represent a **sin** wave. The goal is to offset the signal until it wraps minimally. If the **sin** is not wrapping, no points need to be selected, as no offset needs to be applied, simply close the plot. Otherwise, the points selected should then be the very bottom of a **sin** *parabola* section. Also, to obtain a better estimation of the offset needed, it is possible to select the very bottom of the *parabola*, and a top of this *parabola* that has wrapped over. Many points can be selected, the mean of the *y axis* will be used as the offset. This process has to be repeted for the number of `usedPairs` selected. Closing the plot will save the selection and present the following antenna pair plot. Here is an exemple of the process.<br />
![](img/ex_offset.png)<br />
A plot of the result will then appear. If all curves are not wrapping, the first step is succesful. Otherwise, the script must be re-run and better points must be selected until all curves do not wrap. <br />

Expand Down
3 changes: 2 additions & 1 deletion src/parser/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ def extractSlopeExtremums(dPDOA, mdPDOA, namePDOA = "PDOA0"):
plt.xlabel("Real angle (deg)")
plt.title(f"Select points to represent {namePDOA} desired offset")
t = "Many points can be selected, the mean of the *y axis* will be used as the offset.\n" \
"If the sin is not wrapping, no points need to be selected, as no offset needs to be applied "
"If the sin is not wrapping, no points need to be selected, as no offset needs to be applied.\n" \
"Selection will be saved on exit"
figtext(.02, .02, t)

plt.show()
Expand Down

0 comments on commit da24229

Please sign in to comment.