diff --git a/papers/anom_combined/.gitignore b/papers/anom_combined/.gitignore new file mode 100644 index 00000000..3cbb0e21 --- /dev/null +++ b/papers/anom_combined/.gitignore @@ -0,0 +1,9 @@ +# LaTeX build outputs; the scripts regenerate tables/ and figures/, which are tracked. +main.pdf +*.bcf +*.blg +*.run.xml +*.fls +*.out +*.synctex.gz +__pycache__/ diff --git a/papers/anom_combined/IONconf-v2.cls b/papers/anom_combined/IONconf-v2.cls new file mode 100644 index 00000000..dfec4fa8 --- /dev/null +++ b/papers/anom_combined/IONconf-v2.cls @@ -0,0 +1,919 @@ +%% +%% IONconf-v2.cls 2023/06/09 version 2 +%% +%% LaTeX class file to generate conference papers for the Institute of +%% Navigation (ION) +%% +%% This class file tries to represent the paper formatting guidelines for ION +%% conference submissions. For latest guidelines please visit www.ion.org. +%% +%% A good first introduction to LaTeX can be found at +%% https://www.overleaf.com/learn/latex/Free_online_introduction_to_LaTeX_(part_1) +%% Further comprehensive documentation on LaTeX can be found at +%% https://ctan.org +%% +%% Compatibility notes +%% This class file requires LaTeX2e. +%% It has been tested with pdfLaTeX and LuaLaTeX compiler engines. +%% +%%************************************************************************* +%% Legal Notice: +%% This code is offered as-is without any warranty either expressed or +%% implied; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE! +%% User assumes all risk. +%% In no event shall the ION or any contributor to this code be liable for +%% any damages or losses, including, but not limited to, incidental, +%% consequential, or any other damages, resulting from the use or misuse +%% of any information contained here. +%% +%% All comments are the opinions of their respective authors and are not +%% necessarily endorsed by the ION. +%% +%% This work is distributed under the LaTeX Project Public License (LPPL) +%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, +%% distributed and modified. A copy of the LPPL, version 1.3, is included +%% in the base LaTeX documentation of all distributions of LaTeX released +%% 2003/12/01 or later. +%% Retain all contribution notices and credits. +%% ** Modified files should be clearly indicated as such, including ** +%% ** renaming them and changing author support contact information. ** +%% +%% File list of work: IONconf-v2.cls, IONconf_template_userguide.pdf, +%% IONconf_template.tex +%% +%%************************************************************************* +%% +%% Available class options (choose one from each category) +% for example \documentclass[letterpaper]{IONconf-v2} +% +% +% letterpaper, a4paper +% determines the paper size and margins. +% letterpaper uses US letter size paper 8.5" x 11" with margins: +% 1" top and bottom, 0.75" left and right +% a4paper uses A4 size paper 210mm x 297mm with margins: +% 1.18" (30mm) top and bottom, 0.59" (15mm) left and right. +% Paper sizes are defined using the geometry package. +% Default is letterpaper. +% +% Required font +% times, calibri +% Default is times. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Identification +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{IONconf-v2}[2023/06/09 ION conference paper class] + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% class option conditionals +\newif\iftimes +\newif\ifcalibri + +%% Preliminary declarations + +% base class on article class +\LoadClass[twoside]{article} + +% to determine the compiler +\RequirePackage{iftex} + +% to be able to get rid of page numbers +\RequirePackage{nopageno} + +% page layout +\RequirePackage{geometry} +\setlength\parindent{15pt}% +% for bold table identifiers +\RequirePackage{subcaption} + +% for paragraph spacing and indenting +\RequirePackage{parskip} +\RequirePackage{amsmath,amssymb}% +\RequirePackage{graphicx}% +\graphicspath{{./figures/}} +\RequirePackage{cuted}% +\RequirePackage{ifpdf}% +\RequirePackage{xurl} +\urlstyle{same} +\RequirePackage[all]{nowidow} +\RequirePackage{calc}% +\RequirePackage{xcolor}% +\RequirePackage{float}% +\RequirePackage{array}% +\RequirePackage{tabularray} +\UseTblrLibrary{booktabs} +\RequirePackage{tikzpagenodes} +\RequirePackage{tikz} +\RequirePackage[figuresright]{rotating}% +\RequirePackage{afterpage}% +\RequirePackage{booktabs}% +\RequirePackage{enumitem}% +\setlist[enumerate]{nosep,itemsep=4pt,labelindent=\parindent, leftmargin=!} +\setlist[itemize]{nosep,itemsep=4pt,labelindent=\parindent, leftmargin=!,label=$\bullet$} +\RequirePackage{soulutf8} +\sodef\spac{}{.2em}{0.8em plus1em}{0.6em plus.3em minus 0.3em} + +\RequirePackage[backend=biber,natbib=true,style=apa,]{biblatex} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Options + +\DeclareOption{twocolumn}{\OptionNotUsed} % don't allow two column style + +% define paper and font sizes +\DeclareOption{letterpaper}{\geometry{letterpaper,marginparwidth=0in, + total={7in,9in},%{5in,9in}, + left=0.75in,%1.75in,% + top=1in}} + +\DeclareOption{a4paper}{\geometry{a4paper,marginparwidth=0in, + total={180mm,237mm}, + left=15mm,%42mm,% + top=30mm}} + +% font times new roman vs. calibri +\DeclareOption{times}{\timestrue} +\DeclareOption{calibri}{\calibritrue} + +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} % all other options + +% default to US letter paper +\ExecuteOptions{letterpaper,times} +% override defaults by user input +\ProcessOptions + +% determine which font to use (times new roman - like or calibri) +\iftimes +%\RequirePackage{mathptmx} +\RequirePackage{newtxtext} +\renewcommand{\normalsize}{\fontsize{10}{12}\selectfont} +\ifcalibri +\RequirePackage[default]{opensans} +\RequirePackage[italic]{mathastext}% +\renewcommand{\normalsize}{\fontsize{10}{14}\selectfont} +\else +\RequirePackage{newtxtext} +\renewcommand{\normalsize}{\fontsize{10}{12}\selectfont} +\fi + +%color +\definecolor{tenblack}{cmyk}{0,0,0,0.10} + +\def\jmkLabel#1{\@bsphack\protected@write\@auxout{}{\string\Newlabel{#1}{\@currentlabel}}\@esphack}% +\def\Newlabel#1#2{\expandafter\xdef\csname X@#1\endcsname{#2}}% +\def\jmkRef#1{\@ifundefined{X@#1}{0}{\csname X@#1\endcsname}}% + +\def\@doi{}% +\def\doi#1{\gdef\@doi{#1}}% + +\newcount\emailcount% +\newif\if@auemail% +\newcommand{\email}[1]{Email: #1}% + +\newskip\abs@coli@hsize\abs@coli@hsize12pc%0.33\textwidth% +\newskip\abs@colii@hsize\abs@colii@hsize29pc%0.63\textwidth% + +%fonts definition +\def\arttypefont{\fontsize{9}{9}\fontseries{b}\selectfont}% +\def\addressfont{\hsize\abs@coli@hsize\fontsize{8}{11}\selectfont\leftskip\z@\rightskip\z@ plus1fil}% +\def\corresfont{\hsize\abs@coli@hsize\fontsize{8}{11}\selectfont\leftskip\z@\rightskip\z@ plus1fil}% +\def\keywordsheadfont{\hsize\abs@colii@hsize\fontsize{10}{10}\selectfont\ifAbstractexist\leftskip7\p@\rightskip\leftskip\fi}% +\def\abstractfont{\hsize\abs@colii@hsize\fontsize{8}{13}\selectfont\leftskip7\p@\rightskip\leftskip}% +\def\absheadfont{\hsize\abs@colii@hsize\fontsize{10}{10}\fontseries{b}\selectfont\bfseries\leftskip7\p@\rightskip\leftskip}% +\def\keywordsfont{\fontsize{8}{13}\selectfont\ifAbstractexist\leftskip7\p@\rightskip\leftskip\fi}% +\def\Authorfont{\fontsize{12}{18}\selectfont\bfseries\leftskip\z@\rightskip\z@ plus1fil}% +\def\titlefont{\fontsize{18}{23}\bfseries\selectfont\leftskip\z@\rightskip\z@ plus1fil\let\mathbcal\titmathbcal}% +\def\titlepageheadfont{\fontsize{7}{9}\selectfont} +\def\runningheadfont{\rmfamily\fontsize{8}{10}\selectfont} +\def\runningfootfont{\fontsize{7}{9}\selectfont}% +\def\sectionfont{\fontsize{12}{13}\fontseries{b}\selectfont\leftskip\z@\rightskip\z@ plus1fil}% +\def\subsectionfont{\fontsize{12}{13}\bfseries\selectfont\leftskip\z@\rightskip\z@ plus1fil}% +\def\subsubsectionfont{\fontsize{12}{13}\bfseries\selectfont\leftskip\z@\rightskip\z@ plus1fil}% +\def\paragraphfont{\fontsize{10.5}{13}\fontseries{b}\selectfont}% +\def\subparagraphfont{\fontsize{10}{13}\fontseries{b}\selectfont}% + +\def\artauthors{} + +\let\sep\@empty% +\let\authorsep\@empty% +\let\emailsep\@empty% + +\newcount\aucount% +\newcount\punctcount% + +\def\author{\advance\aucount\@ne% +\@ifstar\@@corrauthor\@@author}% + +\newcommand{\@@corrauthor}[2][]{\g@addto@macro\artauthors{\undefined% +\renewcommand{\email}[1]{}% +\hsize=\textwidth\raggedright% +\global\advance\aucount\@ne%% +\global\advance\corrauthcount\@ne%% +\def\@currentlabel{#2} +\jmkLabel{corrauth\thecorrauthcount}% +\Authorfont% +\def\baselinestretch{1}% +\authorsep{#2\ifnum\aucount=2\else\ifnum\punctcount=2,\else\ifnum\punctcount=1\relax\else\ifnum\punctcount=0\relax\else,\fi\fi\fi\fi}% +\unskip\ifx#1\empty\else\textsuperscript{\smash{{% +\@for\@@affmark:=#1\do{\edef\affnum{\@ifundefined{X@\@@affmark}{1}{\jmkRef{\@@affmark}}}% +\unskip\sep\affnum\let\sep=,}}}}\fi% +\def\authorsep{\au@and~}% +\global\let\sep\@empty% +}}% + +\newcommand\fnm[1]{{\StepUpCounter{\fnmCnt}#1\addtocontents{aq}{\protect{\bfseries Author\ \thefnmCnt}\hfill\protect\break Given Names: #1\hfill\protect\break}}}% +\newcommand\sur[1]{{#1\addtocontents{aq}{Last Name: #1\protect\par}}}% + +\newbox\aufootnotemark% + +\newbox\authmarkbox% +\newif\ifGApresent% + +\def\@filtername#1#2\@nil{#1.\ }% +\def\filtername#1 #2\@nil{% +\@filtername#1\@nil #2}% +\newcommand{\@@author}[2][]{% +\def\temp{#1}\g@addto@macro\artauthors{% +\def\footnotemark##1{% +\affilmarkdefns% +\global\setbox\authmarkbox\hbox{\reset@font\fontfamily{\rmdefault}\fontsize{8.75pt}{0}\selectfont{##1}}}% +\ifnum\aucount=1% + \global\@auemailtrue% + \else% + \global\@auemailfalse% + \fi% + \Authorfont%\ + \def\baselinestretch{1}% + \authorsep{#2}\unskip\ifx\temp\@empty% + \@ifundefined{Xname@0}% + {\expandafter\xdef\csname Xname@0\endcsname{\filtername#2\@nil}}% + {\expandafter\protected@xdef\csname Xname@0\endcsname% + {\csname Xname@0\endcsname,\ \filtername#2\@nil}}% + \else% + \textsuperscript{\smash{{% + \@for\@@affmark:=#1\do{\edef\affnum{\@ifundefined{X@\@@affmark}{1}{\jmkRef{\@@affmark}}}% + \@ifundefined{Xname@\@@affmark}% + {\expandafter\xdef\csname Xname@\@@affmark\endcsname{\filtername#2\@nil}}% + {\expandafter\protected@xdef\csname Xname@\@@affmark\endcsname% + {\csname Xname@\@@affmark\endcsname,\ \filtername#2\@nil}}% + \unskip\sep\ifnum\addcount=1\else\affnum\fi\let\sep=,}}}\unhbox\authmarkbox}\fi% + \gdef\authorsep{\enspace$|$\enspace}%%% + \global\let\sep\@empty\global\let\@corref\@empty% +}}% + + +\newcounter{affn}% +\renewcommand\theaffn{\arabic{affn}}% + +\def\jmkaddress{}% + +\gdef\@corresinfo{}% +\def\corres#1{\gdef\@corresinfo{#1}}% + +\newcommand{\corresinfo}{{\corresfont\baselineskip11pt\textbf{Correspondence}\par\removelastskip\nointerlineskip\vskip1pt \@corresinfo \par}}% + + +%% Keywords %% +\def\keywords#1{\def\@keywords{{\keywordsheadfont\textbf{Keywords}\par% +\removelastskip\nointerlineskip\vskip2pt \keywordsfont#1\par}}}\def\@keywords{}% + +% +\def\journalname#1{\gdef\@journalname{#1}}\gdef\@journalname{}% +\def\journalvolume#1{\gdef\@journalvolume{#1}}\gdef\@journalvolume{}% +\def\journalnumber#1{\gdef\@journalnumber{#1}}\gdef\@journalnumber{}% +\def\received#1{\gdef\@received{Received: #1}}\gdef\@received{}% +\def\revised#1{\gdef\@revised{Revised: #1}}\gdef\@revised{}% +\def\accepted#1{\gdef\@accepted{Accepted: #1}}\gdef\@accepted{}% + +\newif\ifarticletype\global\articletypefalse + +\def\pagenumberalign#1{\hbox to 22.5\p@{#1}}% +\def\rhvertbar{\smash{\raisebox{-2\p@}{\rule{.5\p@}{10\p@}}}}% +\def\historydatesvertbar{\hspace*{7\p@}\smash{\raisebox{-4\p@}{\rule{.5\p@}{12\p@}}}\hspace*{7\p@}}% +\def\foot@pagenumber@align#1{\hbox to 15.75\p@{#1}}% +\def\foot@vertbar{\hspace*{7\p@}\smash{\raisebox{0\p@}{\rule{.5\p@}{9.25\p@}}}\hspace*{7\p@}}% +\def\authorseprule#1{\gdef\author@seprule{\hspace*{7\p@}#1\hspace*{7\p@}}}\authorseprule{\smash{\raisebox{.1\p@}{\hbox{\rule{.5\p@}{8.5\p@}}}}}% +% +\def\thepagedef{{\pagenumfont\thepage}}% + +\def\headfootrule#1{\gdef\@headfootrule{#1}}\headfootrule{{\rule{\textwidth}{.5\p@}}}% + +\def\historykern#1{\gdef\history@kern{#1}}\historykern{\nobreakspace{}\kern.5pt} +\def\@dummy@received{\textcolor{red}{Received: Missing}}% +\def\@dummy@revised{\textcolor{red}{Revised: Missing}}% +\def\@dummy@accepted{\textcolor{red}{Accepted: Missing}}% +\def\@dummy@doi{\textcolor{blue}{DOI: Missing}}% +\def\@dummy@journalname{\textcolor{red}{Journal name: Missing}}% +\def\@dummy@journalvolume{\textcolor{red}{Volume: Missing}}% +\def\@dummy@journalnumber{\textcolor{red}{Number: Missing}}% +\def\@dummy@articletype{\textcolor{red}{Article type: Missing}}% +\def\historydates#1{\gdef\@history@dates{#1}}% +\historydates{{\titlepageheadfont% + \ifx\@received\@empty\@dummy@received\else\@received\fi\historydatesvertbar% + \ifx\@revised\@empty\@dummy@revised\else\@revised\fi\historydatesvertbar% + \ifx\@accepted\@empty\@dummy@accepted\else\@accepted\fi%\historydatesvertbar% +}}% +% +\def\doiheadtext#1{\gdef\@DOI@text{#1}}\doiheadtext{DOI:\nobreakspace{}}%xxx/xxxx +\def\head@titlepage@def#1#2{\vbox{% + \hbox to \textwidth{#1\dummyalphabet}\par\vspace*{2.5\p@}% + \@headfootrule\par\vspace*{9\p@}% + \smash{\ifx\@doi\@empty\titlepageheadfont\@dummy@doi\else{\titlepageheadfont\@DOI@text#2}\fi}\par\vspace*{9\p@}% + \vspace*{-2.5\p@}% +}}% +% +\newskip\foot@titlepage@raise@skip\global\foot@titlepage@raise@skip23\p@% + +\def\oddhead@titlepage@info{\head@titlepage@def{\@history@dates\hfill}{\@doi}}% +\def\evenhead@titlepage@info{\oddhead@titlepage@info}% +% +\def\foot@titlepage@info{% +\begin{tikzpicture}[remember picture,overlay,font=\runningfootfont] +\draw [black](current page footer area.north west)-- +(current page footer area.north east); +\node[anchor=west,text width=0.4\textwidth,inner xsep=0pt] +at (current page footer area.south west){% +\ifx\@journalname\@empty\@dummy@journalname\,\else\@journalname,~\fi +\ifx\@journalvolume\@empty\@dummy@journalvolume\,\else\@journalvolume\fi +\ifx\@journalnumber\@empty\@dummy@journalnumber\else(\@journalnumber)\fi% +}; +\node[anchor=east,inner xsep=0pt] +at(current page footer area.south east) {© 2023 Institute of Navigation}; +\node[inner xsep=0pt] +at(current page footer area.south) {Licensed under CC-BY 4.0}; +%%%logo +\node[anchor=north east]at(current page text area.north east) +{\includegraphics[scale=1.0]{ion_logo}}; +\end{tikzpicture}} + +%\def\evenfoot@titlepage@info{\oddfoot@titlepage@info}% + +\def\ps@titlepage{%% + \def\@oddfoot{\foot@titlepage@info}% + \def\@evenfoot{\foot@titlepage@info}% + \def\@oddhead{\oddhead@titlepage@info}% + \def\@evenhead{\evenhead@titlepage@info}% + \let\@mkboth\markboth% + %\afterpage{\globaldefs=1 \restoregeometry} +}% + +\def\evenhead@ion@info{% +\begin{tikzpicture}[remember picture,overlay,font=\runningheadfont] +\draw [black](current page header area.south west)-- +(current page header area.south east); +\node[anchor=east,inner xsep=0pt] +at(current page header area.east) {\textsc{\@authormark}}; +%%%logo +\node[anchor=north west,inner sep=0pt,fill=white,yshift=-1.75pt]at(current page header area.north west) +{\includegraphics[scale=1.0]{ion_logo}}; +\end{tikzpicture}} + +\def\oddhead@ion@info{\begin{tikzpicture}[remember picture,overlay,font=\runningheadfont] +\draw [black](current page header area.south west)-- +(current page header area.south east); +\node[anchor=west,inner xsep=0pt] +at(current page header area.west) {\textsc{\@authormark}}; +%%%logo +\node[anchor=north east,inner sep=0pt,fill=white,outer sep=0pt,yshift=-1.75pt]at(current page header area.north east) +{\includegraphics[scale=1.0]{ion_logo}}; +\end{tikzpicture}}% + +\def\ps@ion{% + \def\@oddfoot{}% + \def\@evenfoot{}% + \def\@oddhead{\oddhead@ion@info}% + \def\@evenhead{\evenhead@ion@info}% + \let\@mkboth\markboth% +}% + +\def\@authormark{}% +\def\authormark#1{% +\gdef\@authormark{\def\etal{\textit{ET AL.}}\let\AQ\AHAQ#1}% +\gdef\@authormarkforcite{\undefined\def\etal{\textit{et al.}}#1}}% +\def\etal{\textit{et al.}}% + +% page style +\pagestyle{ion} + +\newcount\corrauthcount% +\newcount\addcount% To check the count of address +% +\def\address{\advance\addcount\@ne\@ifstar\@@corraddress\@@address}% +% +\newcommand{\@@corraddress}[2][]{\gdef\@corresinfo{#2}}% +% +\newcommand{\@@address}[2][]{\def\temp{#1}% +\g@addto@macro\jmkaddress{\hsize=\textwidth% +\def\baselinestretch{1}% +\stepcounter{affn}% +\xdef\@currentlabel{\theaffn}% +\jmkLabel{#1}% +\addressfont\ifx#1\empty\else\@hangfrom{\textsuperscript{\smash{\theaffn}}}\fi% +#2\vphantom{Thy}\par% +}}% + +%% paper category %% +\newcommand\dunderline[3][-4pt]{{% + \sbox0{#3}% + \ooalign{\copy0\cr\rule[\dimexpr#1-#2\relax]{\wd0}{#2}}}} + +\def\@DocHead{}% +\def\articletype#1{\gdef\@DocHead{\hsize=\textwidth\arttypefont\bfseries\uppercase{\dunderline{1pt}{\spac{#1}}}}}% + +%% article title %% +\def\titlemark#1{\gdef\@titlemark{#1}}% +\gdef\@titlemark{}% + +\def\titlefootnotemark#1{\textsuperscript{$\@fnsymbol{#1}$}}% + +\def\title#1{\gdef\@title{\hsize=\textwidth% +\titlefont#1\addcontentsline{toc}{chapter}{#1}% for bookmarks +}}% +\def\shrttitle#1{\gdef\@shrttitle{#1}}\shrttitle{}% + +\newcount\authfncnt% +\authfncnt=0% +\newcount\authfnTmpCnt% +\authfnTmpCnt=1% + +\def\authfndefns{% +\loop\ifnum\authfncnt>0% + \csname\romannumeral\authfnTmpCnt StoreAuthFnTxt\endcsname\par% + \StepDownCounter{\authfncnt}% + \StepUpCounter{\authfnTmpCnt}% +\repeat}% + +\renewcommand{\maketitle}{\par% + \@afterindentfalse% + \begingroup + \renewcommand{\thefootnote}{\fnsymbol{footnote}}% + \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \twocolumn[\@maketitle]% + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ + \@maketitle + \fi + \thispagestyle{titlepage}\@thanks% + \endgroup +% + \setcounter{footnote}{0}% + \let\thanks\relax + \let\maketitle\relax\let\@maketitle\relax + \gdef\@thanks{}\gdef\@author{}\gdef\@title{} + \@afterheading% +} + +\newskip\adjtitleskip% +\adjtitleskip=10pt plus4pt minus2pt +\def\zz#1{\vphantom{#1}}% + +% define title, section, subsection headings +\renewcommand{\@maketitle}{{\unskip% +\hsize=\textwidth\parindent=0pt% +\thispagestyle{empty}% +\removelastskip\vspace*{5pt}% +\ifx\@DocHead\empty% +\@dummy@articletype +\else% + {\@DocHead\par}% +\fi% +\removelastskip\vskip4pt% +\ifx\@title\empty\else{\@title\par}\fi% +\removelastskip\vskip18pt% +\ifnum\aucount>0% + \global\punctcount\aucount% + {\artauthors\par}% + \removelastskip\vskip8.25pt% +% +\fi% + \removelastskip\vskip19pt% +% + \printabstract +%% + \removelastskip\vskip\adjtitleskip% +}}% + +\newdimen\FreePageSpace%To find out the FreeSpace +\newdimen\ovsize% + +\newskip\adjustskip% +\adjustskip=0pt plus10pt minus1pt% +\newskip\titleskip% + +\gdef\ComputeFreeSpaceOnPage{% +\par% +\ifdim\pagetotal=0pt% + \global\FreePageSpace=\vsize% + \global\advance\FreePageSpace by -\adjustskip% +\else% + \FreePageSpace=\pagegoal% + \ifvoid\footins% + \global\advance\FreePageSpace by -\pagetotal% + \global\advance\FreePageSpace by -\adjustskip% + \else% + \setbox3=\vbox{\unvbox\footins}% + \htftbox=\ht3% + \advance\htftbox by \dp3% + \global\advance\FreePageSpace by -\pagetotal% + \global\advance\FreePageSpace by -\htftbox% + \global\advance\FreePageSpace by -\adjustskip% + \fi% +\fi% +}% + +%%%%%%%%%%%%%%%%%%%%% +%abstract +%%%%%%%%%%%%%%%%% +% +\newbox\abs@boxa% +\newbox\abs@boxb% +\newbox\abs@boxc% +% +\newdimen\abs@dima% +\newdimen\abs@dimb% +\newdimen\abs@dimc% +% +\def\absCOvrule{\vrule width0.4pt}% +\def\authCOvrule{{\color{tenblack}\vrule width\abs@colii@hsize}}% + +\def\FWauthCOvrule{{\color{tenblack}\vrule width\textwidth}}% +\def\dummyalphabet{\vphantom{abcdefghijklmnopqrstuvwxyz0123456789}} +% +\long\def\absworkarea#1#2{% + \setbox\abs@boxa\vbox{\hsize\abs@coli@hsize#1\dummyalphabet}% + \abs@dima=\ht\abs@boxa% + \advance\abs@dima by \dp\abs@boxa% + \advance\abs@dima by -4.5\p@% + \setbox\abs@boxb\vbox{\hsize\abs@colii@hsize#2\dummyalphabet}% + \abs@dimb=\ht\abs@boxb% + \advance\abs@dimb by \dp\abs@boxb% + \ComputeFreeSpaceOnPage% + \stripsep\z@% + \ifdim\abs@dimb>\FreePageSpace% + \setbox8=\vbox{\unvbox\abs@boxb}% + \advance\FreePageSpace by -\@firstpage@foot@height% + %\advance\FreePageSpace by \baselineskip% + \setbox1=\vsplit8 to \FreePageSpace% + \setbox1=\vbox{\unvbox1}% + \setbox2=\vbox{\unvbox8}% + \ifdim\abs@dima>\FreePageSpace% + \setbox7=\vbox{\unvbox\abs@boxa}% + \setbox3=\vsplit7 to \FreePageSpace% + \setbox3=\vbox{\unvbox3}% + \setbox4=\vbox{\unvbox7}% + \fi% + \gdef\abs@dimchk{\ifdim\ht3>\ht1\ht3\else\ht1\fi}% + \parbox{\textwidth}{% + \begin{minipage}[t]{\abs@coli@hsize}% + \leavevmode\vbox to \abs@dimchk{\ifdim\abs@dima>\FreePageSpace\copy3\else\unvbox\abs@boxa\fi\vfill}% + \end{minipage}\hfill% + \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule% + \begin{minipage}[t]{\abs@colii@hsize}% + \leavevmode\hspace*{-\textwidth}\vbox to \abs@dimchk{\unvbox1\vfill}% + \end{minipage}% + \vspace*{\@firstpage@foot@height}% + }% + \clearpage% + \loop% + \ifdim\ht2>\textheight% + \ovsize=\vsize% + \setbox1=\vsplit2 to \ovsize% + \setbox1=\vbox{\unvbox1}% + \setbox3=\vsplit4 to \ovsize% + \setbox3=\vbox{\unvbox3}% + \parbox{\textwidth}{% + \begin{minipage}[t]{\abs@coli@hsize}% + \leavevmode\vbox{\unvbox3\vfill}% + \end{minipage}\hfill% + \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule% + \begin{minipage}[t]{\abs@colii@hsize}% + \leavevmode\hspace*{-\textwidth}\vbox{\vspace*{7\p@}\unvbox1\vspace*{7\p@}}% + \end{minipage}% + }% + \clearpage% + \repeat% + \gdef\abs@dimchk{\ifdim\ht4>\ht2\ht4\else\ht2\fi}% + \parbox{\textwidth}{% + \begin{minipage}[t]{\abs@coli@hsize}% + \leavevmode\vbox to \abs@dimchk{\copy4\vfill}% + \end{minipage} + \hfill% + \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule% + \begin{minipage}[t]{\abs@colii@hsize}% + \leavevmode\hspace*{-\textwidth}\vbox to \abs@dimchk{\unvbox2\vfill}% + \end{minipage}% + \vspace*{2pc}% + \vskip\titleskip% + }% + \else% + \ifdim\abs@dima>\FreePageSpace% + \setbox8=\vbox{\unvbox\abs@boxa}% + \advance\FreePageSpace by -\@firstpage@foot@height% + % + \setbox1=\vsplit8 to \FreePageSpace% + \setbox1=\vbox{\unvbox1}% + \setbox2=\vbox{\unvbox8}% + \parbox{\textwidth}{%% + \begin{minipage}[t]{\abs@coli@hsize}% + \leavevmode\vbox{\copy1\vfill}% + \end{minipage}\hfill% + \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule% + \begin{minipage}[t]{\abs@colii@hsize}% + \leavevmode\hspace*{-\textwidth}\vbox to \ht1{\unvbox\abs@boxb\vfill}% + \end{minipage}% + \vspace*{\@firstpage@foot@height}% + }% + \clearpage% + \loop\ifdim\ht2>\textheight% + \ovsize=\vsize% + \setbox1=\vsplit2 to \ovsize% + \setbox1=\vbox{\unvbox1}% + \parbox{\textwidth}{%% + \begin{minipage}[t]{\abs@coli@hsize}% + \leavevmode\vbox{\unvbox1\vfill}% + \end{minipage}\hfill% + \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule% + \begin{minipage}[t]{\abs@colii@hsize}% + \leavevmode\hspace*{-\textwidth}\vbox{\vspace*{7\p@}\unvbox1\vspace*{7\p@}}% + \end{minipage}% + }% + \clearpage% + \repeat% + \parbox{\textwidth}{% + \begin{minipage}[t]{\abs@coli@hsize}% + \leavevmode\vbox{\unvbox2\vfill}% + \end{minipage} + \hfill% + \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule% + \begin{minipage}[t]{\abs@colii@hsize}% + \leavevmode\hspace*{-\textwidth}\vbox{\vspace*{7\p@}\unvbox2\vspace*{-7\p@}}% + \end{minipage}% + \vspace*{2pc}% + \vskip\titleskip% + }% + \else% + \gdef\abs@dimchk{\ifdim\abs@dima>\abs@dimb\abs@dima\else\abs@dimb\fi}% + \parbox{\textwidth}{%% + \begin{minipage}[t]{\abs@coli@hsize}% + \leavevmode\vbox to \abs@dimchk{\copy\abs@boxa\vfill}% + \end{minipage}\hfill% + \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule% + \begin{minipage}[t]{\abs@colii@hsize}% + \leavevmode\hspace*{-\textwidth}\vbox to \abs@dimchk{\unvbox\abs@boxb\vfill}% + \end{minipage}% + \vspace*{2pc}% + \vskip\titleskip% + }% + \fi% + \fi% +%%% +}% + +%\renewcommand{\abstractname}{Abstract} + +\newif\ifAbstractexist% +\global\Abstractexistfalse% + +%% Abstract +\renewcommand\abstract[2][Abstract]{\global\Abstractexisttrue% + \gdef\@abstract{% + \setlength{\parindent}{\z@}% + \vspace*{6.5\p@}% + \rightskip0pt\raggedright\hspace*{7\p@}\hbox{\reset@font\abstractfont{\absheadfont#1}}\par\vskip-4pt% below Abstract name + {\abstractfont\baselineskip11pt\ifFWabstract\hsize\textwidth\fi#2\par\vspace*{0\p@}}% + \addcontentsline{toc}{section}{\abstractname}% +}}% + +\newif\ifabstract\global\abstractfalse% +\newif\ifFWabstract% +% +\gdef\printabstractpart{% + \absworkarea{% + \noindent{\reset@font\addressfont\jmkaddress\par}% + \removelastskip\vskip8pt% + \ifx\@corresinfo\empty\else{\corresinfo\par}\fi% + \removelastskip\vskip8pt% + }{% + \global\abstracttrue% + \ifx\@abstract\@empty\else\@abstract\fi% +\removelastskip\vskip10pt% + \ifx\@keywords\@empty\else\@keywords\par\vskip-6pt%\fi% + \global\abstractfalse% + } +} + +%% Printing Abstract +\long\def\printabstract{% + \bgroup% + \setlength{\parindent}{\z@}% + \printabstractpart% + \egroup% +} + +% \renewcommand{\section}{ +% \@startsection{name} +% {level} +% {indent} +% {beforeskip} +% {afterskip} +% {style}} + +\renewcommand\section{\@startsection{section}{1}{\z@}{-27pt \@plus -2pt \@minus -2pt}{12\p@}{\sectionfont}}% +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-23pt \@plus -2pt \@minus -2pt}{5\p@}{\subsectionfont}}% +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-20pt \@plus -2pt \@minus -2pt}{2\p@}{\subsubsectionfont}}% +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{-10pt \@plus -2pt \@minus -2pt}{2\p@}{\paragraphfont}}% +\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}{-10pt \@plus -2pt \@minus -2pt}{-12\p@}{\subparagraphfont}}% + +% define section numbers in headlines +\renewcommand\thesection {\@arabic\c@section} +\renewcommand\thesubsection {\thesection.\@arabic\c@subsection} +\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection} +\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} +\renewcommand\thesubparagraph {\theparagraph\@arabic\c@subparagraph} + + +\newskip\secruleskip\secruleskip8.5\p@% +\newif\ifappendixsec% + +\def\secrule{\hspace*{\secruleskip}\raisebox{0pt}{\rule{.5\p@}{7.5\p@}}\hspace*{\secruleskip}}% +\def\subsecrule{\secrule}% +\def\subsubsecrule{\hspace*{\secruleskip}\raisebox{0pt}{\rule{.5\p@}{6.5\p@}}\hspace*{\secruleskip}}% + + +\def\@sectioncntformat#1{{\ifappendixsec\csname the#1\endcsname\ \else\csname the#1\endcsname\secrule\fi}}% +\def\@subsectioncntformat#1{{\ifappendixsec\csname the#1\endcsname\ \else\csname the#1\endcsname\subsecrule\fi}}% +\def\@subsubsectioncntformat#1{{\ifappendixsec\csname the#1\endcsname\ \else\csname the#1\endcsname\subsubsecrule\fi}}% + +\def\@paragraphcntformat#1{{\ifappendixsec\csname the#1\endcsname\ \else\csname the#1\endcsname.\ \fi}}% +\def\@subparagraphcntformat#1{#1} + +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth% + \edef\@svsec{\noindent}% + \else% + \refstepcounter{#1}% + \let\@@protect\protect% + \def\protect{\noexpand\protect\noexpand}% + \edef\@svsec{\csname @#1cntformat\endcsname{#1}}% + \let\protect\@@protect% + \fi% + \@tempskipa #5\relax% + \ifdim \@tempskipa>\z@% + \ifnum#2=1% + \begingroup #6\relax%\@hangfrom% + {\noindent\hskip #3\relax{\@svsec}}% + {\interlinepenalty\@M{\uppercase{#8}}\par}% + \endgroup% + \else% + \ifnum#2=2% + \begingroup #6\relax%\@hangfrom% + {\noindent\hskip #3\relax\@svsec}% + {\interlinepenalty\@M{#8}\par}% + \endgroup% + \else% + \ifnum#2=3% + \begingroup #6\relax%\@hangfrom% + {\noindent\hskip #3\relax\@svsec}% + {\interlinepenalty\@M{#8}\par}% + \endgroup% + \else% + \ifnum#2=4% + \begingroup #6\relax%\@hangfrom% + {\noindent\hskip #3\relax\@svsec}% + {\interlinepenalty\@M{\textcolor{black!75}{#8}}\par}% + \endgroup% + \else% + \begingroup #6\relax%\@hangfrom + {\noindent\hskip #3\relax\@svsec}% + {\interlinepenalty\@M#8\par}% + \endgroup% + \fi% + \fi% + \fi% + \fi% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else% + \protect\numberline{\csname the#1\endcsname}% + \fi% + #7}% + \else% + \def\@svsechd{% + #6{\hskip #3\relax% + \@svsec \textcolor{black!75}{#8}\hspace*{4pt}}% + }% + \fi% + \@xsect{#5}% +} + +\RequirePackage{microtype} +\SetTracking[no ligatures={f},spacing={1100*,-100*,},outer spacing={450,250,150},outer kerning={*,*}]{encoding=*}{200} + +\def\@ssect#1#2#3#4#5{\@tempskipa #3\relax + \ifdim \@tempskipa>\z@ + \begingroup \noindent #4{\relax{\hskip #1}{\interlinepenalty\@M{\uppercase{\textls{#5}}\@@par}}}% + \endgroup + \else \def\@svsechd{#4{\hskip #1\relax #5 \mbox{}}}\fi + \@xsect{#3}} + +%Figure caption +\sodef\spacfig{}{.15em}{.8em plus1em}{0.6em plus.3em minus 0.3em} +\DeclareCaptionLabelFormat{mylabel}{#1 #2\hspace{1.25ex}} + +\captionsetup[figure]{labelformat=mylabel, labelsep=none, skip=10pt, labelfont={bf,small,color=black!70}, +justification=raggedright,singlelinecheck=off,font=small,} +\captionsetup[table]{labelformat=mylabel, labelsep=newline, skip=10pt, labelfont={bf,small,color=black!70}, +justification=raggedright,singlelinecheck=off,font=small,} + +\renewcommand{\thefigure}{\arabic{figure}} + +\renewcommand{\thetable}{\arabic{table}} + +\renewcommand\figurename{\textbf{\spacfig{FIGURE\,}}}%% +\renewcommand\tablename{\textbf{\spacfig{TABLE\,}}} %% + +\sloppy% +\frenchspacing% + +%%% special parameters for TeX +\adjdemerits=100 +\linepenalty=100 + +% Page break penalties +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 + +% Disallow widows and orphans +\clubpenalty 10000 +\widowpenalty 10000 + +% Disable page breaks before equations, allow pagebreaks after +% equations and discourage widow lines before equations. +\displaywidowpenalty 100 +\predisplaypenalty 10000 +\postdisplaypenalty 0 + +% Set these global demerits +\doublehyphendemerits 1000000% corresponds to badness 800 +\finalhyphendemerits 1000000% corresponds to badness 1000 + +% Allow loose lines rather than overfull lines +\vbadness=9999% +\tolerance=9999% + + +% Allow breaking the page in the middle of a paragraph +\interlinepenalty 0% + +% Disallow breaking the page after a hyphenated line +\brokenpenalty 10000% + +% Hyphenation; don't split words into less than three characters +\lefthyphenmin=3% +\righthyphenmin=3% + +% Float placement parameters + +% The total number of floats that can be allowed on a page. +\setcounter{totalnumber}{10}% + +% The maximum number of floats at the top and bottom of a page. +\setcounter{topnumber}{3}% +\setcounter{bottomnumber}{3}% + +% The maximum part of the top or bottom of a text page that can be +% occupied by floats. This is set so that at least four lines of text +% fit on the page. +\renewcommand\topfraction{.921}% +\renewcommand\bottomfraction{.921}% + +% The minimum amount of a text page that must be occupied by text. +% This should accomodate four lines of text. +\renewcommand\textfraction{.1}% + +% The minimum amount of a float page that must be occupied by floats. +\renewcommand\floatpagefraction{.95}% + +% The same parameters repeated for double column output +\renewcommand\dbltopfraction{.95}% +\renewcommand\dblfloatpagefraction{.95}% + +% Space between floats +\setlength\floatsep{24\p@ \@plus 2.875\p@ \@minus 1.4375\p@}% + +% Space between floats and text +\setlength\textfloatsep{24\p@ \@plus 2.875\p@ \@minus 1.4375\p@}% +% +% Space above and below an inline figure +\setlength\intextsep{24\p@ \@plus 2.875\p@ \@minus 1.4375\p@}% diff --git a/papers/anom_combined/NOTES.md b/papers/anom_combined/NOTES.md new file mode 100644 index 00000000..f16e6159 --- /dev/null +++ b/papers/anom_combined/NOTES.md @@ -0,0 +1,90 @@ +# Open items before submission + +Status (2026-10-02): first complete draft. 19 pages in the NAVIGATION template, including +references (the limit is 20). 9 figures (limit 15), 9 tables, abstract 267 words. + +## Needs an author decision + +1. **Correction framing (Section 2).** The paper withdraws the ITM 2026 and Pacific PNT 2026 + results explicitly. Agree the wording with Dr. Dames, and decide whether to tell ION about + the conference papers separately (erratum or retraction notice). Under ION's policy a journal + version of a conference paper is normal; a journal version that *reverses* it should say so + in the cover letter as well. +2. **Title.** The working title is descriptive. Alternatives: + "Is a Smartphone Enough? ..." or "Sensor Quality, Not the Estimator, Decides ...". +3. **Abstract length.** 267 words. The NAVIGATION submission page does not give a limit; check + it in ScholarOne and trim if needed. +4. **Experimental-design diagram.** Planned as a TikZ figure and left out to stay under 20 + pages. Add it if a reviewer asks, or if the page count drops. +5. **Front matter.** Affiliation, correspondence email (`jbrodovsky@temple.edu` was copied from + the data paper), acknowledgments, and the conflict-of-interest statement. NAVIGATION also + needs an author photo and, on acceptance, a 2–3 minute video abstract. + +## Provenance gaps + +6. **Smartphone-arm runs.** `data/output_real2` (identical to `data/output_real`, Sep 26 + 18:31–20:27) has no recorded recipe. `conf/real/rbpf_*.toml` no longer parses with the + current code. Before submission, regenerate the smartphone arm from a committed config set + (e.g. `conf/real/` updated to the Canciani RBPF keys, with paths pointing at + `data/input_real` and `data/output_real`) and the commit that produced `data/output`. Then + rerun `scripts/*.py`. The data-availability section promises that every number can be + regenerated, and right now this one arm cannot be. +7. **Commit of record.** The `data/output` runs (2026-09-26 21:26–23:01) read `conf/` as + committed at `2a40f1e` (09:43 that day). That is where the RBPF recipes became 2,000 + particles for full GNSS and 1,000 for degraded and aided; at `827db06` all five said 2,000. + But `target/release/strapdown-sim` in the main checkout is dated 2026-09-25 21:18, before + both commits, so the executing revision is unverified. The paper now says so. Rerunning from + a tagged commit and archiving the binary's `--version` would close this. +8. **Conference-era defects.** Every defect in Section 2 was confirmed by reading the source at + `4a4e3de` (2025-11-14, "Write UKF Anomaly paper") and `4ea73af` (2026-03-11, "anomaly rbpf + paper"). This assumes those are the revisions the conference runs used. The missing + heading update (aided vs. unaided streams) applies only to `4ea73af`: at `4a4e3de` neither + stream had one. + +## Numbers that differ from the dissertation (the paper's own are recomputed from the CSVs) + +- **UKF α = 0.1**, not 1e-3. `DEFAULT_UKF_ALPHA` was raised in `b70cd55` (2026-09-18), before + the 2026-09-26 runs, and no config overrides it. Dissertation Ch. 3–4 should be corrected. +- **RBPF particles = 1,000** in every config, not 2,000 with full GNSS. +- **Map gradients.** Along-track median 1.44 mGal/km and 6.37 nT/km, from the gradient of + the bilinear cell containing each point (`build_figures.bilinear_gradient`, after PR review), + against 1.3 and 6.9 in the dissertation. Single-update scales: 91 / 1,183 / 38 / 0.6 km; + indicative noise targets 0.6 mGal / 2.8 nT. The paper now presents these as a directional + heuristic, not a localization bound. +- **Drive 2025-06-14.** The current input has 197 fixes, a median reported accuracy of 12.2 m, + and 9 fixes at ≥ 999 m; the dissertation's "587 rows, 16.2 m" is from the 1 Hz pipeline. +- **Gravity-norm vs. map slope.** −0.02 against −0.012 (correlation −0.055 matches). +- **Heading dependence of the magnetic intensity.** 52% of variance from a cos/sin fit to GNSS + course over ground, against 57% in the dissertation from a heading-circle fit. The + dissertation's 56 µT body-fixed field and 6,257 nT 60-s residual were **not** reproduced, + so the paper does not quote them. The 67–325 µT OS hard-iron offset and the + raw-accelerometer result (50–90× the map signal) are cited to the dissertation, not + recomputed. +- **The two unaided sets** differ (EKF mean 611.4 vs. 601.7 m) because rescaling the + magnetometer vector changes the heading input in the last bit. That changes one EKF drive by + 261 m and 22 of 25 RBPF drives by >1% (median 20%). The paper reports this. Each arm is + scored against its own unaided runs. +- **Paired statistics.** The aided RMSE comes from `analyze geoperformance` + (`*_detailed_results.csv`). It differs from `analyze performance` by <0.1 m on some drives + (e.g. 759.95 vs. 759.90 m), presumably time alignment. The baseline table uses + `performance`, the ratios use `geoperformance`, and each is internally consistent. +- **Known data-integrity issues, handled.** `data/output/rbpf/{grav,both}/2023-08-04_21-47-58.csv` + are stale leftovers whose baseline failed. The matched-set rule (both runs must exist) drops + them. + +## Citations + +- `strapdown-rs`: update to the JOSS DOI once joss-reviews#11377 is accepted. +- `mems-nav-dataset`: cited as the Zenodo record 10.5281/zenodo.17582434. That record holds 17 + drives at ~1 Hz, while this paper uses 27 segments at 10 Hz. Publish the new release and cite + its DOI. +- `brodovsky2026dissertation`: confirm the title, year and degree status. Check NAVIGATION's + policy on prior appearance in a dissertation (usually not prior publication; say so in the + cover letter). +- `groves_ch5` / `groves_ch14` render as Groves (2013a/b). They are the same book, so cite it + once with chapter pinpoints if the editor prefers. + +## Venue facts (ion.org/navi/submit-navi.cfm, read 2026-10-02) + +Regular paper ≤ 20 pages, ≤ 15 figures, APA 7 with DOIs, ScholarOne submission. Open access +APC: $1,000 (member) / $1,500 (non-member) for ≤ 20 pages. diff --git a/papers/anom_combined/README.md b/papers/anom_combined/README.md new file mode 100644 index 00000000..22a37598 --- /dev/null +++ b/papers/anom_combined/README.md @@ -0,0 +1,48 @@ +# Anomaly aiding: EKF, UKF and RBPF (ION *NAVIGATION* manuscript) + +Journal manuscript that combines and **corrects** the two ION conference papers +(ITM 2026, UKF; Pacific PNT 2026, RBPF) and adds the EKF. Template: ION's NAVIGATION +LaTeX template (`IONconf-v2.cls`, from `https://www.ion.org/navi/upload/LaTexTemplate.zip`), +APA 7 via biblatex/biber. + +## Layout + +| Path | What | +|---|---| +| `main.tex` | Preamble, front matter, section includes | +| `sections/*.tex` | One file per section | +| `tables/*.tex` | **Generated** tables and `numbers.tex` / `phone_numbers.tex` macros quoted in the text | +| `figures/*.pdf` | **Generated** figures (`ion_logo.pdf` comes from the template) | +| `scripts/stats.py` | Loads run outputs; paired ratio, bootstrap CI, Wilcoxon | +| `scripts/build_tables.py` | Writes `tables/` | +| `scripts/build_figures.py` | Writes `figures/` | +| `scripts/phone_mechanism.py` | Writes `tables/phone_numbers.tex` (why the phone channels are uninformative) | +| `scripts/rbpf_diagnostics.py` | Writes `tables/rbpf_numbers.tex` (RBPF crossing time, reported σ vs. error) | +| `build_figures.py` also writes | `tables/bound_numbers.tex` (map gradients, single-update scales, noise targets) | +| `NOTES.md` | Open items for the authors | + +## Rebuild + +The run outputs are not in git. The scripts read them from `STRAPDOWN_DATA`, which defaults to +`data/` at the root of the checkout that holds the scripts (set it when the data live +elsewhere, e.g. when working in a git worktree): + +- `data/output` — dedicated-sensor (synthetic ADXL355/RM3100) arm, plus the unaided runs +- `data/output_real2` — smartphone arm +- `data/input`, `data/input_real` — the preprocessed 10 Hz inputs of each arm + +```bash +export STRAPDOWN_DATA=/home/james/Code/strapdown-rs/data +uv run --with scipy python papers/anom_combined/scripts/build_tables.py +uv run --with scipy python papers/anom_combined/scripts/phone_mechanism.py +uv run --with scipy python papers/anom_combined/scripts/rbpf_diagnostics.py +uv run --with scipy python papers/anom_combined/scripts/build_figures.py +cd papers/anom_combined && latexmk -pdf main.tex +``` + +`build_tables.py` is deterministic (seeded bootstrap): rerunning it on unchanged data gives +byte-identical `tables/`. + +The dedicated-sensor and unaided runs read the `conf/*.toml` recipes as committed at `2a40f1e` +(2,000 RBPF particles with full GNSS, 1,000 otherwise); the binary's revision was not recorded. The provenance of the smartphone-arm runs in +`data/output_real2` (which configs, which commit) is an open item: see `NOTES.md`. diff --git a/papers/anom_combined/figures/fig_baselines.pdf b/papers/anom_combined/figures/fig_baselines.pdf new file mode 100644 index 00000000..78e681a7 Binary files /dev/null and b/papers/anom_combined/figures/fig_baselines.pdf differ diff --git a/papers/anom_combined/figures/fig_bound.pdf b/papers/anom_combined/figures/fig_bound.pdf new file mode 100644 index 00000000..a146f717 Binary files /dev/null and b/papers/anom_combined/figures/fig_bound.pdf differ diff --git a/papers/anom_combined/figures/fig_example.pdf b/papers/anom_combined/figures/fig_example.pdf new file mode 100644 index 00000000..e6e825e8 Binary files /dev/null and b/papers/anom_combined/figures/fig_example.pdf differ diff --git a/papers/anom_combined/figures/fig_maps.pdf b/papers/anom_combined/figures/fig_maps.pdf new file mode 100644 index 00000000..82ee5633 Binary files /dev/null and b/papers/anom_combined/figures/fig_maps.pdf differ diff --git a/papers/anom_combined/figures/fig_phone_sensors.pdf b/papers/anom_combined/figures/fig_phone_sensors.pdf new file mode 100644 index 00000000..799a2895 Binary files /dev/null and b/papers/anom_combined/figures/fig_phone_sensors.pdf differ diff --git a/papers/anom_combined/figures/fig_ratios.pdf b/papers/anom_combined/figures/fig_ratios.pdf new file mode 100644 index 00000000..a0d0db79 Binary files /dev/null and b/papers/anom_combined/figures/fig_ratios.pdf differ diff --git a/papers/anom_combined/figures/fig_rbpf.pdf b/papers/anom_combined/figures/fig_rbpf.pdf new file mode 100644 index 00000000..e0398cc5 Binary files /dev/null and b/papers/anom_combined/figures/fig_rbpf.pdf differ diff --git a/papers/anom_combined/figures/fig_residuals.pdf b/papers/anom_combined/figures/fig_residuals.pdf new file mode 100644 index 00000000..010e8f4f Binary files /dev/null and b/papers/anom_combined/figures/fig_residuals.pdf differ diff --git a/papers/anom_combined/figures/ion_logo.pdf b/papers/anom_combined/figures/ion_logo.pdf new file mode 100644 index 00000000..13c907f3 Binary files /dev/null and b/papers/anom_combined/figures/ion_logo.pdf differ diff --git a/papers/anom_combined/main.tex b/papers/anom_combined/main.tex new file mode 100644 index 00000000..167fe875 --- /dev/null +++ b/papers/anom_combined/main.tex @@ -0,0 +1,68 @@ +\documentclass[letterpaper,times]{IONconf-v2} + +% IONconf-v2 (ION's NAVIGATION template, LaTexTemplate.zip) already loads amsmath, graphicx, +% booktabs, tabularray, tikz, xcolor and biblatex-apa with natbib=true. +\usepackage{bm} +\setcounter{MaxMatrixCols}{20} +\usepackage{siunitx} +\usepackage{algorithm} +\usepackage{algpseudocode} +\usepackage{multirow} +\usetikzlibrary{arrows.meta,positioning,fit,calc} +\sisetup{group-separator={,},group-minimum-digits=4} + +\addbibresource{references.bib} + +\usepackage[hidelinks]{hyperref} +\usepackage[capitalize,noabbrev]{cleveref} + +\graphicspath{{figures/}} + +% Numbers quoted in running text, generated by scripts/build_tables.py. +\input{tables/numbers.tex} +\input{tables/bound_numbers.tex} +\input{tables/rbpf_numbers.tex} + +\articletype{Original paper}% +\journalname{NAVIGATION} + +\title{Gravity and Magnetic Anomaly Aiding of a Smartphone-Grade Inertial Navigation System under Degraded GNSS: A Paired Evaluation of Kalman and Particle Filters} + +\author[1]{James Brodovsky*} +\author[1]{Philip Dames} + +\authormark{BRODOVSKY \textsc{and} DAMES} + +\address[1]{Department of Mechanical Engineering, Temple University, Philadelphia, Pennsylvania, USA} + +\corres{*James Brodovsky, Temple University, Philadelphia, PA, USA.\\ \email{jbrodovsky@temple.edu}} + +\begin{document} + +\abstract[Abstract]{\input{sections/00-abstract}} + +\keywords{alternative navigation, geophysical navigation, magnetic anomaly navigation, gravity anomaly navigation, MEMS inertial navigation, particle filter, unscented Kalman filter, GNSS degradation} + +\maketitle + +\input{sections/01-introduction} +\input{sections/02-corrections} +\input{sections/03-navigation} +\input{sections/04-geophysical} +\input{sections/05-experiment} +\input{sections/06-results} +\input{sections/07-discussion} +\input{sections/08-conclusion} + +\section*{Data and Software Availability} +\input{sections/09-availability} + +\section*{Acknowledgments} +The authors thank the volunteers who recorded drives for the MEMS-Nav dataset. + +\section*{Conflict of Interest} +The authors declare no potential conflicts of interest. + +\printbibliography[title=References] + +\end{document} diff --git a/papers/anom_combined/references.bib b/papers/anom_combined/references.bib new file mode 100644 index 00000000..1012ae69 --- /dev/null +++ b/papers/anom_combined/references.bib @@ -0,0 +1,359 @@ +@article{EGM2008, +author = {Pavlis, Nikolaos K. and Holmes, Simon A. and Kenyon, Steve C. and Factor, John K.}, +title = {The development and evaluation of the Earth Gravitational Model 2008 (EGM2008)}, +journal = {Journal of Geophysical Research: Solid Earth}, +volume = {117}, +number = {B4}, +pages = {}, +keywords = {gravitational, harmonics, model, spherical}, +doi = {https://doi.org/10.1029/2011JB008916}, +url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2011JB008916}, +eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2011JB008916}, + +year = {2012} +} + +@article{GMT, + author = {Wessel, P. and Luis, J. F. and Uieda, L. and Scharroo, R. and Wobbe, F. and Smith, W. H. F. and Tian, D.}, + title = {The Generic Mapping Tools Version 6}, + journal = {Geochemistry, Geophysics, Geosystems}, + volume = {20}, + number = {11}, + pages = {5556-5564}, + doi = {https://doi.org/10.1029/2019GC008515}, + url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2019GC008515}, + eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2019GC008515}, + + year = {2019} +} + +@article{SANDWELL20211059, +title = {Gravity field recovery from geodetic altimeter missions}, +journal = {Advances in Space Research}, +volume = {68}, +number = {2}, +pages = {1059-1072}, +year = {2021}, +note = {25 Years of Progress in Radar Altimetry}, +issn = {0273-1177}, +doi = {https://doi.org/10.1016/j.asr.2019.09.011}, +url = {https://www.sciencedirect.com/science/article/pii/S0273117719306593}, +author = {David T. Sandwell and Hugh Harper and Brook Tozer and Walter H.F. Smith}, +keywords = {Marine gravity, Radar altimetry, Seafloor tectonics, Ocean variability}, + +} + +@manual{adxl355, + author = {{Analog Devices}}, + title = {{ADXL354/ADXL355}: Low Noise, Low Drift, Low Power, 3-Axis {MEMS} Accelerometers}, + organization = {Analog Devices, Inc.}, + note = {Data sheet, Rev.~0}, + year = {2016}, + url = {https://www.analog.com/media/en/technical-documentation/data-sheets/adxl354_adxl355.pdf} +} + +@inproceedings{anom-pf, + author = {Brodovsky, James and Dames, Philip}, + title = {Navigation in {GNSS}-Denied Environments Using {MEMS}-Grade Sensors and Geophysical Anomalies: A Particle Filter Approach}, + booktitle = {Proceedings of the {ION} Pacific {PNT} Meeting}, + location = {Honolulu, Hawaii}, + publisher = {Institute of Navigation}, + date = {2026-04}, + keywords = {conference}, +} + +@inproceedings{anom-ukf, + author = {Brodovsky, James and Dames, Philip}, + title = {Navigation in {GNSS}-Denied Environments Using {MEMS}-Grade Sensors and Geophysical Anomalies: A {UKF} Approach}, + booktitle = {Proceedings of the 2026 International Technical Meeting of the Institute of Navigation}, + location = {Anaheim, California}, + pages = {155--164}, + publisher = {Institute of Navigation}, + date = {2026-01}, + doi = {10.33012/2026.20508}, + keywords = {conference}, +} + +@article{baker1977terrain, + title={Terrain contour matching {TERCOM} primer}, + author={Baker, W and Clem, R}, + journal={Technical ReportASP-TR-77-61. Aeronautical Systems Division, Wright-Patterson AFB}, + year={1977}, +} + +@article{canciani2016absolute, + title={Absolute positioning using the Earth's magnetic anomaly field}, + author={Canciani, Aaron and Raquet, John}, + journal={NAVIGATION: Journal of the Institute of Navigation}, + volume={63}, + number={2}, + pages={111--126}, + year={2016}, + publisher={Wiley Online Library} +} + +@article{canciani2017airborne, + title={Airborne magnetic anomaly navigation}, + author={Canciani, Aaron and Raquet, John}, + journal={IEEE Transactions on aerospace and electronic systems}, + volume={53}, + number={1}, + pages={67--80}, + year={2017}, + publisher={IEEE} +} + +@article{divis2013gps, + title={GPS spoofing experiment knocks ship off course}, + author={Divis, Dee Ann}, + journal={Inside GNSS}, + volume={31}, + pages={1--3}, + year={2013} +} + +@article{donovan2012, + author="Donovan, Glenn T.", + journal="IEEE Journal of Oceanic Engineering", + title="Position Error Correction for an Autonomous Underwater Vehicle Inertial Navigation System (INS) Using a Particle Filter", + year="2012", + volume="37", + number="3", + pages="431-445", + doi="10.1109/JOE.2012.2190810" +} + +@book{efron1993bootstrap, + author = {Efron, Bradley and Tibshirani, Robert J.}, + title = {An Introduction to the Bootstrap}, + publisher = {Chapman \& Hall}, + address = {New York}, + year = {1993} +} + +@article{gordon1993novel, + author = {Gordon, N. J. and Salmond, D. J. and Smith, A. F. M.}, + title = {Novel approach to nonlinear\slash non-{Gaussian} {Bayesian} state estimation}, + journal = {IEE Proceedings F (Radar and Signal Processing)}, + volume = {140}, + number = {2}, + pages = {107--113}, + year = {1993}, + doi = {10.1049/ip-f-2.1993.0015} +} + +@inbook{groves_ch14, + author = {Paul D. Groves}, + chapter = {14}, + editor = {}, + pages = {}, + publisher = {Artech House}, + title = {{INS}/{GNSS} Integration}, + booktitle = {Principles of {GNSS}, Inertial, and Multisensor Integrated Navigation Systems}, + edition = {2nd edition}, + year = {2013} +} + +@inbook{groves_ch5, + author = {Paul D. Groves}, + chapter = {5}, + editor = {}, + pages = {}, + publisher = {Artech House}, + title = {Inertial Navigation}, + booktitle = {Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems}, + edition = {2nd edition}, + year = {2013} +} + +@article{humphreys2008, + author = {Humphreys, Todd E. and Ledvina, Brent M. and Psiaki, Mark L. and O'Hanlon, Brady W. and Kintner, Paul M.}, + title = {Assessing the spoofing threat: Development of a portable {GPS} civilian spoofer}, + journal = {Proceedings of the ION GNSS international technical meeting of the satellite division}, + volume = {21}, + pages = {2314--2325}, + year = {2008} +} + +@inproceedings{jircitano1991gravity, + title={Gravity aided inertial navigation system (GAINS)}, + author={Jircitano, Albert and Dosch, Daniel E}, + booktitle={Proceedings of the 47th Annual Meeting of The Institute of Navigation (1991)}, + pages={221--229}, + year={1991} +} + +@inproceedings{kamgar1999vehicle, + title={Vehicle localization on gravity maps}, + author={Kamgar-Parsi, Behzad and Kamgar-Parsi, Behrooz}, + booktitle={Unmanned ground vehicle technology}, + volume={3693}, + pages={182--191}, + year={1999}, + organization={SPIE} +} + +@misc{mems-nav-dataset, + author = {Brodovsky, James and Dames, Philip}, + title = {{MEMS-Nav}: A {MEMS}-Grade Dataset for Navigation Research}, + year = {2025}, + publisher = {Zenodo}, + doi = {10.5281/zenodo.17582434}, + note = {Dataset and preprint}, +} + +@article{regoli2018investigation, + author = {Regoli, Leonardo H. and Moldwin, Mark B. and Pellioni, Matthew and Bronner, Bret and Hite, Kelsey and Sheinker, Arie and Ponder, Brandon M.}, + title = {Investigation of a low-cost magneto-inductive magnetometer for space science applications}, + journal = {Geoscientific Instrumentation, Methods and Data Systems}, + volume = {7}, + pages = {129--142}, + year = {2018}, + doi = {10.5194/gi-7-129-2018} +} + +@manual{rm3100, + author = {{PNI Sensor Corporation}}, + title = {{RM3100} \& {RM2100} Sensor Suite User Manual}, + organization = {PNI Sensor Corporation}, + note = {Document 1017252 r06}, + url = {https://www.pnicorp.com/wp-content/uploads/RM3100-RM2100-Sensor-Suite-User-Manual-V11.0.pdf} +} + +@article{schon2005marginalized, + title={Marginalized particle filters for mixed linear/nonlinear state-space models}, + author={Sch{\"o}n, Thomas and Gustafsson, Fredrik and Nordlund, Per-Johan}, + journal={IEEE Transactions on Signal Processing}, + volume={53}, + number={7}, + pages={2279--2289}, + year={2005}, + publisher={IEEE} +} + +@software{strapdown-rs, + author = {Brodovsky, James}, + title = {strapdown-rs: Strapdown Inertial Navigation and {GNSS}-Degradation Simulation in {Rust}}, + year = {2026}, + url = {https://github.com/jbrodovsky/strapdown-rs}, + note = {Submitted to the Journal of Open Source Software}, +} + +@book{titterton2004strapdown, + author = {Titterton, David H. and Weston, John L.}, + publisher = {The Institution of Engineering and Technology}, + title = {Strapdown Inertial Navigation Technology}, + year = {2004} +} + +@INPROCEEDINGS{ukf-1, + author={Wan, E.A. and Van Der Merwe, R.}, + booktitle={Proceedings of the IEEE 2000 Adaptive Systems for Signal Processing, Communications, and Control Symposium (Cat. No.00EX373)}, + title={The unscented Kalman filter for nonlinear estimation}, + year={2000}, + volume={}, + number={}, + pages={153-158}, + keywords={Nonlinear systems;Random variables;Nonlinear dynamical systems;Filters;Sampling methods;Taylor series;Computational complexity;Performance gain;Machine learning;Neural networks}, + doi={10.1109/ASSPCC.2000.882463} +} + +@inbook{ukf-2, + author = {Wan, Eric A. and van der Merwe, Rudolph}, + publisher = {John Wiley and Sons, Ltd}, + isbn = {9780471221548}, + title = {The Unscented Kalman Filter}, + booktitle = {Kalman Filtering and Neural Networks}, + chapter = {7}, + pages = {221-280}, + doi = {https://doi.org/10.1002/0471221546.ch7}, + url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/0471221546.ch7}, + eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/0471221546.ch7}, + year = {2001}, + keywords = {unscented Kalman filter, optimal recursive estimation, EKF, UKF parameter estimation, dual estimation, particle filter, UPF experiments}, + +} + +@ARTICLE{ukf-4, + author={Julier, S.J. and Uhlmann, J.K.}, + journal={Proceedings of the IEEE}, + title={Unscented filtering and nonlinear estimation}, + year={2004}, + volume={92}, + number={3}, + pages={401-422}, + keywords={Filtering;Nonlinear systems;Target tracking;Control systems;Particle tracking;Kalman filters;Vehicles;Navigation;Chemical processes;Nonlinear control systems}, + doi={10.1109/JPROC.2003.823141}} + +@article{wdmam, + title={Building the second version of the world digital magnetic anomaly map (WDMAM)}, + author={Lesur, Vincent and Hamoudi, Mohamed and Choi, Yujin and Dyment, J{\'e}r{\^o}me and Th{\'e}bault, Erwan}, + journal={Earth, Planets and Space}, + volume={68}, + number={1}, + pages={27}, + year={2016}, + publisher={Springer} +} + +@article{wilcoxon1945individual, + author = {Wilcoxon, Frank}, + title = {Individual Comparisons by Ranking Methods}, + journal = {Biometrics Bulletin}, + volume = {1}, + number = {6}, + pages = {80--83}, + year = {1945}, + doi = {10.2307/3001968} +} + +@article{williams2001towards_tan, + author = { Stefan Williams and Gamini Dissanayake and Hugh Durrant-Whyte }, + title = {Towards terrain-aided navigation for underwater robotics}, + journal = {Advanced Robotics}, + volume = {15}, + number = {5}, + pages = {533-549}, + year = {2001}, + publisher = {Taylor \& Francis}, + doi = {10.1163/156855301317033559}, + URL = {https://doi.org/10.1163/156855301317033559}, + eprint = {https://doi.org/10.1163/156855301317033559}, +} + +@misc{wmm, + author = {{NOAA NCEI Geomagnetic Modeling Team and British Geological Survey}}, + title = {World Magnetic Model 2025}, + year = {2024}, + publisher = {NOAA National Centers for Environmental Information}, + doi = {10.25921/aqfd-sd83}, + url = {https://www.ncei.noaa.gov/products/world-magnetic-model} +} + +@techreport{wmm2020, + author = {Chulliat, A. and Brown, W. and Alken, P. and Beggan, C. and Nair, M. and Cox, G. and Woods, A. and Macmillan, S. and Meyer, B. and Paniccia, M.}, + title = {The {US/UK} World Magnetic Model for 2020--2025: Technical Report}, + institution = {National Centers for Environmental Information, NOAA}, + year = {2020}, + doi = {10.25923/ytk1-yx35} +} + +@article{yu2015sins, + author = {Yu, Ruihang and Cai, Shaokun and Wu, Meiping and Cao, Juliang and Zhang, Kaidong}, + title = {An {SINS/GNSS} Ground Vehicle Gravimetry Test Based on {SGA-WZ02}}, + journal = {Sensors}, + volume = {15}, + number = {9}, + pages = {23477--23495}, + year = {2015}, + doi = {10.3390/s150923477} +} + +@phdthesis{brodovsky2026dissertation, + author = {Brodovsky, James}, + title = {Geophysical Anomaly-Aided Inertial Navigation with {MEMS}-Grade Sensors}, + school = {Temple University}, + address = {Philadelphia, PA}, + year = {2026}, + type = {Doctoral dissertation}, +} diff --git a/papers/anom_combined/scripts/build_figures.py b/papers/anom_combined/scripts/build_figures.py new file mode 100644 index 00000000..bdd630df --- /dev/null +++ b/papers/anom_combined/scripts/build_figures.py @@ -0,0 +1,609 @@ +"""Draw the manuscript's figures into ``figures/``. + +Run from anywhere: ``uv run --with scipy python papers/anom_combined/scripts/build_figures.py``. +Every figure is computed from the experiment outputs and inputs under ``STRAPDOWN_DATA`` +(see ``stats.py``); nothing is copied from an earlier rendering. Errors are horizontal +great-circle distances to the recorded GNSS fix, evaluated on the rows that carry one, which +is how ``analyze performance`` scores a run. +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +import matplotlib as mpl +import matplotlib.pyplot as plt +import netCDF4 +import numpy as np +import pandas as pd + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +import stats # noqa: E402 + +FIGURES = Path(__file__).resolve().parent.parent / "figures" +EXAMPLE = "2025-03-01_16-46-39" +EARTH_RADIUS_M = 6_371_008.8 +WIDTH_IN = 6.5 + +# Categorical slots 1-3 of the validated reference palette, which pass the all-pairs CVD +# check; each filter also carries its own marker so identity is never colour alone. +COLOR = {"ekf": "#2a78d6", "ukf": "#eb6834", "rbpf": "#1baf7a"} +MARKER = {"ekf": "o", "ukf": "s", "rbpf": "^"} +INK = "#0b0b0b" +MUTED = "#52514e" +GRID = "#d9d8d4" + +mpl.rcParams.update( + { + "font.family": "serif", + "font.serif": ["Times New Roman", "Liberation Serif", "DejaVu Serif"], + "mathtext.fontset": "stix", + "font.size": 8.5, + "axes.titlesize": 8.5, + "axes.labelsize": 8.5, + "legend.fontsize": 7.5, + "xtick.labelsize": 7.5, + "ytick.labelsize": 7.5, + "axes.edgecolor": MUTED, + "axes.labelcolor": INK, + "xtick.color": MUTED, + "ytick.color": MUTED, + "axes.grid": True, + "grid.color": GRID, + "grid.linewidth": 0.5, + "axes.axisbelow": True, + "axes.spines.top": False, + "axes.spines.right": False, + "lines.linewidth": 1.0, + "savefig.bbox": "tight", + "savefig.pad_inches": 0.02, + "pdf.fonttype": 42, + } +) + + +# -------------------------------------------------------------------------------------------- +# Loading + + +def trajectories() -> list[str]: + """The 27 trajectory stems, sorted.""" + return sorted(stats.dataset_summary().index) + + +def read_input(stem: str, arm: str = "dedicated") -> pd.DataFrame: + """Preprocessed input records, indexed by elapsed seconds (rounded to 0.1 s).""" + directory = stats.DATA / ("input" if arm == "dedicated" else "input_real") + frame = pd.read_csv(directory / f"{stem}.csv") + time = pd.to_datetime(frame["time"], utc=True, format="mixed") + frame["elapsed"] = ((time - time.iloc[0]).dt.total_seconds()).round(1) + return frame.set_index("elapsed") + + +def read_output(arm: str, filt: str, scenario: str, stem: str) -> pd.DataFrame: + """Navigation output of one run, indexed by elapsed seconds (rounded to 0.1 s).""" + path = stats.arm_dir(arm) / filt / scenario / f"{stem}.csv" + columns = ["timestamp", "latitude", "longitude", "latitude_cov", "longitude_cov"] + frame = pd.read_csv(path, usecols=columns) + time = pd.to_datetime(frame["timestamp"], utc=True, format="mixed") + frame["elapsed"] = ((time - time.iloc[0]).dt.total_seconds()).round(1) + return frame.set_index("elapsed") + + +def haversine_m(lat1, lon1, lat2, lon2) -> np.ndarray: + """Great-circle distance in metres between degree coordinates.""" + lat1, lon1, lat2, lon2 = ( + np.radians(np.asarray(x, dtype=float)) for x in (lat1, lon1, lat2, lon2) + ) + a = ( + np.sin((lat2 - lat1) / 2) ** 2 + + np.cos(lat1) * np.cos(lat2) * np.sin((lon2 - lon1) / 2) ** 2 + ) + return 2 * EARTH_RADIUS_M * np.arcsin(np.sqrt(np.clip(a, 0.0, 1.0))) + + +def horizontal_error(output: pd.DataFrame, records: pd.DataFrame) -> pd.Series: + """Horizontal error of a run against the recorded GNSS fixes, by elapsed time. + + Output latitude and longitude are in degrees (the CSV writer converts); the result is + indexed by elapsed time and has one value per GNSS-bearing record. + """ + truth = records[["latitude", "longitude"]].dropna() + joined = truth.join(output[["latitude", "longitude"]], rsuffix="_est", how="inner") + error = haversine_m( + joined["latitude"], joined["longitude"], joined["latitude_est"], joined["longitude_est"] + ) + return pd.Series(error, index=joined.index) + + +def save(fig: plt.Figure, name: str) -> None: + """Write a vector PDF.""" + FIGURES.mkdir(exist_ok=True) + fig.savefig(FIGURES / f"{name}.pdf") + plt.close(fig) + print(f"wrote figures/{name}.pdf") + + +# -------------------------------------------------------------------------------------------- +# Figure: maps and tracks + + +def read_tile(stem: str, field: str) -> tuple[np.ndarray, np.ndarray, np.ndarray]: + """Latitude, longitude and anomaly grid of one cropped map tile.""" + with netCDF4.Dataset(stats.DATA / "input" / f"{stem}_{field}.nc") as data: + return ( + data["lat"][:].filled(np.nan), + data["lon"][:].filled(np.nan), + data["z"][:].filled(np.nan), + ) + + +def figure_maps() -> None: + """WDMAM and IGPP tiles with the 27 tracks drawn over them.""" + fig, axes = plt.subplots(1, 2, figsize=(WIDTH_IN, 2.6), constrained_layout=True) + panels = ( + ("magnetic", "nT", 250.0, "(a) WDMAM magnetic anomaly, 3 arc-min"), + ("gravity", "mGal", 50.0, "(b) IGPP free-air gravity anomaly, 1 arc-min"), + ) + tracks = { + stem: read_input(stem)[["latitude", "longitude"]].dropna().iloc[::20] + for stem in trajectories() + } + for ax, (field, unit, limit, title) in zip(axes, panels, strict=True): + mesh = None + for stem in trajectories(): + lat, lon, grid = read_tile(stem, field) + mesh = ax.pcolormesh( + lon, + lat, + grid, + cmap="RdBu_r", + vmin=-limit, + vmax=limit, + shading="nearest", + rasterized=True, + ) + for track in tracks.values(): + ax.plot(track["longitude"], track["latitude"], color=INK, linewidth=0.6) + ax.set_aspect(1.0 / np.cos(np.radians(40.3))) + ax.set_title(title, loc="left") + ax.set_xlabel("Longitude (deg)") + ax.grid(False) + fig.colorbar(mesh, ax=ax, shrink=0.85, label=unit, extend="both") + axes[0].set_ylabel("Latitude (deg)") + save(fig, "fig_maps") + + +# -------------------------------------------------------------------------------------------- +# Figure: residuals against the map + + +def residuals(arm: str) -> pd.DataFrame: + """Per-sample anomaly residuals with each trajectory's own median removed.""" + frame = pd.read_csv( + stats.arm_dir(arm) / "geostats" / "geo_residuals.csv", + usecols=["trajectory", "field", "residual", "map"], + ) + grouped = frame.groupby(["trajectory", "field"]) + frame["centred"] = frame["residual"] - grouped["residual"].transform("median") + frame["map_centred"] = frame["map"] - grouped["map"].transform("mean") + return frame + + +def figure_residuals() -> None: + """Residual spread against the map signal, phone vs dedicated sensors, per field.""" + fig, axes = plt.subplots(2, 2, figsize=(WIDTH_IN, 3.6), constrained_layout=True) + data = {arm: residuals(arm) for arm in ("phone", "dedicated")} + layout = ( + ("gravity", "mGal", ("Smartphone", "ADXL355")), + ("magnetic", "nT", ("Smartphone", "RM3100")), + ) + for row, (field, unit, names) in enumerate(layout): + for col, arm in enumerate(("phone", "dedicated")): + ax = axes[row, col] + frame = data[arm][data[arm]["field"] == field] + resid = frame["centred"].to_numpy() + signal = frame["map_centred"].to_numpy() + spread = 1.4826 * np.median(np.abs(resid)) + span = max(4.0 * spread, 4.0 * np.std(signal)) + bins = np.linspace(-span, span, 81) + ax.hist( + resid, + bins=bins, + density=True, + color=COLOR["ekf"], + alpha=0.85, + label="Residual about its median", + ) + ax.hist( + signal, + bins=bins, + density=True, + histtype="step", + color=INK, + linewidth=1.0, + label="Map anomaly along track", + ) + ax.set_title(f"({'abcd'[2 * row + col]}) {names[col]} {field}", loc="left") + ax.set_xlabel(f"{unit}") + ax.set_yticks([]) + ax.text( + 0.98, + 0.95, + f"robust $\\sigma$ = {spread:,.1f} {unit}\npooled map $\\sigma$ = {np.std(signal):,.1f} {unit}", + transform=ax.transAxes, + ha="right", + va="top", + fontsize=7, + color=INK, + ) + axes[0, 0].legend(loc="upper left", frameon=False, fontsize=6.5) + save(fig, "fig_residuals") + + +# -------------------------------------------------------------------------------------------- +# Figure: why the smartphone channels carry no map information + + +def figure_phone_sensors() -> None: + """Pinned gravity norm and heading-dependent magnetic intensity on the example drive.""" + records = read_input(EXAMPLE, arm="phone") + resid = pd.read_csv(stats.DATA / "output_real2" / "geostats" / "geo_residuals.csv") + resid = resid[resid["trajectory"] == EXAMPLE] + + fig, axes = plt.subplots(1, 2, figsize=(WIDTH_IN, 2.4), constrained_layout=True) + norm = np.sqrt(records["grav_x"] ** 2 + records["grav_y"] ** 2 + records["grav_z"] ** 2) + ceiling = norm.max() + minutes = records.index.to_numpy() / 60.0 + gravity_map = resid[resid["field"] == "gravity"] + ax = axes[0] + ax.plot( + minutes, + (norm - ceiling) * 1e5, + color=COLOR["ekf"], + linewidth=0.4, + label=r"$\|\mathbf{g}_\mathrm{obs}\|$ less its maximum", + ) + ax.plot( + gravity_map["elapsed_s"] / 60.0, + gravity_map["map"] - gravity_map["map"].mean(), + color=INK, + linewidth=1.0, + label="Map anomaly along track (mean removed)", + ) + ax.set_ylim(-150, 60) + ax.set_xlabel("Time (min)") + ax.set_ylabel("mGal") + pinned = np.mean((ceiling - norm) * 1e5 < 1.0) + ax.set_title( + f"(a) Gravity: norm pinned at {ceiling:.6f} m/s$^2$ ({100 * pinned:.0f}% within 1 mGal)", + loc="left", + ) + ax.legend(loc="lower left", frameon=False, fontsize=6.5) + + magnetic = resid[resid["field"] == "magnetic"] + ax = axes[1] + ax.plot( + magnetic["elapsed_s"] / 60.0, + (magnetic["measured"] - magnetic["measured"].median()) / 1000.0, + color=COLOR["ekf"], + linewidth=0.4, + label=r"$\|\mathbf{B}_\mathrm{obs}\| - F_\mathrm{WMM}$ (median removed)", + ) + ax.plot( + magnetic["elapsed_s"] / 60.0, + (magnetic["map"] - magnetic["map"].mean()) / 1000.0, + color=INK, + linewidth=1.0, + label="Map anomaly along track (mean removed)", + ) + ax.set_xlabel("Time (min)") + ax.set_ylabel(r"$\mu$T") + ax.set_title("(b) Magnetic: observed intensity varies by microtesla", loc="left") + ax.legend(loc="upper left", frameon=False, fontsize=6.5) + save(fig, "fig_phone_sensors") + + +# -------------------------------------------------------------------------------------------- +# Figure: baselines + + +def figure_baselines() -> None: + """Per-trajectory horizontal RMSE of each unaided filter with full and degraded GNSS.""" + fig, ax = plt.subplots(figsize=(WIDTH_IN, 2.3), constrained_layout=True) + rows = [] + for scenario, label in (("truth", "full GNSS"), ("degraded", "GNSS every 60 s")): + for filt in stats.FILTERS: + rows.append((filt, scenario, f"{stats.FILTER_LABEL[filt]}, {label}")) + rng = np.random.default_rng(1) + for y, (filt, scenario, _) in enumerate(rows): + values = stats.performance("dedicated", filt, scenario)[ + "RMSE Horizontal Error (m)" + ].to_numpy() + jitter = rng.uniform(-0.18, 0.18, values.size) + ax.scatter( + values, + y + jitter, + s=12, + marker=MARKER[filt], + facecolor=COLOR[filt], + edgecolor="white", + linewidth=0.4, + zorder=3, + ) + median = np.median(values) + ax.plot([median, median], [y - 0.32, y + 0.32], color=INK, linewidth=1.4, zorder=4) + ax.set_xscale("log") + ax.set_yticks(range(len(rows)), [r[2] for r in rows]) + ax.invert_yaxis() + ax.set_xlabel("Horizontal RMSE against the recorded GNSS track (m); bar = median") + ax.grid(axis="y", visible=False) + save(fig, "fig_baselines") + + +# -------------------------------------------------------------------------------------------- +# Figure: paired ratios + + +def figure_ratios() -> None: + """Per-trajectory aided/unaided RMSE ratio for the Kalman filters, both observation sets.""" + fig, axes = plt.subplots(1, 2, figsize=(WIDTH_IN, 2.5), constrained_layout=True) + rng = np.random.default_rng(2) + for ax, arm, title in ( + (axes[0], "phone", "(a) Smartphone observations"), + (axes[1], "dedicated", "(b) Dedicated sensors (ADXL355, RM3100)"), + ): + ticks, labels = [], [] + for i, filt in enumerate(("ekf", "ukf")): + for j, channel in enumerate(stats.CHANNELS): + x = i * 3.6 + j + frame = stats.detailed(arm, filt, channel) + ratio = (frame["geo_rmse"] / frame["baseline_rmse"]).to_numpy() + summary = stats.paired(arm, filt, channel) + ax.scatter( + x + rng.uniform(-0.22, 0.22, ratio.size), + ratio, + s=9, + marker=MARKER[filt], + facecolor=COLOR[filt], + edgecolor="white", + linewidth=0.3, + alpha=0.9, + zorder=3, + ) + ax.errorbar( + x + 0.36, + summary.ratio_median, + yerr=[ + [summary.ratio_median - summary.ratio_low], + [summary.ratio_high - summary.ratio_median], + ], + fmt="_", + color=INK, + markersize=8, + capsize=2, + linewidth=1.0, + zorder=4, + ) + ticks.append(x) + labels.append( + f"{stats.FILTER_LABEL[filt]}\n{ {'grav': 'Grav.', 'mag': 'Mag.', 'both': 'Comb.'}[channel] }" + ) + ax.axhline(1.0, color=MUTED, linewidth=0.8, zorder=2) + ax.set_xticks(ticks, labels) + ax.set_title(title, loc="left") + ax.grid(axis="x", visible=False) + axes[0].set_ylabel("Aided / unaided horizontal RMSE") + axes[0].ticklabel_format(axis="y", useOffset=False) + save(fig, "fig_ratios") + + +# -------------------------------------------------------------------------------------------- +# Figure: example drive + + +def figure_example() -> None: + """Aided minus unaided EKF error on the example drive, phone vs RM3100, on one scale.""" + records = read_input(EXAMPLE) + fig, axes = plt.subplots( + 2, 1, figsize=(WIDTH_IN, 3.0), sharex=True, sharey=True, constrained_layout=True + ) + for ax, arm, title in ( + (axes[0], "phone", "(a) Smartphone magnetometer"), + (axes[1], "dedicated", "(b) Simulated RM3100 magnetometer"), + ): + unaided = horizontal_error(read_output(arm, "ekf", "degraded", EXAMPLE), records) + aided = horizontal_error(read_output(arm, "ekf", "mag", EXAMPLE), records) + diff = (aided - unaided).dropna() + minutes = diff.index.to_numpy() / 60.0 + ax.fill_between( + minutes, + 0, + diff.to_numpy(), + where=diff.to_numpy() < 0, + color=COLOR["rbpf"], + linewidth=0, + label="Aiding reduced the error", + ) + ax.fill_between( + minutes, + 0, + diff.to_numpy(), + where=diff.to_numpy() >= 0, + color=COLOR["ukf"], + linewidth=0, + label="Aiding increased the error", + ) + rmse_change = np.sqrt(np.mean(aided**2)) - np.sqrt(np.mean(unaided**2)) + ax.set_title(f"{title}: RMSE change {rmse_change:+.1f} m", loc="left") + ax.set_ylabel("Error change (m)") + ax.axhline(0, color=MUTED, linewidth=0.6) + axes[1].set_xlabel("Time (min)") + axes[0].legend(loc="upper left", frameon=False, ncol=2) + save(fig, "fig_example") + + +# -------------------------------------------------------------------------------------------- +# Figure: RBPF divergence + + +def figure_rbpf() -> None: + """RBPF error and reported uncertainty under 60 s GNSS against the EKF, on the example.""" + records = read_input(EXAMPLE) + output = read_output("dedicated", "rbpf", "degraded", EXAMPLE) + error = horizontal_error(output, records) + ekf = horizontal_error(read_output("dedicated", "ekf", "degraded", EXAMPLE), records) + full = horizontal_error(read_output("dedicated", "rbpf", "truth", EXAMPLE), records) + lat = np.radians(records["latitude"].ffill().reindex(output.index).ffill().to_numpy()) + sigma = np.sqrt( + output["latitude_cov"].clip(lower=0) * EARTH_RADIUS_M**2 + + output["longitude_cov"].clip(lower=0) * (EARTH_RADIUS_M * np.cos(lat)) ** 2 + ) + fig, ax = plt.subplots(figsize=(WIDTH_IN, 2.4), constrained_layout=True) + ax.plot(error.index / 60.0, error, color=COLOR["rbpf"], label="RBPF error, GNSS every 60 s") + ax.plot( + output.index / 60.0, + sigma, + color=COLOR["rbpf"], + linestyle="--", + linewidth=0.8, + label=r"RBPF reported horizontal 1$\sigma$", + ) + ax.plot(ekf.index / 60.0, ekf, color=COLOR["ekf"], label="EKF error, GNSS every 60 s") + ax.plot(full.index / 60.0, full, color=MUTED, linewidth=0.6, label="RBPF error, full GNSS") + ax.set_yscale("log") + ax.set_xlabel("Time (min)") + ax.set_ylabel("Horizontal (m)") + ax.legend(loc="lower left", bbox_to_anchor=(0.0, 1.0), frameon=False, ncol=4, fontsize=7) + save(fig, "fig_rbpf") + + +# -------------------------------------------------------------------------------------------- +# Figure: localization bound + + +def bilinear_gradient( + lat: np.ndarray, lon: np.ndarray, grid: np.ndarray, plat: np.ndarray, plon: np.ndarray +) -> np.ndarray: + """Gradient magnitude, per km, of the bilinear interpolant at each track point. + + This is the derivative the filters' map model has: each point is located in its grid + cell and the bilinear surface of that cell is differentiated at the point's fractional + position. Points outside the tile are NaN. + """ + i = np.searchsorted(lat, plat, side="right") - 1 + j = np.searchsorted(lon, plon, side="right") - 1 + inside = (i >= 0) & (i < lat.size - 1) & (j >= 0) & (j < lon.size - 1) + i = np.clip(i, 0, lat.size - 2) + j = np.clip(j, 0, lon.size - 2) + cell_lat = lat[i + 1] - lat[i] + cell_lon = lon[j + 1] - lon[j] + t_lat = (plat - lat[i]) / cell_lat + t_lon = (plon - lon[j]) / cell_lon + f00, f01 = grid[i, j], grid[i, j + 1] + f10, f11 = grid[i + 1, j], grid[i + 1, j + 1] + per_deg_north = ((1 - t_lon) * (f10 - f00) + t_lon * (f11 - f01)) / cell_lat + per_deg_east = ((1 - t_lat) * (f01 - f00) + t_lat * (f11 - f10)) / cell_lon + km_per_deg = np.radians(1.0) * EARTH_RADIUS_M / 1000.0 + north = per_deg_north / km_per_deg + east = per_deg_east / (km_per_deg * np.cos(np.radians(plat))) + return np.where(inside, np.hypot(north, east), np.nan) + + +def median_gradients() -> dict[str, float]: + """Pooled median map-gradient magnitude along the 27 tracks, per field.""" + result = {} + for field in ("gravity", "magnetic"): + values = [] + for stem in trajectories(): + track = read_input(stem)[["latitude", "longitude"]].dropna() + lat, lon, grid = read_tile(stem, field) + values.append( + bilinear_gradient( + lat, lon, grid, track["latitude"].to_numpy(), track["longitude"].to_numpy() + ) + ) + result[field] = float(np.nanmedian(np.concatenate(values))) + return result + + +def write_bound_macros( + gradients: dict[str, float], bounds: list[float], degraded_km: float +) -> None: + """Gradient, scale and noise-requirement numbers quoted in the text, as LaTeX macros.""" + names = ("phonemag", "phonegrav", "adxl", "rmthree") + values = { + "gradgrav": f"{gradients['gravity']:.2f}", + "gradmag": f"{gradients['magnetic']:.2f}", + "degradedkm": f"{degraded_km:.2f}", + "reqgrav": f"{degraded_km * gradients['gravity']:.1f}", + "reqmag": f"{degraded_km * gradients['magnetic']:.1f}", + } + for name, bound in zip(names, bounds, strict=True): + values[f"scale{name}"] = f"{bound:,.1f}" if bound < 10 else f"{bound:,.0f}" + lines = [ + f"\\newcommand{{\\bound{key}}}{{{value.replace(',', '{,}')}}}" + for key, value in sorted(values.items()) + ] + (FIGURES.parent / "tables" / "bound_numbers.tex").write_text("\n".join(lines) + "\n") + + +def figure_bound(gradients: dict[str, float]) -> None: + """Noise over map gradient for each observation, against the degraded-GNSS error.""" + phone = stats.geostats("phone") + entries = [ + ("Smartphone magnetic", phone["magnetic"]["within_sigma"], "magnetic"), + ("Smartphone gravity", phone["gravity"]["within_sigma"], "gravity"), + ("ADXL355 gravity (simulated)", 54.8208, "gravity"), + ("RM3100 magnetic (simulated)", 3.91675, "magnetic"), + ] + bounds = [noise / gradients[field] for _, noise, field in entries] + degraded_km = stats.baseline("dedicated", "ekf", "degraded")["h_median"] / 1000.0 + write_bound_macros(gradients, bounds, degraded_km) + fig, ax = plt.subplots(figsize=(WIDTH_IN, 1.8), constrained_layout=True) + ax.barh(range(len(entries)), bounds, color=[MUTED, MUTED, MUTED, COLOR["ekf"]], height=0.55) + for y, value in enumerate(bounds): + ax.text( + value * 1.12, + y, + f"{value:,.1f} km" if value < 10 else f"{value:,.0f} km", + va="center", + fontsize=7, + color=INK, + ) + ax.axvline( + degraded_km, + color=COLOR["ukf"], + linewidth=1.2, + label=f"EKF degraded-GNSS median error, {degraded_km:.2f} km", + ) + ax.legend(loc="upper right", frameon=False, fontsize=7) + ax.set_xscale("log") + ax.set_xlim(0.1, 1e5) + ax.set_yticks(range(len(entries)), [e[0] for e in entries]) + ax.set_xlabel( + r"Single-update position scale along the gradient, $\sqrt{R}\,/\,|\nabla\mathcal{M}|$ (km)" + ) + ax.grid(axis="y", visible=False) + save(fig, "fig_bound") + print( + f"median gradients: gravity {gradients['gravity']:.2f} mGal/km, magnetic {gradients['magnetic']:.2f} nT/km" + ) + print("bounds (km):", {e[0]: round(b, 2) for e, b in zip(entries, bounds, strict=True)}) + + +def main() -> None: + """Draw every figure.""" + figure_maps() + figure_residuals() + figure_phone_sensors() + figure_baselines() + figure_ratios() + figure_example() + figure_rbpf() + figure_bound(median_gradients()) + + +if __name__ == "__main__": + main() diff --git a/papers/anom_combined/scripts/build_tables.py b/papers/anom_combined/scripts/build_tables.py new file mode 100644 index 00000000..7765c7ac --- /dev/null +++ b/papers/anom_combined/scripts/build_tables.py @@ -0,0 +1,258 @@ +"""Write the manuscript's data-derived LaTeX tables into ``tables/``. + +Run from anywhere: ``uv run --with scipy python papers/anom_combined/scripts/build_tables.py``. +Output is deterministic (fixed bootstrap seed), so a rerun on unchanged data is byte-identical. +Settings tables that restate configuration (degradation, filter tuning) are written by hand +in the section files, because they quote ``conf/*.toml`` rather than compute anything. +""" + +from __future__ import annotations + +import json +import sys +from pathlib import Path + +import numpy as np +import pandas as pd + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +import stats # noqa: E402 + +TABLES = Path(__file__).resolve().parent.parent / "tables" + + +def thousands(value: float, digits: int = 1) -> str: + """Format with a LaTeX thin-space-safe thousands separator.""" + text = f"{value:,.{digits}f}" + return text.replace(",", "{,}") + + +def metres_or_km(value: float) -> str: + """Metres below 10 km, kilometres above, so a diverged run reads as one.""" + if value >= 10_000.0: + return f"{thousands(value / 1000.0)}~km" + return thousands(value) + + +def p_text(p: float) -> str: + """Two significant figures, or a bound below 10^-3.""" + if p < 1e-3: + return r"\(<10^{-3}\)" + return f"{p:.2g}" + + +def snr_text(value: float) -> str: + """Two decimals below ten, one above.""" + return f"{value:.2f}" if value < 10.0 else f"{value:.1f}" + + +def write(name: str, body: str) -> None: + """Write one table fragment.""" + TABLES.mkdir(exist_ok=True) + (TABLES / name).write_text(body) + + +def dataset_table() -> None: + """Summary statistics of the 27 MEMS-Nav trajectories.""" + frame = stats.dataset_summary() + km = frame["Distance Traversed (km)"] + hours = frame["Duration (h)"] + rows = [ + ("Trajectories", f"{len(frame)}", ""), + ("Total", f"{thousands(km.sum(), 0)}~km", f"{hours.sum():.1f}~h"), + ("Median", f"{km.median():.1f}~km", f"{hours.median():.2f}~h"), + ("Mean", f"{km.mean():.1f}~km", f"{hours.mean():.2f}~h"), + ("Range", f"{km.min():.1f}--{km.max():.1f}~km", f"{hours.min():.2f}--{hours.max():.2f}~h"), + ] + lines = [r"\begin{tabular}{lrr}", r"\toprule", r" & Distance & Duration \\", r"\midrule"] + lines += [f"{a} & {b} & {c} \\\\" for a, b, c in rows] + lines += [r"\bottomrule", r"\end{tabular}", ""] + write("dataset.tex", "\n".join(lines)) + + +def baseline_table() -> None: + """Unaided horizontal RMSE with full and degraded GNSS, per filter.""" + lines = [ + r"\begin{tabular}{llrrrrr}", + r"\toprule", + r"Filter & GNSS & \(n\) & Median (m) & Mean (m) & Max (m) & Vert.\ median (m) \\", + r"\midrule", + ] + for filt in stats.FILTERS: + for scenario, label in (("truth", "Full"), ("degraded", "Degraded")): + b = stats.baseline("dedicated", filt, scenario) + name = stats.FILTER_LABEL[filt] if scenario == "truth" else "" + lines.append( + f"{name} & {label} & {b['n']} & {metres_or_km(b['h_median'])} & " + f"{metres_or_km(b['h_mean'])} & {metres_or_km(b['h_max'])} & " + f"{thousands(b['v_median'])} \\\\" + ) + if filt != stats.FILTERS[-1]: + lines.append(r"\midrule") + lines += [r"\bottomrule", r"\end{tabular}", ""] + write("baselines.tex", "\n".join(lines)) + + +def signal_sigma(arm: str, field: str) -> float: + """Median over trajectories of the along-track map standard deviation.""" + frame = pd.read_csv(stats.arm_dir(arm) / "geostats" / "geo_stats.csv") + return float(frame.loc[frame["field"] == field, "signal_sigma"].median()) + + +def error_model_table() -> None: + """Measured (phone) and datasheet (dedicated) anomaly error models.""" + synthetic = json.loads((stats.DATA / "input" / "synthetic.json").read_text())["sensors"] + lines = [ + r"\begin{tabular}{llrrrrl}", + r"\toprule", + r"Sensor & Field & Bias seed & \(\sqrt{R}\) & Prior \(\sigma\) & Signal \(\sigma\) & SNR \\", + r"\midrule", + ] + for arm, label in (("phone", "Smartphone"), ("dedicated", "Dedicated")): + pooled = stats.geostats(arm) + for field, unit in (("gravity", "mGal"), ("magnetic", "nT")): + entry = pooled[field] + if arm == "phone": + seed, noise, prior = ( + entry["bias_median"], + entry["within_sigma"], + entry["between_sigma"], + ) + else: + values = synthetic[field]["config_values"] + seed = values[f"{field}_bias"] + noise = values[f"{field}_noise_std"] + prior = values[f"{field}_bias_init_std"] + part = ( + {"gravity": "ADXL355", "magnetic": "RM3100"}[field] if arm == "dedicated" else label + ) + snr = f"{snr_text(entry['snr_median'])} ({snr_text(entry['snr_best'])})" + lines.append( + f"{part} & {field.capitalize()} ({unit}) & {thousands(seed)} & {thousands(noise)} & " + f"{thousands(prior)} & {signal_sigma(arm, field):.1f} & {snr} \\\\" + ) + if arm == "phone": + lines.append(r"\midrule") + lines += [r"\bottomrule", r"\end{tabular}", ""] + write("error_model.tex", "\n".join(lines)) + + +def aiding_cell(summary: stats.PairedSummary) -> str: + """Ratio [CI], B/W and p for one arm.""" + return ( + f"{summary.ratio_median:.3f} [{summary.ratio_low:.3f}, {summary.ratio_high:.3f}] & " + f"{summary.better}/{summary.worse} & {p_text(summary.p_value)}" + ) + + +def aiding_table() -> None: + """Paired aided/unaided results for the Kalman filters, both arms side by side.""" + lines = [ + r"\begin{tabular}{llccc@{\hspace{1.2em}}ccc}", + r"\toprule", + r" & & \multicolumn{3}{c}{Smartphone observations} & \multicolumn{3}{c}{Dedicated sensors} \\", + r"\cmidrule(lr){3-5}\cmidrule(lr){6-8}", + r"Filter & Aiding & Ratio [95\% CI] & B/W & \(p\) & Ratio [95\% CI] & B/W & \(p\) \\", + r"\midrule", + ] + for filt in ("ekf", "ukf"): + for channel in stats.CHANNELS: + phone = stats.paired("phone", filt, channel) + dedicated = stats.paired("dedicated", filt, channel) + name = stats.FILTER_LABEL[filt] if channel == "grav" else "" + lines.append( + f"{name} & {stats.CHANNEL_LABEL[channel]} & {aiding_cell(phone)} & " + f"{aiding_cell(dedicated)} \\\\" + ) + if filt == "ekf": + lines.append(r"\midrule") + lines += [r"\bottomrule", r"\end{tabular}", ""] + write("aiding.tex", "\n".join(lines)) + + +def rbpf_table() -> None: + """RBPF paired results, reported for completeness and labelled as non-interpretable.""" + lines = [ + r"\begin{tabular}{llrrcc}", + r"\toprule", + r"Observations & Aiding & \(n\) & Unaided median & Aided median & B/W \\", + r"\midrule", + ] + for arm, label in (("phone", "Smartphone"), ("dedicated", "Dedicated")): + for channel in stats.CHANNELS: + s = stats.paired(arm, "rbpf", channel) + name = label if channel == "grav" else "" + lines.append( + f"{name} & {stats.CHANNEL_LABEL[channel]} & {s.n} & {metres_or_km(s.unaided_median)} & " + f"{metres_or_km(s.aided_median)} & {s.better}/{s.worse} \\\\" + ) + if arm == "phone": + lines.append(r"\midrule") + lines += [r"\bottomrule", r"\end{tabular}", ""] + write("rbpf.tex", "\n".join(lines)) + + +def sensitivity_values() -> dict[str, str]: + """How far the two arms' unaided degraded-GNSS runs differ, per filter. + + The arms differ only in the norms of the gravity and magnetic vectors, so their unaided + runs differ only through the last bit of the heading input. Drives present in both arms + are compared; a change is counted when it exceeds 1% of the dedicated arm's RMSE. + """ + values: dict[str, str] = {} + for filt in stats.FILTERS: + phone = stats.performance("phone", filt, "degraded")["RMSE Horizontal Error (m)"] + dedicated = stats.performance("dedicated", filt, "degraded")["RMSE Horizontal Error (m)"] + common = phone.index.intersection(dedicated.index) + change = (phone[common] - dedicated[common]).abs() + relative = change / dedicated[common] + values[f"sens{filt}n"] = str(len(common)) + values[f"sens{filt}count"] = str(int((relative > 0.01).sum())) + values[f"sens{filt}maxm"] = thousands(change.max(), 0) + values[f"sens{filt}medianpct"] = f"{100 * relative.median():.0f}" + return values + + +def macros() -> None: + """Numbers quoted in running text, as macros, so prose cannot drift from the tables.""" + values: dict[str, str] = {} + for filt in stats.FILTERS: + for scenario in stats.SCENARIOS: + b = stats.baseline("dedicated", filt, scenario) + key = f"{filt}{scenario}".replace("truth", "full") + values[f"{key}median"] = metres_or_km(b["h_median"]) + values[f"{key}vmedian"] = thousands(b["v_median"]) + values[f"{key}n"] = str(b["n"]) + for arm in stats.ARMS: + for filt in stats.FILTERS: + for channel in stats.CHANNELS: + s = stats.paired(arm, filt, channel) + key = f"{arm}{filt}{channel}" + values[f"{key}ratio"] = f"{s.ratio_median:.3f}" + values[f"{key}better"] = str(s.better) + values[f"{key}worse"] = str(s.worse) + values[f"{key}n"] = str(s.n) + values[f"{key}dmed"] = thousands(abs(s.diff_median)) + values[f"{key}p"] = p_text(s.p_value) + values.update(sensitivity_values()) + dataset = stats.dataset_summary() + values["datasetkm"] = thousands(dataset["Distance Traversed (km)"].sum(), 0) + values["datasethours"] = f"{dataset['Duration (h)'].sum():.1f}" + lines = [f"\\newcommand{{\\num{name}}}{{{value}}}" for name, value in sorted(values.items())] + write("numbers.tex", "\n".join(lines) + "\n") + + +def main() -> None: + """Write every table.""" + np.seterr(all="raise") + dataset_table() + baseline_table() + error_model_table() + aiding_table() + rbpf_table() + macros() + print(f"wrote {sorted(p.name for p in TABLES.glob('*.tex'))}") + + +if __name__ == "__main__": + main() diff --git a/papers/anom_combined/scripts/phone_mechanism.py b/papers/anom_combined/scripts/phone_mechanism.py new file mode 100644 index 00000000..860275a3 --- /dev/null +++ b/papers/anom_combined/scripts/phone_mechanism.py @@ -0,0 +1,101 @@ +"""Quantify why the smartphone's gravity and magnetic readings carry no map information. + +Writes ``tables/phone_numbers.tex`` (LaTeX macros quoted in Section 6.3). Statistics, each a +median over drives: + +- the fraction of records whose gravity norm lies within 1 mGal of the drive's maximum, and + the set of maxima (device constants); +- the correlation and regression slope of the gravity norm against the map, both averaged + over 60 s blocks (a gravimeter would give a slope of one); +- the share of magnetic-intensity variance explained by vehicle course over ground, from a + least-squares fit of ``a + b cos(course) + c sin(course)`` on records moving faster than + 5 m/s, the amplitude of that heading term, and the intensity's standard deviation. +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +import numpy as np +import pandas as pd + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +import build_figures as bf # noqa: E402 +import stats # noqa: E402 + +BLOCK_S = 60.0 +MIN_SPEED_MPS = 5.0 + + +def gravity_statistics(stem: str, residuals: pd.DataFrame) -> dict[str, float]: + """Pinning and map agreement of the gravity norm on one drive.""" + records = bf.read_input(stem, arm="phone") + norm_mgal = ( + np.sqrt(records["grav_x"] ** 2 + records["grav_y"] ** 2 + records["grav_z"] ** 2) * 1e5 + ) + pinned = float(np.mean(norm_mgal.max() - norm_mgal < 1.0)) + gravity = residuals[ + (residuals["trajectory"] == stem) & (residuals["field"] == "gravity") + ].copy() + gravity["elapsed"] = gravity["elapsed_s"].round(1) + joined = gravity.set_index("elapsed").join(norm_mgal.rename("norm"), how="inner") + blocks = joined.groupby(joined["elapsed_s"] // BLOCK_S)[["norm", "map"]].mean() + result = {"pinned": pinned, "maximum": float(norm_mgal.max() / 1e5)} + if len(blocks) > 5 and blocks["norm"].std() > 0: + result["corr"] = float(np.corrcoef(blocks["norm"], blocks["map"])[0, 1]) + result["slope"] = float(np.polyfit(blocks["map"], blocks["norm"], 1)[0]) + return result + + +def magnetic_statistics(stem: str, residuals: pd.DataFrame) -> dict[str, float]: + """Heading dependence of the magnetic intensity on one drive.""" + records = bf.read_input(stem, arm="phone") + magnetic = residuals[ + (residuals["trajectory"] == stem) & (residuals["field"] == "magnetic") + ].copy() + magnetic["elapsed"] = magnetic["elapsed_s"].round(1) + moving = records.loc[records["speed"] > MIN_SPEED_MPS, ["bearing"]] + joined = magnetic.set_index("elapsed").join(moving, how="inner") + if len(joined) < 100: + return {} + course = np.radians(joined["bearing"].to_numpy()) + design = np.c_[np.ones(course.size), np.cos(course), np.sin(course)] + intensity = joined["measured"].to_numpy() + beta, *_ = np.linalg.lstsq(design, intensity, rcond=None) + fitted_residual = intensity - design @ beta + return { + "r2": float(1.0 - np.var(fitted_residual) / np.var(intensity)), + "amplitude": float(np.hypot(beta[1], beta[2])), + "spread": float(np.std(intensity)), + "map": float(np.std(joined["map"])), + } + + +def main() -> None: + """Compute the medians and write them as macros.""" + residuals = pd.read_csv(stats.DATA / "output_real2" / "geostats" / "geo_residuals.csv") + gravity = pd.DataFrame([gravity_statistics(stem, residuals) for stem in bf.trajectories()]) + magnetic = pd.DataFrame( + [m for stem in bf.trajectories() if (m := magnetic_statistics(stem, residuals))] + ) + maxima = sorted({round(v, 5) for v in gravity["maximum"]}) + values = { + "gravpinned": f"{100 * gravity['pinned'].median():.0f}", + "gravcorr": f"{gravity['corr'].median():.3f}", + "gravslope": f"{gravity['slope'].median():.2f}", + "gravcorrn": str(int(gravity["corr"].notna().sum())), + "magrsq": f"{100 * magnetic['r2'].median():.0f}", + "magamplitude": f"{magnetic['amplitude'].median() / 1000:.1f}", + "magspread": f"{magnetic['spread'].median() / 1000:.1f}", + "magmapsd": f"{magnetic['map'].median():.0f}", + "magn": str(len(magnetic)), + } + lines = [f"\\newcommand{{\\phone{name}}}{{{value}}}" for name, value in sorted(values.items())] + out = Path(__file__).resolve().parent.parent / "tables" / "phone_numbers.tex" + out.write_text("\n".join(lines) + "\n") + print(values, "gravity maxima (m/s^2):", maxima) + + +if __name__ == "__main__": + main() diff --git a/papers/anom_combined/scripts/rbpf_diagnostics.py b/papers/anom_combined/scripts/rbpf_diagnostics.py new file mode 100644 index 00000000..3bafb94c --- /dev/null +++ b/papers/anom_combined/scripts/rbpf_diagnostics.py @@ -0,0 +1,80 @@ +"""Aggregate diagnostics of the unaided RBPF under degraded GNSS (Section 6.5). + +Writes ``tables/rbpf_numbers.tex``. Pooling, over the dedicated-sensor arm's +``rbpf/degraded`` runs that completed (a drive stopped by the health limit has no output and +is not counted): + +- **Crossing time**: per drive, the first elapsed time at which the horizontal error against + the recorded GNSS fix exceeds 10 km. Drives that never cross are excluded from the median + and counted separately. +- **Second-half medians**: per drive, over GNSS-bearing records later than half the drive's + duration, the median of the reported horizontal 1-sigma and the median horizontal error; + then the median of each across drives, and the median of their per-drive ratio. + +The reported 1-sigma combines the latitude and longitude variances (rad^2) on a sphere of +radius 6,371,008.8 m, which is how ``build_figures.figure_rbpf`` draws it. +""" + +from __future__ import annotations + +import sys +from pathlib import Path + +import numpy as np +import pandas as pd + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +import build_figures as bf # noqa: E402 +import stats # noqa: E402 + +CROSSING_M = 10_000.0 + + +def drive_diagnostics(stem: str) -> dict[str, float] | None: + """Crossing time and second-half statistics of one drive, or None if it did not run.""" + if not (stats.arm_dir("dedicated") / "rbpf" / "degraded" / f"{stem}.csv").exists(): + return None + records = bf.read_input(stem) + output = bf.read_output("dedicated", "rbpf", "degraded", stem) + error = bf.horizontal_error(output, records) + latitude = np.radians(records["latitude"].ffill().reindex(output.index).ffill().to_numpy()) + sigma = pd.Series( + np.sqrt( + output["latitude_cov"].clip(lower=0) * bf.EARTH_RADIUS_M**2 + + output["longitude_cov"].clip(lower=0) * (bf.EARTH_RADIUS_M * np.cos(latitude)) ** 2 + ), + index=output.index, + ) + joined = pd.concat([error.rename("error"), sigma.rename("sigma")], axis=1, join="inner") + joined = joined.dropna() + second_half = joined[joined.index > joined.index.max() / 2.0] + crossed = joined.index[joined["error"] > CROSSING_M] + return { + "crossing_min": float(crossed.min() / 60.0) if crossed.size else np.nan, + "sigma_m": float(second_half["sigma"].median()), + "error_m": float(second_half["error"].median()), + "ratio": float((second_half["error"] / second_half["sigma"]).median()), + } + + +def main() -> None: + """Compute the pooled diagnostics and write them as macros.""" + rows = [d for stem in bf.trajectories() if (d := drive_diagnostics(stem)) is not None] + frame = pd.DataFrame(rows) + crossed = frame["crossing_min"].dropna() + values = { + "drives": str(len(frame)), + "crossed": str(len(crossed)), + "crossingmin": f"{crossed.median():.0f}", + "sigmam": f"{frame['sigma_m'].median():.0f}", + "errorkm": f"{frame['error_m'].median() / 1000.0:,.0f}".replace(",", "{,}"), + "ratio": f"{frame['ratio'].median():,.0f}".replace(",", "{,}"), + } + lines = [f"\\newcommand{{\\rbpfdiag{key}}}{{{value}}}" for key, value in sorted(values.items())] + out = Path(__file__).resolve().parent.parent / "tables" / "rbpf_numbers.tex" + out.write_text("\n".join(lines) + "\n") + print(values) + + +if __name__ == "__main__": + main() diff --git a/papers/anom_combined/scripts/stats.py b/papers/anom_combined/scripts/stats.py new file mode 100644 index 00000000..0b2f26a8 --- /dev/null +++ b/papers/anom_combined/scripts/stats.py @@ -0,0 +1,171 @@ +"""Load the strapdown-rs experiment outputs and compute the paper's summary statistics. + +Every number in the manuscript is computed here from the CSVs that `just postprocess` and +`just geoperf-all` write. Nothing is copied from the dissertation, whose tables disagree with +each other in places (see NOTES.md). + +Data root: the `STRAPDOWN_DATA` environment variable, defaulting to the ``data/`` directory +at the root of the repository checkout that holds this script. Two arms are read: + +- ``phone``: the smartphone's own gravity and magnetometer readings (``output_real2``) +- ``dedicated``: the same drives with the anomaly norms replaced by the ADXL355 / RM3100 + datasheet sensor model (``output``) + +The inertial, barometric, heading and degraded-GNSS streams are identical in the two arms, +so the unaided runs coincide. +""" + +from __future__ import annotations + +import json +import os +from dataclasses import dataclass +from pathlib import Path + +import numpy as np +import pandas as pd +from scipy.stats import wilcoxon + +# papers/anom_combined/scripts/stats.py -> repository root is three levels up. +DATA = Path(os.environ.get("STRAPDOWN_DATA", Path(__file__).resolve().parents[3] / "data")) +ARMS = {"phone": "output_real2", "dedicated": "output"} +FILTERS = ("ekf", "ukf", "rbpf") +CHANNELS = ("grav", "mag", "both") +SCENARIOS = ("truth", "degraded") +FILTER_LABEL = {"ekf": "EKF", "ukf": "UKF", "rbpf": "RBPF"} +CHANNEL_LABEL = {"grav": "Gravity", "mag": "Magnetic", "both": "Combined"} +SUMMARY_ROWS = ("mean", "median", "std") +BOOTSTRAP_RESAMPLES = 10_000 +BOOTSTRAP_SEED = 20261002 + + +def arm_dir(arm: str) -> Path: + """Return the output directory of an arm.""" + return DATA / ARMS[arm] + + +def performance(arm: str, filt: str, scenario: str) -> pd.DataFrame: + """Per-trajectory error statistics of one run, without the summary rows.""" + path = arm_dir(arm) / filt / scenario / "performance" / "performance_summary.csv" + frame = pd.read_csv(path, index_col=0) + return frame.drop(index=[r for r in SUMMARY_ROWS if r in frame.index]) + + +def detailed(arm: str, filt: str, channel: str) -> pd.DataFrame: + """Aided-vs-own-unaided paired results of one filter and channel. + + The RBPF's are under ``analysis/rbpf`` (``analysis/ins`` scores it against the EKF). + Only trajectories present in both the aided and the unaided run appear, which is the + matched-set rule: a run that failed on either side is dropped, not scored. + """ + base = arm_dir(arm) / filt / channel / "analysis" + if filt == "rbpf": + base = base / "rbpf" + frame = pd.read_csv(base / f"{filt}_{channel}_detailed_results.csv") + return frame.set_index("trajectory").sort_index() + + +@dataclass(frozen=True) +class PairedSummary: + """Aided against unaided horizontal RMSE across the matched trajectories.""" + + n: int + unaided_median: float + unaided_mean: float + aided_median: float + aided_mean: float + ratio_median: float + ratio_low: float + ratio_high: float + better: int + worse: int + p_value: float + diff_median: float + + +def bootstrap_median_ci(values: np.ndarray, seed: int = BOOTSTRAP_SEED) -> tuple[float, float]: + """Percentile 95% bootstrap interval of the median.""" + rng = np.random.default_rng(seed) + draws = rng.choice(values, size=(BOOTSTRAP_RESAMPLES, values.size), replace=True) + medians = np.median(draws, axis=1) + low, high = np.percentile(medians, [2.5, 97.5]) + return float(low), float(high) + + +def paired(arm: str, filt: str, channel: str) -> PairedSummary: + """Summarise one filter/channel/arm cell of the aiding experiment.""" + frame = detailed(arm, filt, channel) + aided = frame["geo_rmse"].to_numpy() + unaided = frame["baseline_rmse"].to_numpy() + ratio = aided / unaided + diff = aided - unaided + low, high = bootstrap_median_ci(ratio) + nonzero = diff[diff != 0.0] + p_value = float(wilcoxon(nonzero).pvalue) if nonzero.size else 1.0 + return PairedSummary( + n=int(frame.shape[0]), + unaided_median=float(np.median(unaided)), + unaided_mean=float(np.mean(unaided)), + aided_median=float(np.median(aided)), + aided_mean=float(np.mean(aided)), + ratio_median=float(np.median(ratio)), + ratio_low=low, + ratio_high=high, + better=int(np.sum(diff < 0.0)), + worse=int(np.sum(diff > 0.0)), + p_value=p_value, + diff_median=float(np.median(diff)), + ) + + +def baseline(arm: str, filt: str, scenario: str) -> dict[str, float]: + """Horizontal and vertical RMSE statistics of an unaided run across trajectories.""" + frame = performance(arm, filt, scenario) + horizontal = frame["RMSE Horizontal Error (m)"] + vertical = frame["RMSE Vertical Error (m)"] + return { + "n": int(frame.shape[0]), + "h_median": float(horizontal.median()), + "h_mean": float(horizontal.mean()), + "h_std": float(horizontal.std()), + "h_min": float(horizontal.min()), + "h_max": float(horizontal.max()), + "v_median": float(vertical.median()), + } + + +def geostats(arm: str) -> dict[str, dict]: + """Pooled anomaly error statistics of an arm, keyed by field.""" + path = arm_dir(arm) / "geostats" / "geo_stats_pooled.json" + return {entry["field"]: entry for entry in json.loads(path.read_text())} + + +def dataset_summary() -> pd.DataFrame: + """Per-trajectory distance (km) and duration (h).""" + frame = pd.read_csv(DATA / "output" / "dataset_summary" / "dataset_summary.csv", index_col=0) + return frame.drop(index=[r for r in SUMMARY_ROWS if r in frame.index]) + + +def main() -> None: + """Print every cell, for cross-checking against the manuscript.""" + for arm in ARMS: + print(f"== {arm}") + for filt in FILTERS: + for scenario in SCENARIOS: + b = baseline(arm, filt, scenario) + print( + f" {filt:4s} {scenario:8s} n={b['n']:2d} " + f"med={b['h_median']:.1f} mean={b['h_mean']:.1f} std={b['h_std']:.1f}" + ) + for channel in CHANNELS: + s = paired(arm, filt, channel) + print( + f" {filt:4s} {channel:8s} n={s.n:2d} ratio={s.ratio_median:.3f} " + f"[{s.ratio_low:.3f},{s.ratio_high:.3f}] B/W={s.better}/{s.worse} " + f"p={s.p_value:.3g} dmed={s.diff_median:.1f} " + f"aided med={s.aided_median:.1f} mean={s.aided_mean:.1f}" + ) + + +if __name__ == "__main__": + main() diff --git a/papers/anom_combined/sections/00-abstract.tex b/papers/anom_combined/sections/00-abstract.tex new file mode 100644 index 00000000..a003d6b2 --- /dev/null +++ b/papers/anom_combined/sections/00-abstract.tex @@ -0,0 +1 @@ +Gravity and magnetic anomaly maps offer a position reference that cannot be jammed, and a vehicle-mounted smartphone already carries both an accelerometer and a magnetometer. This paper asks whether those readings, or the readings of comparably priced dedicated sensors, reduce the error of a smartphone-grade inertial navigation system (INS) when GNSS fixes arrive only once per minute with correlated errors. An extended Kalman filter (EKF), an unscented Kalman filter (UKF), and a Rao-Blackwellized particle filter (RBPF) after Canciani and Raquet are evaluated on 27 drives totalling \numdatasetkm~km and \numdatasethours~h, each aided run paired with the same filter's unaided run on an identical, seeded measurement stream. The paper corrects and supersedes two earlier conference papers by the authors, whose reported gains arose from unit errors in the anomaly measurement and from comparisons against diverged baselines. With the corrected models, the smartphone's own readings provide no measurable benefit to either Kalman filter (median RMSE ratio 1.000 to 1.001), because the operating system pins the gravity norm to a device constant and the magnetometer is dominated by the vehicle's field, giving signal-to-noise ratios of 0.13 and 0.01 against the maps. Replacing only those readings with a simulated RM3100 magnetometer reduces the median error by about 10\% (ratios \numdedicatedekfmagratio{} for the EKF and \numdedicatedukfmagratio{} for the UKF, improving \numdedicatedekfmagbetter{} and \numdedicatedukfmagbetter{} of 27 drives), whereas a simulated ADXL355 used as a gravimeter does not help. The RBPF loses track under the 60-s GNSS schedule with or without aiding. The quality of the anomaly measurement relative to the map signal, rather than the estimator or the inertial sensor, decides whether aiding helps. diff --git a/papers/anom_combined/sections/01-introduction.tex b/papers/anom_combined/sections/01-introduction.tex new file mode 100644 index 00000000..5e6f69f0 --- /dev/null +++ b/papers/anom_combined/sections/01-introduction.tex @@ -0,0 +1,26 @@ +\section{Introduction} +\label{sec:introduction} + +An inertial navigation system (INS) integrates specific force and angular rate into position, and its error grows without bound unless an external position or velocity reference arrests it. On most platforms that reference is GNSS, whose low received power makes it easy to deny by jamming, to corrupt by spoofing, and to lose in urban canyons, under foliage, indoors, and underwater \citep{humphreys2008, divis2013gps}. How quickly the INS error grows once GNSS is lost is set by the grade of the inertial sensor. A navigation-grade system coasts for tens of minutes before accumulating 100~m of error; the consumer-grade micro-electro-mechanical systems (MEMS) IMU found in a smartphone, a small drone, or a low-cost autonomous vehicle crosses the same threshold in under a minute \citep{groves_ch14}. For the platforms that carry such sensors, which vastly outnumber those carrying navigation-grade instruments, an alternative aiding source must be available continuously, everywhere the platform operates, and at a cost commensurate with the platform itself. + +Map-matching against the Earth's geophysical fields is one of the few alternatives that is present everywhere and at all times without depending on infrastructure. Terrain- and bathymetry-aided navigation are the most mature members of that family \citep{baker1977terrain, williams2001towards_tan, donovan2012}, but they require an active emission. Gravity and magnetic anomalies are sensed passively, and anomaly-aided navigation has been demonstrated with gravimeters on submarines and ground vehicles \citep{jircitano1991gravity, kamgar1999vehicle} and with survey magnetometers on aircraft \citep{canciani2016absolute, canciani2017airborne}. Every such demonstration, however, pairs a tactical- or navigation-grade INS with a specialized survey instrument. Whether the technique survives the replacement of both halves of that pairing, a MEMS IMU in place of the high-grade inertial system and commodity sensing in place of the survey instrument, has not been established. + +This paper addresses that question with three estimators on one body of data. An extended Kalman filter (EKF), an unscented Kalman filter (UKF), and a Rao-Blackwellized particle filter (RBPF) in the form of \citet{canciani2017airborne} are each aided with gravity anomaly, magnetic anomaly, or both, and each aided run is paired with the same filter's unaided run on the same drive. All three filters share one strapdown mechanization and one seeded measurement stream, so that the anomaly measurement is the only difference within a pair. The drives are the 27 trajectories of the MEMS-Nav dataset, \numdatasetkm~km and \numdatasethours~h of smartphone recordings on public roads in the Mid-Atlantic United States \citep{mems-nav-dataset}. GNSS is degraded to one fix per minute with correlated position and velocity errors, a regime in which the unaided EKF's median horizontal error is \numekfdegradedmedian~m against \numekffullmedian~m with full GNSS. The anomaly observations come from two sources: the gravity and magnetic readings that the smartphone itself records, and, as a control, simulated readings of two low-cost dedicated sensors substituted for them with everything else held fixed. + +\subsection{Relation to Earlier Work by the Authors} + +Preliminary versions of this work were presented at the 2026 ION International Technical Meeting, with a UKF \citep{anom-ukf}, and at the 2026 ION Pacific PNT Meeting, with an RBPF \citep{anom-pf}. Both reported that the smartphone's gravity and magnetic readings reduced navigation error, by tens to hundreds of meters for the UKF and by more than 1{,}500~km for the RBPF. Those results do not hold. An audit of the software found that the anomaly observation was formed with unit errors that left it unrelated to the maps, and that the comparisons were made against baselines that had themselves diverged. \Cref{sec:corrections} sets out each defect and its effect. This paper replaces the conference results in full: it uses the corrected measurement models, a larger dataset, a common GNSS degradation for every run, a paired statistical design, and a third estimator. Its conclusions about the smartphone sensors are the opposite of those reported earlier. + +\subsection{Contributions} + +The contributions of this paper are as follows. +\begin{enumerate} + \item A paired evaluation of EKF, UKF, and RBPF anomaly aiding of a consumer-grade MEMS INS on 27 ground-vehicle drives, in which every filter receives an identical, reproducible measurement stream and each aided run is scored against its own unaided counterpart. + \item A corrected formulation of the gravity and magnetic anomaly observations, with an error model measured from the data against the maps, and an explicit account of the defects that invalidated the authors' earlier conference results. + \item A null result for the smartphone's own sensors and its mechanism: the operating system pins the reported gravity norm to a device constant, and the vehicle's own magnetic field dominates the magnetometer, so both observations have signal-to-noise ratios far below one against the maps. + \item A controlled test with simulated dedicated sensors showing that a \$25 magnetometer makes magnetic aiding consistently beneficial for both Kalman filters with the same consumer-grade IMU, whereas a \$77 MEMS accelerometer used as a gravimeter does not, and that the size of the benefit is consistent with a simple single-update heuristic, the sensor noise divided by the map gradient. + \item A negative result for the particle filter, which loses track under once-per-minute GNSS with or without aiding, with a diagnosis of the failure. + \item An open-source implementation \citep{strapdown-rs} and dataset with which every number in this paper can be regenerated. +\end{enumerate} + +The remainder of the paper is organized as follows. \Cref{sec:corrections} documents the corrections to the conference results. \Cref{sec:navigation} describes the shared mechanization, the GNSS degradation model, and the three filters. \Cref{sec:geophysical} develops the anomaly measurement models and their error models. \Cref{sec:experiment} describes the data and the experimental design, and \Cref{sec:results} the results. \Cref{sec:discussion} discusses the sensor requirement that the results imply, the behavior of the particle filter, and the limitations of the study, and \Cref{sec:conclusion} concludes. diff --git a/papers/anom_combined/sections/02-corrections.tex b/papers/anom_combined/sections/02-corrections.tex new file mode 100644 index 00000000..c2da3809 --- /dev/null +++ b/papers/anom_combined/sections/02-corrections.tex @@ -0,0 +1,42 @@ +\section{Corrections to the Conference Results} +\label{sec:corrections} + +This section documents why the results of \citet{anom-ukf} and \citet{anom-pf} are withdrawn. Each defect below was confirmed by inspecting the software revisions used to produce those papers, and each has since been fixed in \texttt{strapdown-rs} with a regression test that fails if it is reintroduced. \Cref{tab:conference-vs-journal} summarizes how the experiment of this paper differs from those of the conference papers. + +\subsection{Anomaly Observations That Carried No Map Information} + +The gravity anomaly observation was formed as \(\lVert\mathbf{g}_\text{obs}\rVert - \gamma - E\) in m/s\(^2\) and then differenced against a map in mGal, a factor of \(10^5\) apart. Normal gravity \(\gamma\) was evaluated with the latitude in radians passed to a function that expects degrees, which places every observation at the equator and introduces an error of about \(-2{,}100\)~mGal at 40\(^\circ\)~N, and at the ellipsoid surface rather than at the observation height, which omits the free-air gradient of 0.31~mGal/m. The E\"{o}tv\"{o}s correction \(E\) was subtracted rather than added, doubling rather than removing the motion term, and used the radius of the parallel in place of the radii of curvature. The magnetic anomaly observation subtracted the World Magnetic Model (WMM) total intensity expressed in tesla, about \(5\times10^{-5}\), from an observed intensity in microtesla, so that no core field was removed, and differenced the result against a map in nanotesla. + +In both channels the quantity passed to the filter was therefore a number of order \(10^{-2}\) to \(10^{1}\) in the units of a map whose anomalies span tens to hundreds of units. The observation was effectively constant, and each update pulled the solution toward positions at which the map value plus the bias state matched that constant. The residual statistics reported in the conference papers, a magnetic standard deviation of 41{,}303~nT among them, describe this defective observation, not the sensors. + +\subsection{Comparisons Against Baselines That Differed or Had Diverged} + +In both conference papers the aided and unaided runs were produced by different code paths: the aided runs by an event-stream builder in the geophysical module that had diverged from the one used for the unaided runs. In the software used for \citet{anom-pf}, the unaided stream contained a magnetometer heading update that the aided stream lacked, so the two runs differed in more than the anomaly measurement. The GNSS error model was parameterized per fix rather than per unit time, which made its steady-state wander depend on the fix interval. + +The RBPF paper's headline improvement of about 1{,}566~km is a difference against an unaided RBPF whose own mean horizontal RMSE over the 21 drives was about 1{,}572~km, larger than any of the routes. Against the unaided UKF of the same paper, whose mean RMSE was about 7.1~km, the aided RBPF was better on 11 to 14 of 21 drives by RMSE and worse by per-drive median error. Neither comparison isolates the effect of the anomaly measurement. The RBPF of that paper also differed from the one evaluated here: each particle carried its own Kalman filter over 14 linear states including IMU biases, resampling was triggered by the effective sample size, and nothing prevented the cloud from collapsing onto a single ancestor. + +\begin{table}[htb] + \caption{The Experiment of This Paper Compared with Those of the Conference Papers} + \label{tab:conference-vs-journal} + \centering + \small + \begin{tabular}{p{0.20\textwidth}p{0.35\textwidth}p{0.37\textwidth}} + \toprule + & Conference papers \citep{anom-ukf, anom-pf} & This paper \\ + \midrule + Drives & 13 (UKF) and 21 (RBPF) & 27, all filters \\ + Record rate & 1~Hz & 10~Hz inertial, about 1~Hz GNSS \\ + GNSS degradation & AR(1) per fix, \(\rho\) = 0.99 / 0.95, \(\sigma\) = 5~m / 5~m/s, \(R\) inflated by \(15^2\) & One fix per 60~s; first-order Gauss--Markov errors, 35~m / 500~s and 1.5~m/s / 100~s; \(R\) inflated by \(5^2\) \\ + Gravity observation & Unit, latitude, height and E\"{o}tv\"{o}s defects (above) & \Cref{eqn:gravity-anomaly-obs} \\ + Magnetic observation & Raw intensity in \(\mu\)T, no core field removed & \Cref{eqn:magnetic-anomaly-obs}, WMM2020/2025 \\ + Anomaly error model & Statistics of the defective observation & Measured against the maps (\Cref{tab:error-model}) \\ + Filters & UKF; RBPF with a Kalman filter per particle & EKF, UKF; RBPF after \citet{canciani2017airborne} \\ + Comparison & Aided vs.\ separately built unaided runs & Aided vs.\ the same filter's unaided run on an identical stream; bootstrap CI and Wilcoxon test \\ + Control experiment & None & Simulated dedicated sensors (\Cref{sec:dedicated-sensors}) \\ + \bottomrule + \end{tabular} +\end{table} + +\subsection{What Survives} + +The software framework, the dataset, and the question posed by the conference papers stand. Their conclusions do not: with corrected observations the smartphone's sensors provide no benefit to any filter (\Cref{sec:results-phone}), and the particle filter, far from being the best-suited estimator, does not maintain a solution under the degraded GNSS scenario used here (\Cref{sec:results-rbpf}). Readers who have cited the conference papers for a quantitative benefit of smartphone-based anomaly aiding should cite this paper instead. diff --git a/papers/anom_combined/sections/03-navigation.tex b/papers/anom_combined/sections/03-navigation.tex new file mode 100644 index 00000000..8e30ff9a --- /dev/null +++ b/papers/anom_combined/sections/03-navigation.tex @@ -0,0 +1,100 @@ +\section{Navigation System} +\label{sec:navigation} + +All three filters share one strapdown mechanization, one set of GNSS, barometric, and heading measurement models, and one measurement stream, so that a comparison between filters, or between an aided run and its unaided counterpart, isolates the estimator or the anomaly measurement. Positions are WGS~84 geodetic latitude \(L\), longitude \(\lambda\), and ellipsoidal height \(h\); attitude is held as a direction cosine matrix \(\mathbf{C}_b^n\) and reported as roll, pitch, and yaw. The equations are written in north--east--down (NED) notation, following \citet{groves_ch5}. The Sensor Logger records, however, are resolved in an east--north--up (ENU) convention, and the run configurations declare it (\texttt{is\_enu = true}). In that convention \texttt{strapdown-rs} keeps the north and east components but takes vertical velocity positive up and uses the matching body-to-navigation attitude convention; it checks the declared frame against the sign of the specific force in the leading records and rejects a mismatch. A reproduction must declare ENU for these data. + +\subsection{Mechanization and Aiding Measurements} + +The mechanization is the local-navigation-frame strapdown algorithm of \citet[Sections~5.4--5.5]{groves_ch5}: the attitude update integrates the bias-corrected angular rate less the Earth and transport rates, the velocity update resolves the bias-corrected specific force into the navigation frame and adds the Somigliana normal gravity and the Coriolis and transport-rate terms, and position is integrated with the meridian and transverse radii of curvature. The Kalman filters estimate the fifteen states +\begin{equation} + \mathbf{x} = \begin{bmatrix} L & \lambda & h & v_N & v_E & v_D & \phi & \theta & \psi & \mathbf{b}_a^\top & \mathbf{b}_g^\top \end{bmatrix}^\top, + \label{eqn:state} +\end{equation} +where \(\mathbf{b}_a\) and \(\mathbf{b}_g\) are the accelerometer and gyroscope biases, together with a barometric-bias state that every run in this paper carries and, when aided, one map-bias state per anomaly channel (\Cref{sec:geophysical}). + +Three aiding sources are common to every run. GNSS is loosely coupled as a five-element observation of latitude, longitude, height, and north and east velocity, with a diagonal covariance built from the receiver's reported accuracies. The barometer supplies a relative altitude referenced to the first GNSS height, and the magnetometer supplies a once-per-second heading observation with a standard deviation of 0.2~rad. The heading observation is common to the aided and unaided runs, and so does not affect their comparison; its accuracy on this data is poor (\Cref{sec:limitations}). + +\subsection{GNSS Degradation} + +GNSS degradation is applied by replaying the recorded fixes through a seeded scheduler and fault model before any filter sees them, so that every filter and every aiding configuration receives an identical corrupted stream. The scheduler delivers one fix every \(T = 60\)~s. The fault model adds independent first-order Gauss--Markov errors to the north and east components of each delivered position and velocity, +\begin{equation} + \mathbf{e}_{k+1} = e^{-\Delta t_k/\tau}\,\mathbf{e}_k + \sigma\sqrt{1 - e^{-2\Delta t_k/\tau}}\;\mathbf{w}_k, \qquad \mathbf{w}_k \sim \mathcal{N}(\mathbf{0}, \mathbf{I}_2), + \label{eqn:gauss-markov} +\end{equation} +with \(\sigma = 35\)~m and \(\tau = 500\)~s for position and \(\sigma = 1.5\)~m/s and \(\tau = 100\)~s for velocity, where \(\Delta t_k\) is the interval between delivered fixes. Specifying the process by a steady-state standard deviation and a correlation time, rather than by a per-fix coefficient, makes its statistics independent of the fix interval. The receiver's reported standard deviations are inflated by a factor of five, so that the filter is told the fixes are degraded. Under this schedule the unaided EKF's median horizontal error rises from \numekffullmedian~m to \numekfdegradedmedian~m (\Cref{sec:results-baselines}). + +\subsection{Extended Kalman Filter} +\label{sec:ekf} + +The EKF propagates the full state through the mechanization and its covariance through the first-order discretization \(\mathbf{I} + \mathbf{F}\Delta t\) of the local-navigation-frame error-state model of \citet[Eqs.~14.63--14.71]{groves_ch14}, reordered position-first. Because the state holds Euler angles while Groves' attitude error is a rotation vector, every block that touches attitude is converted through the Euler-rate matrix \(\mathbf{E}(\bm{\Phi})\), whose columns are the navigation-frame directions of the roll, pitch, and yaw axes; without that conversion the filter diverged during development. The process noise is \(\mathbf{Q}_k = \mathbf{Q}_c\,\Delta t\) with the spectral densities of \Cref{tab:filter-settings}. The measurement update is the standard EKF update with the Jacobians of the GNSS, barometric, heading, and anomaly models. + +\subsection{Unscented Kalman Filter} +\label{sec:ukf} + +The UKF carries the same states, process noise, and measurement models, and replaces linearization by the scaled unscented transform \citep{ukf-1, ukf-2, ukf-4}. Its \(2n+1\) sigma points (35 with one anomaly channel, 37 with two) are propagated through the full mechanization, with attitude perturbed on the rotation manifold rather than in Euler angles. The scaling parameter is \(\alpha = 0.1\), with \(\beta = 2\) and \(\kappa = 0\); the textbook \(\alpha = 10^{-3}\) produces a central weight of order \(-10^{6}\) for this state dimension and loses about six significant digits per step to cancellation. For a measurement that is linear in the state the UKF update coincides with the EKF update, so the two filters differ chiefly in propagation and in the anomaly update, where the map enters nonlinearly. + +\subsection{Rao-Blackwellized Particle Filter} +\label{sec:rbpf} + +The RBPF is the marginalized particle filter of \citet{schon2005marginalized} in the form that \citet{canciani2017airborne} applied to airborne magnetic anomaly navigation. It is an error-state filter around a single nominal trajectory mechanized from every IMU sample. The vertical channel of the nominal is stabilized inside the mechanization by a third-order barometer loop with all three poles at \(-1/\tau_\text{loop}\), so barometric readings feed the loop rather than the filter. The particles sample only the horizontal position error, and every other error state is linear and is carried by a Kalman filter whose covariance all particles share: +\begin{equation} + \delta\mathbf{x}_n = \begin{bmatrix} \delta L & \delta\lambda \end{bmatrix}^\top, \qquad + \delta\mathbf{x}_l = \begin{bmatrix} \delta h & \delta\mathbf{v}^\top & \bm{\varepsilon}^\top & \delta h_a & \delta\hat{a} & V_1 & c_1 & \cdots & V_m & c_m \end{bmatrix}^\top, + \label{eqn:rbpf-partition} +\end{equation} +where \(\bm{\varepsilon}\) is the navigation-frame tilt, \(\delta h_a\) and \(\delta\hat{a}\) are the barometer-loop errors, and each of the \(m\) map channels contributes a first-order Gauss--Markov bias variation \(V_k\) and a random constant \(c_k\). With one map channel this is the thirteen-state filter of the original paper. Like that filter, and unlike the EKF and UKF, it carries no IMU bias states; adding them to \(\delta\mathbf{x}_l\) made the filter diverge on the degraded-GNSS drives. + +Following the original Algorithm~1, the error-state transition and process noise are accumulated over the IMU samples between measurements and applied once per measurement epoch. Each particle's horizontal draw is treated as a virtual observation of the linear states, which keeps each particle's velocity and tilt consistent with the horizontal trajectory it represents. Every measurement other than the barometer reweights the particles by the likelihood with the linear states marginalized, \(\log w^i \leftarrow \log w^i - \frac{1}{2}(\mathbf{r}^i)^\top\mathbf{S}^{-1}\mathbf{r}^i\) with \(\mathbf{S} = \mathbf{C}\mathbf{P}\mathbf{C}^\top + \mathbf{R}\), and moves the linear states with a gain shared by the cloud and a Joseph-form covariance update. The weighted-mean error is then fed back into the nominal, and the cloud is resampled systematically after every update. + +\Cref{tab:rbpf-departures} lists where the implementation departs from \citet{canciani2017airborne}. Two departures were forced by the data. The paper runs a navigation-grade INS open loop; on MEMS data the loop must be closed. The paper also sets the horizontal process noise to zero (its eq.~19). With zero noise each time update is a noiseless observation of the velocity and tilt errors, which moves their uncertainty out of the shared covariance and into the spread of the particles, where resampling on a meter-level GNSS fix discards it; on a reference drive the conditional velocity uncertainty fell to millimeters per second and the solution ran 17~km off, whereas 1~m/\(\sqrt{\text{s}}\) held it to 3.8~m. + +\begin{table}[htb] + \caption{Departures of the RBPF from \citet{canciani2017airborne}} + \label{tab:rbpf-departures} + \centering + \small + \begin{tabular}{p{0.27\textwidth}p{0.66\textwidth}} + \toprule + Departure & Reason \\ + \midrule + Closed loop & The weighted-mean error is fed back into the nominal after every update; a MEMS nominal cannot be run open loop. \\ + Discrete WGS~84 transition & The rotation-vector error transition of \citet{groves_ch14} replaces the spherical-Earth Pinson matrices. \\ + Barometer loop completed & Gains and altitude feedback, not printed in the paper, are those of the standard third-order loop \citep{titterton2004strapdown}. \\ + Additional sensors & GNSS position and velocity and magnetometer heading pass through the same update as the map; a gravity map channel is accepted beside the magnetic one. \\ + Roughening & Resampled horizontal errors are jittered \citep{gordon1993novel} so the cloud cannot collapse onto one ancestor. \\ + Exact Gauss--Markov discretization & Process noise is carried through each state's decay across an epoch, so a Gauss--Markov state stays stationary over long gaps. \\ + Horizontal process noise & 1~m/\(\sqrt{\text{s}}\) rather than zero (see text). \\ + \bottomrule + \end{tabular} +\end{table} + +\begin{table}[htb] + \caption{Filter Settings, as Read by the Dedicated-Sensor and Unaided Runs from the Configurations at \texttt{2a40f1e}. The smartphone-sensor runs' configurations were not archived (\Cref{sec:experiment}).} + \label{tab:filter-settings} + \centering + \small + \begin{tabular}{llr} + \toprule + Filter & Parameter & Value \\ + \midrule + EKF, UKF & Position process noise (horizontal, vertical) & 0.1~m/\(\sqrt{\text{s}}\) \\ + & Velocity process noise density & \(10^{-3}\)~(m/s)\(^2\)/s \\ + & Attitude process noise density & \(10^{-5}\)~rad\(^2\)/s \\ + & Accelerometer, gyroscope bias random walk & \(10^{-6}\)~(m/s\(^2\))\(^2\)/s, \(10^{-8}\)~(rad/s)\(^2\)/s \\ + & Barometric bias, prior and random walk & 8.3~m, 8.3~m per hour \\ + & Initial position uncertainty & 10~m \\ + UKF & Scaling \(\alpha\), \(\beta\), \(\kappa\) & 0.1, 2, 0 \\ + \midrule + RBPF & Particles \(N\) & 2{,}000 full GNSS; 1{,}000 degraded and aided \\ + & Initial position (N, E, up), velocity, tilt & (10, 10, 5)~m, 1~m/s, 0.1~rad \\ + & Horizontal position random walk & 1~m/\(\sqrt{\text{s}}\) \\ + & Velocity, angular random walk & \(10^{-3}\)~m/s/\(\sqrt{\text{s}}\), \(10^{-2}\)~rad/\(\sqrt{\text{s}}\) \\ + & Barometer loop time constant & 10~s \\ + & Barometer-aiding error & 8.3~m, 3{,}600~s \\ + & Resampling & Every update, systematic, roughening \(K = 0.2\) \\ + \midrule + All & Heading observation & 0.2~rad at 1~Hz \\ + & Anomaly update interval & 1~s \\ + \bottomrule + \end{tabular} +\end{table} diff --git a/papers/anom_combined/sections/04-geophysical.tex b/papers/anom_combined/sections/04-geophysical.tex new file mode 100644 index 00000000..90f9ef6c --- /dev/null +++ b/papers/anom_combined/sections/04-geophysical.tex @@ -0,0 +1,95 @@ +\section{Geophysical Anomaly Measurements} +\label{sec:geophysical} + +\subsection{Maps} + +Two global anomaly maps are used, retrieved and cropped around each drive with the Generic Mapping Tools \citep{GMT} and interpolated bilinearly within the navigation software (\Cref{fig:maps}). The magnetic map is the World Digital Magnetic Anomaly Map (WDMAM) \citep{wdmam} on its 3~arc-minute grid, about 5.6~km at the equator, which is referenced to an altitude of 5~km; upward continuation to that altitude attenuates the short-wavelength crustal signal that a ground vehicle would observe. The gravity map is the free-air anomaly grid of \citet{SANDWELL20211059} at 1~arc-minute, about 1.85~km. Over land it is filled from the Earth Gravitational Model 2008 \citep{EGM2008}, whose coarser input limits its effective resolution along these drives to roughly 9~km. Along the 27 tracks, the median magnitude of the gradient of the bilinear map is \boundgradgrav~mGal/km for gravity and \boundgradmag~nT/km for the magnetic field, and the median along-track standard deviation of the map is 14.3~mGal and 73.3~nT (\Cref{tab:error-model}). These two numbers, the map's gradient and its along-track variation, are the signal that any anomaly measurement must resolve. + +\begin{figure}[htb] + \centering + \includegraphics[width=\textwidth]{fig_maps} + \caption{The Anomaly Maps and the 27 MEMS-Nav Tracks. Each panel is the union of the map tiles cropped around the individual drives.} + \label{fig:maps} +\end{figure} + +\subsection{Measurement Models} + +The smartphone records a three-axis gravity vector and a three-axis magnetic field, and only their norms enter the anomaly. Two properties of these vectors matter below. The gravity vector \(\mathbf{g}_\text{obs}\) is not a raw accelerometer measurement but the operating system's fused estimate of gravity, intended to exclude the vehicle's kinematic acceleration. The magnetic vector \(\mathbf{B}_\text{obs}\) is the operating system's calibrated field, from which a hard-iron offset estimated by the phone has already been removed. The gravity anomaly, in mGal, is +\begin{equation} + z_g = 10^{5}\left[\lVert\mathbf{g}_\text{obs}\rVert - \gamma(L, h) + E\right], \qquad + E = 2\omega_{ie} v_E \cos L + \frac{v_N^2}{R_N + h} + \frac{v_E^2}{R_E + h}, + \label{eqn:gravity-anomaly-obs} +\end{equation} +where \(\gamma\) is Somigliana normal gravity at the observation height, \(E\) is the E\"{o}tv\"{o}s correction, the vertical component of the Coriolis and transport-rate accelerations of a platform moving over the rotating Earth \citep{groves_ch5}, and \(R_N\) and \(R_E\) are the meridian and transverse radii of curvature. A moving gravimeter reads less than local gravity by \(E\), so the correction is added. Because \(h\) is ellipsoidal height, \(z_g\) is strictly a gravity disturbance, which differs from the map's free-air anomaly by a near-constant offset that the bias state absorbs. The magnetic anomaly, in nT, is +\begin{equation} + z_m = \lVert\mathbf{B}_\text{obs}\rVert - F_\text{WMM}(L, \lambda, h, t), + \label{eqn:magnetic-anomaly-obs} +\end{equation} +where \(F_\text{WMM}\) is the total intensity of the World Magnetic Model at the epoch of the recording, WMM2020 before 2025 and WMM2025 thereafter \citep{wmm2020, wmm}. Both anomalies are formed at the filter's own estimate of position and velocity, and both are predicted as the map value at the estimated position plus a bias state, +\begin{equation} + \hat{z} = \mathcal{M}(L, \lambda) + b, + \label{eqn:anomaly-prediction} +\end{equation} +where \(\mathcal{M}\) is the bilinear interpolation of the map. In the Kalman filters \(b\) follows a random walk; in the RBPF it is the sum \(V_k + c_k\) of \Cref{eqn:rbpf-partition}. Anomaly updates are applied once per second, without an innovation gate, as a single two-dimensional update with diagonal \(\mathbf{R}\) when both channels are enabled. + +\paragraph{EKF.} Because \(\hat{z}\) depends on position only, the measurement Jacobian is non-zero only in the latitude and longitude columns and the bias column. The two map derivatives are central finite differences of the bilinear interpolant with a step of \(10^{-6}\)~deg, converted from degrees to the radians the state holds. This Jacobian omits the dependence of the observation itself on the state, through the reference fields and the motion correction. Along these drives the WMM intensity changes by about 5~nT/km, normal gravity by about 0.8~mGal/km northward, the E\"{o}tv\"{o}s term by about 11~mGal per m/s of east velocity, and normal gravity by 0.31~mGal per meter of height. The effective Jacobian is the derivative of the prediction minus the observation, so for the magnetic channel the map and WMM gradients can reinforce or cancel, and the sign of the effect of this omission on navigation error is not known without a complete-model comparison, which is left to future work. + +\paragraph{UKF.} The UKF passes its sigma points through \Cref{eqn:anomaly-prediction}, so the map nonlinearity enters through the spread of the sigma points rather than through a local gradient. + +\paragraph{RBPF.} The observation is formed once at the ensemble mean, as the Kalman filters form it, and the residual of particle \(i\) is +\begin{equation} + r^i = z - \left[\mathcal{M}(\bar{L} + \delta L^i,\,\bar{\lambda} + \delta\lambda^i) + \bar{V} + \bar{c} + V^i + c^i\right], + \label{eqn:rbpf-map-residual} +\end{equation} +where barred quantities are the nominal. The map is evaluated at each particle's own horizontal position, which is where the particle filter could, in principle, represent a multimodal likelihood that a Gaussian filter cannot. A particle that leaves the map tile receives zero weight. The dependence of the gravity observation on velocity through the E\"{o}tv\"{o}s term is not modeled in \(\mathbf{C}\). + +\subsection{Error Models} +\label{sec:error-models} + +\paragraph{Smartphone observations.} The error model of each smartphone observation is measured from the data. For each drive, \Cref{eqn:gravity-anomaly-obs} or \Cref{eqn:magnetic-anomaly-obs} is formed along the recorded GNSS track and differenced against the map at the same positions. The pooled median residual seeds the bias state, the median of the within-drive robust standard deviations sets \(\sqrt{R}\), and the spread of the per-drive medians sets the bias prior, which the bias random walk rebuilds over one hour. The signal-to-noise ratio of drive \(j\) is +\begin{equation} + \mathrm{SNR}_j = \frac{\sigma_{\mathcal{M},j}}{1.4826\,\mathrm{MAD}(\mathbf{r}_j)}, + \label{eqn:snr} +\end{equation} +where \(\sigma_{\mathcal{M},j}\) is the standard deviation of the map along the drive, \(\mathbf{r}_j\) the residuals, and MAD the median absolute deviation. Because the spread is taken about the drive's own median, a bias that is constant over the drive does not lower the SNR; it is left to the bias state. An SNR below one means that the residual scatter exceeds the variation of the map along the track, so that a single measurement cannot distinguish one position on the track from another. Calibrating \(\mathbf{R}\) against the GNSS track is a best case for the filter; it cannot make an observation more informative than it is. + +\begin{table}[htb] + \caption{Anomaly Error Models. Smartphone values are measured from the residuals against the maps; dedicated-sensor values are taken from the datasheet models of \Cref{tab:sensors}. Signal \(\sigma\) is the median over drives of \(\sigma_{\mathcal{M},j}\); SNR is the median over drives of \Cref{eqn:snr}, with the best drive in parentheses.} + \label{tab:error-model} + \centering + \small + \input{tables/error_model.tex} +\end{table} + +\paragraph{Dedicated sensors.} +\label{sec:dedicated-sensors} +To separate the observation from the estimator and the IMU, a second set of inputs replaces only the norms of the recorded gravity and magnetic vectors with simulated readings of two commercially available low-cost sensors (\Cref{tab:sensors}). For every record the synthetic reading is the reference field at the recorded GNSS position and velocity, plus the map at that position, plus a sensor error; it is constructed by inverting \Cref{eqn:gravity-anomaly-obs,eqn:magnetic-anomaly-obs}, so that a filter at the recorded GNSS state recovers exactly the map value plus the sensor error. Vector directions are kept, so the heading observation, the IMU data, the barometer, the degraded GNSS stream, the filter configurations, and the random seed are unchanged. The magnetometer is a PNI RM3100 magneto-inductive sensor \citep{rm3100}, whose noise averaged to the 10~Hz record rate is 3.9~nT, consistent with the 4.7~nT at 10~Hz measured by \citet{regoli2018investigation}. The gravimeter is an Analog Devices ADXL355 MEMS accelerometer read as a scalar gravimeter \citep{adxl355}, whose noise density of 25~\(\mu\)g/\(\sqrt{\text{Hz}}\) gives 55~mGal per record. Each sensor also draws a turn-on bias per drive, a Gauss--Markov bias instability, and a residual temperature term; the temperature terms assume 90\% compensation and a cabin temperature varying by 1~\(^\circ\)C, and are the only parameters not taken from a datasheet or a published characterization. Gravity readings are withheld wherever the bracketing GNSS fixes are more than 2~s apart, since the velocity needed to invert the E\"{o}tv\"{o}s term cannot be interpolated across a longer gap. The filters use the datasheet error model directly: a zero bias seed, \(\sqrt{R}\) equal to the per-record white noise, and a bias prior and random walk matched to the turn-on, instability, and temperature terms. In the RBPF the bias splits into a variation of 11.4~mGal with an 826-s correlation time and 1.71~nT with 3{,}597~s, and a constant that takes the remainder of the prior. + +Installation is deliberately ideal: the vehicle's magnetic field is absent, its kinematic vertical acceleration is removed exactly, and the maps are exact. The dedicated-sensor arm is therefore a sensor-limited best case rather than a prediction of a fielded system, and any benefit it shows is an upper bound on what the same sensor would provide in a vehicle. + +\begin{table}[htb] + \caption{Error Models of the Simulated Dedicated Sensors, per 10~Hz Record. Gauss--Markov terms are given as a standard deviation and a correlation time.} + \label{tab:sensors} + \centering + \small + \begin{tabular}{lll} + \toprule + Error term & ADXL355 gravimeter & RM3100 magnetometer \\ + \midrule + Unit price & \$77 & \$25 \\ + White noise & 54.8~mGal & 3.92~nT \\ + Turn-on bias & 8{,}826~mGal (9~mg) & 17.0~nT \\ + Bias instability & 5.6~mGal, 300~s & 1.7~nT, 3{,}600~s \\ + Temperature & 10.0~mGal, 1{,}800~s & 0.05~nT, 1{,}800~s \\ + \bottomrule + \end{tabular} +\end{table} + +\Cref{fig:residuals} compares the residual spread of both sets of observations with the variation of the map along the tracks. The smartphone's noise exceeds the map signal by an order of magnitude for gravity and by two orders of magnitude for the magnetic field, and no drive reaches an SNR of one in either channel (\Cref{tab:error-model}). The simulated RM3100 reaches an SNR above one on 24 of 27 drives. The simulated ADXL355 doubles the smartphone's gravity SNR but, at 0.26, still falls well short of one. Before any filter is run, the error models therefore predict no benefit from the smartphone observations or the ADXL355, and some benefit from the RM3100. + +\begin{figure}[htb] + \centering + \includegraphics[width=\textwidth]{fig_residuals} + \caption{Residuals of the Anomaly Observations Against the Maps. Each drive's residuals are taken about their own median; the outline is the map anomaly along the same tracks, each drive's mean removed. The robust \(\sigma\) is the pooled \(1.4826\,\mathrm{MAD}\) of the residuals; the pooled map \(\sigma\) is larger than the per-drive median signal \(\sigma\) of \Cref{tab:error-model} because it mixes drives.} + \label{fig:residuals} +\end{figure} diff --git a/papers/anom_combined/sections/05-experiment.tex b/papers/anom_combined/sections/05-experiment.tex new file mode 100644 index 00000000..27d6d998 --- /dev/null +++ b/papers/anom_combined/sections/05-experiment.tex @@ -0,0 +1,26 @@ +\section{Data and Experimental Design} +\label{sec:experiment} + +\subsection{The MEMS-Nav Drives} + +The data are the MEMS-Nav recordings \citep{mems-nav-dataset}, made with the Sensor Logger application on seven models of Android and iOS smartphone mounted in passenger cars, mostly on highways in the Mid-Atlantic and northeastern United States between August 2023 and November 2025 (\Cref{fig:maps}). Each recording contains three-axis specific force, angular rate, and magnetic field, the operating system's gravity vector and attitude, barometric pressure and relative altitude, and GNSS position, velocity, and reported accuracies. The 29 raw recordings are resampled to a 10~Hz record rate, which gives 10~Hz inertial propagation; GNSS remains at the roughly 1~Hz rate at which it was logged, and its columns are left empty between fixes rather than interpolated. Recordings are split wherever the IMU stream has a gap longer than 5~s, and segments shorter than 300~s are discarded, which yields the 27 drives of \Cref{tab:dataset}. + +\begin{table}[htb] + \caption{The 27 MEMS-Nav Drives} + \label{tab:dataset} + \centering + \small + \input{tables/dataset.tex} +\end{table} + +No independent reference trajectory exists for these drives, so every error in this paper is the horizontal great-circle distance between the filter's estimate and the recorded GNSS fix, evaluated at the records that carry one, and summarized per drive as a root-mean-square error (RMSE). The recorded GNSS is itself in error by a few meters, which limits the precision with which small differences can be resolved but applies equally to every configuration. One drive, 2025-06-14 21:17:02, is of poor quality: it has 197 GNSS fixes over less than ten minutes, with a median reported horizontal accuracy of 12.2~m and nine fixes reporting an accuracy of 999~m or more. It is retained, and it is the worst drive for every filter. + +\subsection{Experimental Design} + +Each of the 27 drives was processed by each of the three filters in five configurations: full GNSS, degraded GNSS, and degraded GNSS with gravity, magnetic, or combined anomaly aiding. The aided configurations were run twice, once with the smartphone's own observations and once with the simulated dedicated sensors, giving \(27 \times 3 \times (2 + 2 \times 3) = 648\) runs. Within a pair, the aided and unaided runs share the filter, its initialization and process noise, the barometric and heading updates, the degraded GNSS stream, and the random seed, and differ only in the map-bias states and the anomaly updates. + +Because the degraded-GNSS error varies by almost an order of magnitude across drives (\Cref{fig:baselines}), each aided run is scored by the ratio of its horizontal RMSE to that of the same filter's unaided run on the same drive; a ratio below one is an improvement. The ratios of a configuration are summarized by their median with a 95\% percentile bootstrap interval (10{,}000 resamples) \citep{efron1993bootstrap}, by the number of drives improved and worsened, and by a two-sided Wilcoxon signed-rank test on the paired differences \citep{wilcoxon1945individual}. A drive enters a comparison only if both of its runs completed. A run is stopped if the filter's speed exceeds 5{,}000~m/s; this health limit is deliberately loose so that MEMS-grade runs can drift to completion, which also makes completion weak evidence that a run stayed healthy. + +The smartphone and dedicated-sensor inputs differ only in the norms of the gravity and magnetic vectors, so their unaided runs should coincide. They do for the UKF, whose degraded-GNSS RMSE changes by more than 1\% on \numsensukfcount{} of \numsensukfn{} drives, but not for the other two filters: the magnetic vector feeds the heading observation, and the last-bit difference introduced by rescaling it changes the EKF's RMSE by more than 1\% on \numsensekfcount{} of \numsensekfn{} drives (by up to \numsensekfmaxm~m) and the RBPF's on \numsensrbpfcount{} of the \numsensrbpfn{} drives common to both sets, with a median change of \numsensrbpfmedianpct\%. Each set of aided runs is therefore compared with its own unaided runs. The sensitivity of the RBPF to this perturbation is itself a result (\Cref{sec:results-rbpf}). + +The dedicated-sensor and unaided runs read the configuration files as committed at \texttt{2a40f1e} of \texttt{strapdown-rs}, with seed 42; the revision of the binary that executed them was not recorded. The configurations of the smartphone-sensor runs were not archived; their filter settings are believed to match, but this has not been verified. The analysis scripts that produce every table, figure, and quoted statistic from the run outputs are available as described at the end of the paper. diff --git a/papers/anom_combined/sections/06-results.tex b/papers/anom_combined/sections/06-results.tex new file mode 100644 index 00000000..dba41079 --- /dev/null +++ b/papers/anom_combined/sections/06-results.tex @@ -0,0 +1,112 @@ +\section{Results} +\label{sec:results} + +\input{tables/phone_numbers.tex} + +\subsection{Unaided Baselines} +\label{sec:results-baselines} + +\Cref{tab:baselines} and \Cref{fig:baselines} give the horizontal RMSE of each unaided filter with full and degraded GNSS. With full GNSS the three filters track the recorded solution closely, with medians of \numekffullmedian~m for the EKF, \numukffullmedian~m for the UKF, and \numrbpffullmedian~m for the RBPF, consistent with loosely coupled integration of consumer-grade sensors. The poor-quality 2025-06-14 drive is the worst for all three. The RBPF also diverges on one drive, 2023-08-04, that both Kalman filters hold to about 4~m. + +With one fix per minute, the medians rise to \numekfdegradedmedian~m for the EKF and \numukfdegradedmedian~m for the UKF, a factor of about a hundred, and no drive falls below 280~m. The two Kalman filters agree to within 5\% on most drives, and where they differ the UKF is usually the better. This two-order-of-magnitude gap between degraded and full GNSS is what anomaly aiding is asked to close. The RBPF does not maintain a solution under this schedule: its horizontal RMSE exceeds 10~km on 24 of the 25 drives that ran to completion, with a median of \numrbpfdegradedmedian, and two drives were stopped by the 5{,}000~m/s health limit. \Cref{sec:results-rbpf} examines this failure. + +\begin{table}[htb] + \caption{Horizontal RMSE of the Unaided Filters Across Drives. \(n\) is the number of drives that ran to completion.} + \label{tab:baselines} + \centering + \small + \input{tables/baselines.tex} +\end{table} + +\begin{figure}[htb] + \centering + \includegraphics[width=\textwidth]{fig_baselines} + \caption{Horizontal RMSE of Each Unaided Filter on Each Drive, with Full GNSS and with One Fix per Minute. Bars mark the medians; the horizontal axis is logarithmic.} + \label{fig:baselines} +\end{figure} + +\subsection{Aiding with the Smartphone's Own Observations} +\label{sec:results-phone} + +\Cref{tab:aiding} summarizes the paired comparisons for the two Kalman filters, and \Cref{fig:ratios} shows the per-drive ratios. With the smartphone's observations, neither filter changes measurably under any aiding channel. The median ratio lies between 1.000 and 1.001 in all six configurations, no 95\% interval admits a change larger than 0.3\%, and no comparison is significant (\(p \geq 0.13\)). The largest median per-drive change is an increase of half a meter on a degraded error of several hundred meters. The individual ratios that depart visibly from one in \Cref{fig:ratios}(a) belong to the EKF on a few drives whose degraded-GNSS solution is sensitive to small perturbations of any kind (\Cref{sec:experiment}); they fall on both sides of one. \Cref{fig:example}(a) shows a representative drive, on which the aided and unaided EKF errors are indistinguishable at the scale of the dedicated-sensor result. + +This is the outcome the error models predict. With a measurement noise one to two orders of magnitude larger than the map signal, the Kalman gain of the anomaly update is close to zero, and both filters correctly assign the observation almost no weight. + +\begin{table}[htb] + \caption{Effect of Anomaly Aiding on the Kalman Filters Under Degraded GNSS. Ratio is the median over 27 drives of the aided to unaided horizontal RMSE of the same filter, with its 95\% bootstrap interval; B/W counts drives improved and worsened; \(p\) is from a two-sided Wilcoxon signed-rank test. Ratios below one are improvements.} + \label{tab:aiding} + \centering + \small + \setlength{\tabcolsep}{4pt} + \input{tables/aiding.tex} +\end{table} + +\begin{figure}[htb] + \centering + \includegraphics[width=\textwidth]{fig_ratios} + \caption{Per-Drive Ratio of Aided to Unaided Horizontal RMSE for the Kalman Filters. Points are drives; the black marks are the median and its 95\% bootstrap interval. The vertical scales of the two panels differ.} + \label{fig:ratios} +\end{figure} + +\subsection{Why the Smartphone Observations Carry No Map Information} +\label{sec:results-cause} + +The null result is explained by how the smartphone forms its readings, without reference to any filter (\Cref{fig:phone-sensors}). + +\paragraph{Gravity.} The recorded vector is the operating system's fused estimate of gravity, and its norm is pinned to a device constant: on the median drive, \phonegravpinned\% of records lie within 1~mGal of the drive's maximum, which is 9.81000~m/s\(^2\) on the Google Pixel devices and the standard gravity of 9.80665~m/s\(^2\) on most others. The excursions below that ceiling follow the vehicle's dynamics rather than the map. Averaged over 60-s blocks, the norm correlates with the map at a median of \(r = \phonegravcorr\) with a regression slope of \(\phonegravslope\), where a gravimeter would give a slope of one. Because the norm is effectively constant, the anomaly of \Cref{eqn:gravity-anomaly-obs} reduces to a function of the filter's own latitude, height, and velocity, through normal gravity and the E\"{o}tv\"{o}s term: it is a biased velocity pseudo-measurement rather than a map observation. The raw accelerometer offers no alternative. Projected onto the vertical, corrected for normal gravity, the E\"{o}tv\"{o}s term, and barometrically derived vertical acceleration, and averaged over 120 to 600~s, its residual remains 50 to 90 times the map signal \citep{brodovsky2026dissertation}. + +\paragraph{Magnetic field.} The magnetometer is dominated by the vehicle. A smartphone fixed in a car yaws only with the car, so a field fixed to the vehicle adds a heading-dependent term to the measured intensity that a scalar bias state cannot follow. Fitting the intensity anomaly of \Cref{eqn:magnetic-anomaly-obs} to the vehicle's course over ground explains a median \phonemagrsq\% of its variance, with a heading-dependent amplitude of \phonemagamplitude~\(\mu\)T. The intensity varies along a drive with a median standard deviation of \phonemagspread~\(\mu\)T, against \phonemagmapsd~nT for the map along the same track. This is despite the operating system's own calibration, which removes a hard-iron offset of 67 to 325~\(\mu\)T per recording \citep{brodovsky2026dissertation}. + +\begin{figure}[htb] + \centering + \includegraphics[width=\textwidth]{fig_phone_sensors} + \caption{The Smartphone's Gravity and Magnetic Observations on Drive 2025-03-01 16:46:39, Against the Map Along the Same Track. (a) The norm of the reported gravity vector, in mGal below its maximum; (b) the magnetic intensity anomaly, in \(\mu\)T. Both maps are drawn with their mean removed and on the same scale as the observation.} + \label{fig:phone-sensors} +\end{figure} + +A simple heuristic indicates the size of the effect to expect. Dividing the measurement noise by the median gradient of the map along the track gives the position scale that a single update resolves along the local gradient direction (\Cref{fig:bound}). It is not a full horizontal bound: a scalar anomaly gives rank-one horizontal information and leaves the direction along the map contour unobserved, the estimated bias absorbs part of it, and repeated updates combine. Nor is a scale larger than the existing error a proof that no improvement is possible, since even a measurement noisier than the prior reduces uncertainty a little. It does indicate orders of magnitude. For the smartphone the scale is about \boundscalephonegrav~km for gravity and \boundscalephonemag~km for the magnetic field, two to three orders of magnitude larger than the \bounddegradedkm~km median error of the degraded solution, so each update can move the solution only negligibly. This is consistent with, though it does not by itself establish, the null result of \Cref{tab:aiding}. + +\begin{figure}[htb] + \centering + \includegraphics[width=\textwidth]{fig_bound} + \caption{Single-Update Position Scale Along the Map Gradient for Each Observation: Measurement Noise \(\sqrt{R}\) Divided by the Median Gradient of the Bilinear Map Along the 27 Tracks (\boundgradgrav~mGal/km, \boundgradmag~nT/km). This is a directional heuristic, not a horizontal position bound. The vertical line is the median horizontal RMSE of the unaided EKF under degraded GNSS.} + \label{fig:bound} +\end{figure} + +\subsection{Aiding with Dedicated Sensors} +\label{sec:results-dedicated} + +The right half of \Cref{tab:aiding} and \Cref{fig:ratios}(b) give the same comparisons with the simulated dedicated sensors, with the IMU, the degraded GNSS, the filters, and the seed unchanged. With the RM3100 magnetometer, magnetic aiding improves the EKF on \numdedicatedekfmagbetter{} of 27 drives and the UKF on \numdedicatedukfmagbetter{}, with median ratios of \numdedicatedekfmagratio{} and \numdedicatedukfmagratio{} (\(p < 10^{-3}\) for both) and median reductions of \numdedicatedekfmagdmed~m and \numdedicatedukfmagdmed~m. Because the full-GNSS error is only a few meters, a ratio of 0.89 closes about a tenth of the gap between degraded and full-GNSS performance. \Cref{fig:example}(b) shows the drive whose EKF ratio lies at the median of the dataset: the aided error is lower for most of the drive, with short intervals in which it is higher, and the RMSE falls by 52~m. Gravity aiding with the ADXL355 does not help either filter; the EKF ratio is \numdedicatedekfgravratio{} and the UKF ratio \numdedicatedukfgravratio{}, both worse on 19 of 27 drives, and only the UKF result reaches marginal significance (\(p = \numdedicatedukfgravp\)). Combined aiding performs as magnetic aiding alone, because both filters assign the uninformative gravity channel almost no weight. + +\begin{figure}[htb] + \centering + \includegraphics[width=\textwidth]{fig_example} + \caption{Aided Minus Unaided Horizontal Error of the EKF on Drive 2025-03-01 16:46:39, with Magnetic Aiding from (a) the Smartphone Magnetometer and (b) the Simulated RM3100. Both panels share one vertical scale. Green intervals are those in which aiding reduced the error.} + \label{fig:example} +\end{figure} + +The same filters, inertial data, and GNSS stream that were unaffected by the smartphone observations therefore benefit consistently once the magnetic observation carries map information. Because the IMU was held fixed, this places the cause of the smartphone result in the observations rather than in the consumer-grade inertial sensor or the estimators. The size of the gain is consistent with the heuristic of \Cref{fig:bound}: the RM3100's single-update scale of about \boundscalermthree~km is comparable to the \bounddegradedkm~km degraded error, so each update constrains position along the gradient only to about the accuracy the INS already holds, which suggests a consistent but modest improvement. The ADXL355's scale of about \boundscaleadxl~km suggests a negligible one, as measured. + +\subsection{The Particle Filter Under Degraded GNSS} +\label{sec:results-rbpf} + +The RBPF loses track under the 60-s GNSS schedule with or without aiding, so the effect of aiding on it cannot be assessed. \Cref{tab:rbpf} lists its paired results for completeness; the aided and unaided errors are both hundreds of kilometers, set by the divergence rather than by the anomaly measurement, and the ratios are not interpretable. \Cref{fig:rbpf} shows the failure on the example drive. Within the first minutes the RBPF's error leaves the range of the Kalman filters' and never returns, while its reported horizontal standard deviation stays at tens to hundreds of meters, the same order as the EKF's actual error. On the \rbpfdiagcrossed{} of \rbpfdiagdrives{} completed drives whose error ever exceeds 10~km, it first does so after a median of \rbpfdiagcrossingmin~minutes. Over the second half of each drive, the median reported standard deviation is \rbpfdiagsigmam~m against a median error of \rbpfdiagerrorkm~km (medians across drives of per-drive medians). The filter is not merely inaccurate but confidently wrong by about four orders of magnitude. + +\begin{table}[htb] + \caption{Paired Results of the RBPF Under Degraded GNSS, Reported for Completeness. Both aided and unaided runs have diverged, so the comparison does not measure the anomaly measurement. \(n\) counts drives on which both runs completed.} + \label{tab:rbpf} + \centering + \small + \input{tables/rbpf.tex} +\end{table} + +\begin{figure}[htb] + \centering + \includegraphics[width=\textwidth]{fig_rbpf} + \caption{Horizontal Error and Reported Uncertainty of the Unaided RBPF on Drive 2025-03-01 16:46:39 with One GNSS Fix per Minute, Against the Unaided EKF on the Same Stream and the RBPF with Full GNSS. The vertical axis is logarithmic.} + \label{fig:rbpf} +\end{figure} + +That signature is particle deprivation. Horizontal position lives only in the particles, so a GNSS fix can correct it only by reweighting and resampling among them. Once the drift between fixes carries the true error outside the cloud, which is tens of meters wide, each fix can move the estimate by at most about one cloud width, and the filter never re-acquires. With a fix every second the drift never leaves the cloud, which is why the same filter has the lowest median error of the three with full GNSS. Why the cloud drifts out in the first place is not established. The RBPF, like the filter of \citet{canciani2017airborne}, estimates no IMU biases, so its nominal drifts between fixes on errors that the Kalman filters estimate and remove; but adding bias states also diverged, so their absence is not a demonstrated cause. A second candidate is the transfer of velocity uncertainty from the shared covariance into the particle spread described in \Cref{sec:rbpf}, which resampling then discards, and which over 60-s epochs may recur at every fix. + +The RBPF is also far less repeatable than the Kalman filters. The last-bit change in the heading input that distinguishes the two sets of unaided runs (\Cref{sec:experiment}) changes the RBPF's degraded-GNSS RMSE by more than 1\% on \numsensrbpfcount{} of \numsensrbpfn{} drives, with a median change of \numsensrbpfmedianpct\%, against \numsensekfcount{} drive for the EKF and \numsensukfcount{} for the UKF. diff --git a/papers/anom_combined/sections/07-discussion.tex b/papers/anom_combined/sections/07-discussion.tex new file mode 100644 index 00000000..bef02c68 --- /dev/null +++ b/papers/anom_combined/sections/07-discussion.tex @@ -0,0 +1,21 @@ +\section{Discussion} +\label{sec:discussion} + +\subsection{What Decides Whether Anomaly Aiding Helps} + +Across four observations, two estimators, and one consumer-grade IMU, the outcome is ordered by a single quantity: the quality of the anomaly measurement relative to the map signal. The two smartphone observations and the ADXL355, whose single-update scales along the map gradient are \boundscaleadxl{} to \boundscalephonemag~km, provide no benefit; the RM3100, whose scale of about \boundscalermthree~km is comparable to the error of the degraded solution, provides a consistent one. The inertial sensor was held fixed throughout, and the EKF and UKF behave alike, so neither the IMU nor the choice between the two Kalman filters is what limits the smartphone result. A better aiding sensor was sufficient to obtain a benefit; whether a better inertial sensor would add to it was not tested here. + +The same heuristic gives an indicative requirement for these roads and maps. For a single update to resolve position along the gradient to the \bounddegradedkm~km of the degraded solution, the measurement noise must be below about \boundreqgrav~mGal for gravity and about \boundreqmag~nT for the magnetic field. Because the heuristic ignores the unobserved contour direction, the bias state, and the accumulation of repeated updates, this is an order-of-magnitude target rather than a threshold. A dedicated low-cost magnetometer approaches the magnetic requirement. No MEMS accelerometer approaches the gravity requirement; land-vehicle strapdown gravimetry has reached the milligal level only with navigation-grade inertial sensors, GNSS velocity, and filtering windows of minutes \citep{yu2015sins}. The map is also part of the heuristic. The WDMAM grid, at 3~arc-minutes and referenced to 5~km altitude, retains little structure at the sub-kilometer scale of the position error, and the free-air grid over land is effectively 9~km. Once the sensor is adequate, map resolution becomes the next limit, and higher-resolution regional surveys would lower it. + +When the measurement noise greatly exceeds the map signal, the Kalman gain of the anomaly update falls toward zero and the filter effectively ignores the measurement, which is what both Kalman filters did with every observation except the RM3100. The particle filter has the analogous limit: a likelihood that is exactly independent of the state multiplies every weight by the same constant and leaves the normalized weights, and the systematic resampling of equal weights, unchanged. Its departures from that limit come from elsewhere, namely the finite sample of particles, the roughening jitter added after every resampling, and any mismatch between the modeled and actual measurement errors. The divergence of \Cref{sec:results-rbpf} occurs with and without aiding, so it does not show that weak anomaly updates harm the particle filter. + +\subsection{The Particle Filter} + +The results do not support the expectation, stated in the authors' conference paper, that a particle filter is the estimator best suited to anomaly aiding. Its theoretical advantage is the ability to represent a multimodal posterior, which arises when the position uncertainty spans several correlation lengths of the map. That is not the regime studied here. With a GNSS fix every minute, the median error of the Kalman-filter solution, about 0.44~km, is far smaller than the effective correlation lengths of the maps, about 9~km for gravity and about 30~km for the magnetic field, so the anomaly likelihood is effectively unimodal over the region of uncertainty. The particle filter's advantage should be sought in long outages, where the position uncertainty grows to the scale of the map features, and with a formulation that survives the degraded-GNSS baseline first. Two structural remedies for the deprivation of \Cref{sec:results-rbpf} are standard: applying GNSS position as a Kalman update of the full error state, which needs no particles because it is linear in position, and proposing particles near each fix, as in sensor resetting or a mixture proposal. + +Two properties of the implementation would limit the benefit of aiding even without the divergence. The E\"{o}tv\"{o}s term makes the gravity observation depend on velocity, which the Rao-Blackwellized update does not model, so the likelihood can select particles by velocity rather than by position. And each filter treats successive anomaly errors as independent given the state. For the dedicated sensors this matches how the errors were generated, white noise plus a modeled Gauss--Markov bias over an exact map, so repeated observations of the same map feature do add information. For the smartphone observations it does not: the heading-dependent vehicle field that explains about half of the magnetic intensity variance (\Cref{sec:results-cause}) persists for as long as the heading does, so successive errors are correlated in time and the weights and covariances built on them are optimistic. The spatial correlation of the map alone does not imply correlated measurement errors. + +\subsection{Limitations} +\label{sec:limitations} + +Several limitations bound these conclusions. The reference for every error is the smartphone's own GNSS track; it limits the precision of small differences, but it applies equally to every configuration in a pair. The dedicated-sensor observations are idealized: the vehicle's magnetic field is absent and the maps are exact, so the magnetic improvement is an upper bound on what the same sensor would provide in a vehicle, where the platform field that dominated the smartphone magnetometer would have to be avoided or compensated. Their errors are a single realization, although each drive draws its own, so each paired test is over 27 independent draws. Anomaly errors are modeled as independent between the once-per-second updates; for the smartphone observations, whose vehicle-field error persists with heading, this is optimistic. The Kalman filters' measurement Jacobian omits the reference-field and motion terms of the observation; the direction of the resulting effect on navigation error is not established, and it is common to every configuration. The magnetometer heading observation shared by every run is itself corrupted by the vehicle's field, with errors far larger than its assumed 0.2~rad. Finally, the experiment covers one degradation scenario; a shorter fix interval would shrink the degraded error and, by the heuristic above, the benefit that any given sensor can provide, whereas a longer outage would enlarge both. diff --git a/papers/anom_combined/sections/08-conclusion.tex b/papers/anom_combined/sections/08-conclusion.tex new file mode 100644 index 00000000..4f6b14c1 --- /dev/null +++ b/papers/anom_combined/sections/08-conclusion.tex @@ -0,0 +1,10 @@ +\section{Conclusions} +\label{sec:conclusion} + +This paper evaluated gravity and magnetic anomaly aiding of a consumer-grade MEMS INS under degraded GNSS with three estimators on 27 drives, pairing every aided run with the same filter's unaided run on an identical measurement stream. It corrects the authors' earlier conference results, which arose from unit errors in the anomaly observation and from comparisons against differing or diverged baselines. + +With corrected observations, the gravity and magnetic readings that a vehicle-mounted smartphone already provides carry no map information and provide no benefit to either Kalman filter. The cause is the readings themselves: the gravity norm is pinned to a device constant and the magnetometer is dominated by the vehicle's field, which gives signal-to-noise ratios of 0.13 and 0.01 against the maps. Replacing only those readings with a simulated \$25 RM3100 magnetometer makes magnetic aiding reduce the median error of both the EKF and the UKF by about 10\%, on 25 and 26 of 27 drives, while a simulated \$77 ADXL355 used as a gravimeter does not help. The size of the magnetic gain is consistent with a single-update heuristic, the sensor noise divided by the map gradient. The deciding variable is the quality of the anomaly measurement relative to the map signal, not the estimator and not the inertial sensor; by the same heuristic, an indicative target on these roads and maps is a noise of about \boundreqgrav~mGal or \boundreqmag~nT. + +The Rao-Blackwellized particle filter, which has the lowest median error of the three with full GNSS, loses track with one fix per minute with or without aiding, in a manner consistent with particle deprivation, and its results are far less repeatable than those of the Kalman filters. In the regime studied, where the position uncertainty is much smaller than the correlation lengths of the maps, the Kalman filters are the estimators that worked; whether the particle filter can be made to work under sparse GNSS is open. + +Four directions follow. A field trial with a dedicated magnetometer mounted away from, or compensated for, the vehicle's field would test whether the simulated gain survives installation. The Kalman filters' measurement Jacobian should include the reference-field and motion terms, and where the anomaly errors are correlated in time, as the smartphone's vehicle field is, that correlation should be modeled or the update interval lengthened to match it. The particle filter needs a formulation that survives sparse GNSS, by updating position linearly or proposing particles near each fix, before its multimodal advantage can be tested in long outages. And the error-state Kalman filter that \texttt{strapdown-rs} provides as its default estimator should be given an anomaly path and evaluated alongside the filters compared here. diff --git a/papers/anom_combined/sections/09-availability.tex b/papers/anom_combined/sections/09-availability.tex new file mode 100644 index 00000000..aa078b04 --- /dev/null +++ b/papers/anom_combined/sections/09-availability.tex @@ -0,0 +1 @@ +The navigation software is \texttt{strapdown-rs} \citep{strapdown-rs}, open source under the MIT license at \url{https://github.com/jbrodovsky/strapdown-rs}. The configuration files read by the dedicated-sensor and unaided runs are those under \texttt{conf/} at commit \texttt{2a40f1e}; the revision of the executing binary and the configurations of the smartphone-sensor runs were not recorded (\Cref{sec:experiment}). An earlier release of the MEMS-Nav recordings is archived at \url{https://doi.org/10.5281/zenodo.17582434} \citep{mems-nav-dataset}; the 27 processed 10~Hz drives used here are to be archived with the run outputs before publication. The scripts that compute every table, figure, and quoted statistic in this paper from those run outputs are under \texttt{papers/anom\_combined/scripts/} in the same repository. diff --git a/papers/anom_combined/tables/aiding.tex b/papers/anom_combined/tables/aiding.tex new file mode 100644 index 00000000..21c3d9ef --- /dev/null +++ b/papers/anom_combined/tables/aiding.tex @@ -0,0 +1,15 @@ +\begin{tabular}{llccc@{\hspace{1.2em}}ccc} +\toprule + & & \multicolumn{3}{c}{Smartphone observations} & \multicolumn{3}{c}{Dedicated sensors} \\ +\cmidrule(lr){3-5}\cmidrule(lr){6-8} +Filter & Aiding & Ratio [95\% CI] & B/W & \(p\) & Ratio [95\% CI] & B/W & \(p\) \\ +\midrule +EKF & Gravity & 1.001 [1.000, 1.002] & 7/20 & 0.18 & 1.005 [1.001, 1.013] & 8/19 & 0.17 \\ + & Magnetic & 1.000 [1.000, 1.000] & 12/15 & 0.93 & 0.891 [0.866, 0.907] & 25/2 & \(<10^{-3}\) \\ + & Combined & 1.001 [1.000, 1.002] & 8/19 & 0.46 & 0.890 [0.880, 0.913] & 24/3 & \(<10^{-3}\) \\ +\midrule +UKF & Gravity & 1.001 [1.000, 1.003] & 9/18 & 0.13 & 1.011 [1.000, 1.013] & 8/19 & 0.049 \\ + & Magnetic & 1.000 [1.000, 1.000] & 13/14 & 0.86 & 0.901 [0.884, 0.905] & 26/1 & \(<10^{-3}\) \\ + & Combined & 1.001 [1.000, 1.002] & 8/19 & 0.14 & 0.899 [0.883, 0.929] & 26/1 & \(<10^{-3}\) \\ +\bottomrule +\end{tabular} diff --git a/papers/anom_combined/tables/baselines.tex b/papers/anom_combined/tables/baselines.tex new file mode 100644 index 00000000..e9c8e53c --- /dev/null +++ b/papers/anom_combined/tables/baselines.tex @@ -0,0 +1,14 @@ +\begin{tabular}{llrrrrr} +\toprule +Filter & GNSS & \(n\) & Median (m) & Mean (m) & Max (m) & Vert.\ median (m) \\ +\midrule +EKF & Full & 27 & 4.1 & 24.0 & 539.2 & 1.6 \\ + & Degraded & 27 & 440.4 & 601.7 & 2{,}436.1 & 23.4 \\ +\midrule +UKF & Full & 27 & 4.0 & 24.0 & 542.8 & 1.6 \\ + & Degraded & 27 & 430.4 & 577.1 & 3{,}115.4 & 24.0 \\ +\midrule +RBPF & Full & 27 & 1.9 & 181.7 & 3{,}628.5 & 1.6 \\ + & Degraded & 25 & 664.6~km & 900.4~km & 2{,}706.6~km & 409.5 \\ +\bottomrule +\end{tabular} diff --git a/papers/anom_combined/tables/bound_numbers.tex b/papers/anom_combined/tables/bound_numbers.tex new file mode 100644 index 00000000..d2c6a23f --- /dev/null +++ b/papers/anom_combined/tables/bound_numbers.tex @@ -0,0 +1,9 @@ +\newcommand{\bounddegradedkm}{0.44} +\newcommand{\boundgradgrav}{1.44} +\newcommand{\boundgradmag}{6.37} +\newcommand{\boundreqgrav}{0.6} +\newcommand{\boundreqmag}{2.8} +\newcommand{\boundscaleadxl}{38} +\newcommand{\boundscalephonegrav}{91} +\newcommand{\boundscalephonemag}{1{,}183} +\newcommand{\boundscalermthree}{0.6} diff --git a/papers/anom_combined/tables/dataset.tex b/papers/anom_combined/tables/dataset.tex new file mode 100644 index 00000000..1b700053 --- /dev/null +++ b/papers/anom_combined/tables/dataset.tex @@ -0,0 +1,11 @@ +\begin{tabular}{lrr} +\toprule + & Distance & Duration \\ +\midrule +Trajectories & 27 & \\ +Total & 4{,}338~km & 55.3~h \\ +Median & 141.8~km & 1.74~h \\ +Mean & 160.7~km & 2.05~h \\ +Range & 1.1--497.2~km & 0.11--4.95~h \\ +\bottomrule +\end{tabular} diff --git a/papers/anom_combined/tables/error_model.tex b/papers/anom_combined/tables/error_model.tex new file mode 100644 index 00000000..a5994ef0 --- /dev/null +++ b/papers/anom_combined/tables/error_model.tex @@ -0,0 +1,11 @@ +\begin{tabular}{llrrrrl} +\toprule +Sensor & Field & Bias seed & \(\sqrt{R}\) & Prior \(\sigma\) & Signal \(\sigma\) & SNR \\ +\midrule +Smartphone & Gravity (mGal) & 841.7 & 131.1 & 252.8 & 14.3 & 0.13 (0.38) \\ +Smartphone & Magnetic (nT) & 23{,}342.7 & 7{,}537.3 & 45{,}902.2 & 73.3 & 0.01 (0.04) \\ +\midrule +ADXL355 & Gravity (mGal) & 0.0 & 54.8 & 8{,}826.0 & 14.3 & 0.26 (0.48) \\ +RM3100 & Magnetic (nT) & 0.0 & 3.9 & 17.1 & 73.3 & 18.4 (56.7) \\ +\bottomrule +\end{tabular} diff --git a/papers/anom_combined/tables/numbers.tex b/papers/anom_combined/tables/numbers.tex new file mode 100644 index 00000000..5ef32a30 --- /dev/null +++ b/papers/anom_combined/tables/numbers.tex @@ -0,0 +1,140 @@ +\newcommand{\numdatasethours}{55.3} +\newcommand{\numdatasetkm}{4{,}338} +\newcommand{\numdedicatedekfbothbetter}{24} +\newcommand{\numdedicatedekfbothdmed}{46.7} +\newcommand{\numdedicatedekfbothn}{27} +\newcommand{\numdedicatedekfbothp}{\(<10^{-3}\)} +\newcommand{\numdedicatedekfbothratio}{0.890} +\newcommand{\numdedicatedekfbothworse}{3} +\newcommand{\numdedicatedekfgravbetter}{8} +\newcommand{\numdedicatedekfgravdmed}{3.6} +\newcommand{\numdedicatedekfgravn}{27} +\newcommand{\numdedicatedekfgravp}{0.17} +\newcommand{\numdedicatedekfgravratio}{1.005} +\newcommand{\numdedicatedekfgravworse}{19} +\newcommand{\numdedicatedekfmagbetter}{25} +\newcommand{\numdedicatedekfmagdmed}{48.0} +\newcommand{\numdedicatedekfmagn}{27} +\newcommand{\numdedicatedekfmagp}{\(<10^{-3}\)} +\newcommand{\numdedicatedekfmagratio}{0.891} +\newcommand{\numdedicatedekfmagworse}{2} +\newcommand{\numdedicatedrbpfbothbetter}{18} +\newcommand{\numdedicatedrbpfbothdmed}{93{,}107.4} +\newcommand{\numdedicatedrbpfbothn}{25} +\newcommand{\numdedicatedrbpfbothp}{0.22} +\newcommand{\numdedicatedrbpfbothratio}{0.875} +\newcommand{\numdedicatedrbpfbothworse}{7} +\newcommand{\numdedicatedrbpfgravbetter}{11} +\newcommand{\numdedicatedrbpfgravdmed}{45{,}017.9} +\newcommand{\numdedicatedrbpfgravn}{25} +\newcommand{\numdedicatedrbpfgravp}{0.37} +\newcommand{\numdedicatedrbpfgravratio}{1.157} +\newcommand{\numdedicatedrbpfgravworse}{14} +\newcommand{\numdedicatedrbpfmagbetter}{10} +\newcommand{\numdedicatedrbpfmagdmed}{38{,}029.5} +\newcommand{\numdedicatedrbpfmagn}{25} +\newcommand{\numdedicatedrbpfmagp}{0.41} +\newcommand{\numdedicatedrbpfmagratio}{1.088} +\newcommand{\numdedicatedrbpfmagworse}{15} +\newcommand{\numdedicatedukfbothbetter}{26} +\newcommand{\numdedicatedukfbothdmed}{43.5} +\newcommand{\numdedicatedukfbothn}{27} +\newcommand{\numdedicatedukfbothp}{\(<10^{-3}\)} +\newcommand{\numdedicatedukfbothratio}{0.899} +\newcommand{\numdedicatedukfbothworse}{1} +\newcommand{\numdedicatedukfgravbetter}{8} +\newcommand{\numdedicatedukfgravdmed}{4.5} +\newcommand{\numdedicatedukfgravn}{27} +\newcommand{\numdedicatedukfgravp}{0.049} +\newcommand{\numdedicatedukfgravratio}{1.011} +\newcommand{\numdedicatedukfgravworse}{19} +\newcommand{\numdedicatedukfmagbetter}{26} +\newcommand{\numdedicatedukfmagdmed}{45.3} +\newcommand{\numdedicatedukfmagn}{27} +\newcommand{\numdedicatedukfmagp}{\(<10^{-3}\)} +\newcommand{\numdedicatedukfmagratio}{0.901} +\newcommand{\numdedicatedukfmagworse}{1} +\newcommand{\numekfdegradedmedian}{440.4} +\newcommand{\numekfdegradedn}{27} +\newcommand{\numekfdegradedvmedian}{23.4} +\newcommand{\numekffullmedian}{4.1} +\newcommand{\numekffulln}{27} +\newcommand{\numekffullvmedian}{1.6} +\newcommand{\numphoneekfbothbetter}{8} +\newcommand{\numphoneekfbothdmed}{0.4} +\newcommand{\numphoneekfbothn}{27} +\newcommand{\numphoneekfbothp}{0.46} +\newcommand{\numphoneekfbothratio}{1.001} +\newcommand{\numphoneekfbothworse}{19} +\newcommand{\numphoneekfgravbetter}{7} +\newcommand{\numphoneekfgravdmed}{0.5} +\newcommand{\numphoneekfgravn}{27} +\newcommand{\numphoneekfgravp}{0.18} +\newcommand{\numphoneekfgravratio}{1.001} +\newcommand{\numphoneekfgravworse}{20} +\newcommand{\numphoneekfmagbetter}{12} +\newcommand{\numphoneekfmagdmed}{0.0} +\newcommand{\numphoneekfmagn}{27} +\newcommand{\numphoneekfmagp}{0.93} +\newcommand{\numphoneekfmagratio}{1.000} +\newcommand{\numphoneekfmagworse}{15} +\newcommand{\numphonerbpfbothbetter}{13} +\newcommand{\numphonerbpfbothdmed}{16{,}894.9} +\newcommand{\numphonerbpfbothn}{25} +\newcommand{\numphonerbpfbothp}{0.83} +\newcommand{\numphonerbpfbothratio}{0.950} +\newcommand{\numphonerbpfbothworse}{12} +\newcommand{\numphonerbpfgravbetter}{14} +\newcommand{\numphonerbpfgravdmed}{50{,}720.4} +\newcommand{\numphonerbpfgravn}{25} +\newcommand{\numphonerbpfgravp}{0.44} +\newcommand{\numphonerbpfgravratio}{0.890} +\newcommand{\numphonerbpfgravworse}{11} +\newcommand{\numphonerbpfmagbetter}{12} +\newcommand{\numphonerbpfmagdmed}{1{,}564.1} +\newcommand{\numphonerbpfmagn}{26} +\newcommand{\numphonerbpfmagp}{0.35} +\newcommand{\numphonerbpfmagratio}{1.024} +\newcommand{\numphonerbpfmagworse}{14} +\newcommand{\numphoneukfbothbetter}{8} +\newcommand{\numphoneukfbothdmed}{0.5} +\newcommand{\numphoneukfbothn}{27} +\newcommand{\numphoneukfbothp}{0.14} +\newcommand{\numphoneukfbothratio}{1.001} +\newcommand{\numphoneukfbothworse}{19} +\newcommand{\numphoneukfgravbetter}{9} +\newcommand{\numphoneukfgravdmed}{0.4} +\newcommand{\numphoneukfgravn}{27} +\newcommand{\numphoneukfgravp}{0.13} +\newcommand{\numphoneukfgravratio}{1.001} +\newcommand{\numphoneukfgravworse}{18} +\newcommand{\numphoneukfmagbetter}{13} +\newcommand{\numphoneukfmagdmed}{0.0} +\newcommand{\numphoneukfmagn}{27} +\newcommand{\numphoneukfmagp}{0.86} +\newcommand{\numphoneukfmagratio}{1.000} +\newcommand{\numphoneukfmagworse}{14} +\newcommand{\numrbpfdegradedmedian}{664.6~km} +\newcommand{\numrbpfdegradedn}{25} +\newcommand{\numrbpfdegradedvmedian}{409.5} +\newcommand{\numrbpffullmedian}{1.9} +\newcommand{\numrbpffulln}{27} +\newcommand{\numrbpffullvmedian}{1.6} +\newcommand{\numsensekfcount}{1} +\newcommand{\numsensekfmaxm}{261} +\newcommand{\numsensekfmedianpct}{0} +\newcommand{\numsensekfn}{27} +\newcommand{\numsensrbpfcount}{22} +\newcommand{\numsensrbpfmaxm}{915{,}818} +\newcommand{\numsensrbpfmedianpct}{20} +\newcommand{\numsensrbpfn}{25} +\newcommand{\numsensukfcount}{0} +\newcommand{\numsensukfmaxm}{0} +\newcommand{\numsensukfmedianpct}{0} +\newcommand{\numsensukfn}{27} +\newcommand{\numukfdegradedmedian}{430.4} +\newcommand{\numukfdegradedn}{27} +\newcommand{\numukfdegradedvmedian}{24.0} +\newcommand{\numukffullmedian}{4.0} +\newcommand{\numukffulln}{27} +\newcommand{\numukffullvmedian}{1.6} diff --git a/papers/anom_combined/tables/phone_numbers.tex b/papers/anom_combined/tables/phone_numbers.tex new file mode 100644 index 00000000..be8bff32 --- /dev/null +++ b/papers/anom_combined/tables/phone_numbers.tex @@ -0,0 +1,9 @@ +\newcommand{\phonegravcorr}{-0.055} +\newcommand{\phonegravcorrn}{27} +\newcommand{\phonegravpinned}{85} +\newcommand{\phonegravslope}{-0.02} +\newcommand{\phonemagamplitude}{14.7} +\newcommand{\phonemagmapsd}{72} +\newcommand{\phonemagn}{25} +\newcommand{\phonemagrsq}{52} +\newcommand{\phonemagspread}{8.3} diff --git a/papers/anom_combined/tables/rbpf.tex b/papers/anom_combined/tables/rbpf.tex new file mode 100644 index 00000000..658d5db2 --- /dev/null +++ b/papers/anom_combined/tables/rbpf.tex @@ -0,0 +1,13 @@ +\begin{tabular}{llrrcc} +\toprule +Observations & Aiding & \(n\) & Unaided median & Aided median & B/W \\ +\midrule +Smartphone & Gravity & 25 & 801.7~km & 750.2~km & 14/11 \\ + & Magnetic & 26 & 817.9~km & 686.8~km & 12/14 \\ + & Combined & 25 & 801.7~km & 794.4~km & 13/12 \\ +\midrule +Dedicated & Gravity & 25 & 664.7~km & 844.7~km & 11/14 \\ + & Magnetic & 25 & 664.7~km & 730.8~km & 10/15 \\ + & Combined & 25 & 664.7~km & 749.0~km & 18/7 \\ +\bottomrule +\end{tabular} diff --git a/papers/anom_combined/tables/rbpf_numbers.tex b/papers/anom_combined/tables/rbpf_numbers.tex new file mode 100644 index 00000000..729cda12 --- /dev/null +++ b/papers/anom_combined/tables/rbpf_numbers.tex @@ -0,0 +1,6 @@ +\newcommand{\rbpfdiagcrossed}{24} +\newcommand{\rbpfdiagcrossingmin}{6} +\newcommand{\rbpfdiagdrives}{25} +\newcommand{\rbpfdiagerrorkm}{879} +\newcommand{\rbpfdiagratio}{14{,}416} +\newcommand{\rbpfdiagsigmam}{74} diff --git a/papers/mems_nav_data/.gitignore b/papers/mems_nav_data/.gitignore new file mode 100644 index 00000000..ea8082c1 --- /dev/null +++ b/papers/mems_nav_data/.gitignore @@ -0,0 +1,10 @@ +# LaTeX build outputs; scripts/build.py regenerates tables/ and figures/, which are tracked. +main.pdf +*.bcf +*.blg +*.run.xml +*.fls +*.out +*.spl +*.synctex.gz +__pycache__/ diff --git a/papers/mems_nav_data/NOTES.md b/papers/mems_nav_data/NOTES.md new file mode 100644 index 00000000..935aeb94 --- /dev/null +++ b/papers/mems_nav_data/NOTES.md @@ -0,0 +1,128 @@ +# Open items for the authors + +Status: complete draft for *Data in Brief*. It compiles cleanly (`latexmk -pdf main.tex`: no errors, warnings, undefined references or overfull boxes). It runs to 22 pages in the `elsarticle` 12pt preprint layout, and `texcount` gives about 4,100 words of running text plus 360 words of captions. Every red `[TODO: ...]` in the PDF is listed in section 1, and **none may remain at submission**. + +## 1. Placeholders in the manuscript + +| Where | TODO | Needs | +|---|---|---| +| `main.tex` affiliation | `[TODO: department]` | Department name(s) for both authors (Temple University is all that is stated now). | +| Specifications table, Subject | choose from the Data in Brief subject list | DiB has a fixed subject list; "Engineering" is a guess. | +| Specifications table, Data collection | describe placement and mounting in the vehicle, and the vehicles used | Not recorded anywhere I could find. Reviewers will ask. | +| Specifications table, Data accessibility | new Zenodo DOI (twice) | See section 2. | +| Sec. 2.1 Repository layout | new Zenodo DOI; confirm final directory names | The `raw/ processed/ maps/ benchmark/` layout is a **proposal**. Make the record match it or edit the text. | +| Sec. 3.1 Collection | how the phones were held; whether that changed during a drive; which vehicles | As above. | +| Sec. 3.1 Collection | confirm no extra hardware or external reference receiver | I assumed none; nothing in the data suggests one. | +| Sec. 3.6 Baselines | which measurements each filter consumed; the strapdown-rs commit that produced the benchmark files | The current `core/src/messages.rs` emits barometric relative altitude and a magnetometer yaw at 1 Hz by default. The RBPF uses the barometer as a loop in its mechanization, not as an update. I could not tie the files in `data/output_real2` to a commit. | +| Sec. 4 Limitations | state what is known about phone placement | | +| Ethics statement | volunteers' written consent; IRB determination; trimming trace ends near residences; removing the `device id` field | See section 3. | +| CRediT | confirm roles, including funding acquisition | Drafted as JB: everything except supervision; PD: supervision and review. | +| Acknowledgements | funding statement | The volunteer names are carried over from the IJRR draft. | +| Competing interests | confirm | Standard "none" wording. | + +## 2. Zenodo release (author action) + +- The existing record (doi:10.5281/zenodo.17582434) holds the old preprint. The public GitHub repository `jbrodovsky/mems-nav-dataset` has 17 trajectories at about 1 Hz. This article describes a new release: + - all 29 raw recordings at their delivered rate (`data/raw`, 22.2 GB) + - the 27 processed 10 Hz trajectories **from `data/input_real`, not `data/input`**: `input/` carries simulated ADXL355/RM3100 `grav_*`/`mag_*` columns + - `segments.json` + - the three map tiles per trajectory + - the benchmark configs (`conf/real/{ekf,ukf,rbpf}_{truth,degraded}.toml`) and their `performance_summary.csv` files +- Decide between a new version of the existing record and a new concept DOI. Then fill both DOI placeholders and `memsnav-preprint` in `references.bib`. +- Licence: the GitHub dataset repository is MIT, which is a software licence. For data, CC BY 4.0 is the usual choice and is accepted by DiB. State the licence in the Specifications table once chosen. +- Before uploading, check: + - `data/raw/2023-08-06_14-48-05/` contains a stray zip from a 2025-06-21 recording. Its device id matches the 2025-06-26 iPhone recording. Inspect it or exclude it. + - `StudyMetadata.json` files exist in many 2025 recordings. I did not open them; check them for personal information. + - `2025-06-13_14-55-15` contains only `Metadata.csv` and an empty `Annotation.csv`. Ship it or drop it; the text currently counts it among the 29 and says it has no data. +- Map tiles are third-party products (SRTM15+, Sandwell et al. free-air anomaly, WDMAM) fetched through GMT. Confirm that redistributing the cropped tiles is permitted. If it is not, ship the PyGMT download step instead and edit Sec. 2.4. + +## 3. Ethics and privacy (author confirmation needed) + +- Most drives start and end at the same few places (for example around 40.10 N, 75.29 W, and 40.03 N, 75.22 W). Those are probably residences of the authors or volunteers. DiB requires explicit attention to identifiable location data. Consider trimming the first and last few hundred metres of every trace in the processed **and** raw files, or document consent for publishing them as they are. +- `Metadata.csv` carries an application-generated `device id` (8 distinct values for 7 models). Consider replacing it with an anonymous label. +- Volunteer consent and IRB status are unknown to me. + +## 4. Device list (confirm) + +The models are as logged: Pixel 6a, Pixel 9 Pro, Pixel 9 Pro XL, SM-S921U, SM-A146U, iPhone 12 mini and iPhone 13 mini. The manuscript names the Samsungs by model code only. If you want marketing names, SM-S921U is (I believe) the US Galaxy S24 and SM-A146U the US Galaxy A14 5G; please verify. The iPhone 12 mini appears under two different app device ids (4 recordings, and 2025-06-26). Say whether that is one phone after a reinstall or two phones. Table 1 groups by model either way. + +## 5. Numbers that differ from the brief, or were not recomputed + +Everything in the text comes from `tables/numbers.tex` (generated) or from a source given below. Discrepancies with the brief: + +- **2025-06-14_21-17-02.** The brief, and the comment in `conf/ekf_degraded.toml`, give 587 rows and a median advertised horizontal accuracy of 16.2 m. The current files give the following: + - 200 fixes in the raw `Location.csv`, 197 in the processed file, over 586 s (0.34 fixes/s, gaps up to 36.6 s) + - median horizontal accuracy 12.2 m (11.9 m in the raw file) + - 9 fixes at 999 m or worse, up to 1,100 m + + 587 is roughly the 1 Hz row count of a 586 s recording, so the old numbers probably come from the 1 Hz pipeline. The text uses the computed values. +- **Benchmark arm.** The brief points to `data/output/...` (headline: RBPF degraded n=25, median 665 km). `data/output` was run on `data/input`, the synthetic gravity/magnetic arm, with 1,000 RBPF particles. The released data are the phone channels, so Table 4 uses `data/output_real2` (`BENCHMARK_ARM = "phone"` in `build.py`), with 2,000 particles per `conf/real/rbpf_*.toml`. The EKF and UKF medians and every full-GNSS number are identical in the two arms. The differences: + + | Quantity | `output_real2` (used) | `output` | + |---|---|---| + | EKF degraded mean | 611.4 m | 601.7 m | + | RBPF degraded n | 26 (missing 2025-07-08_14-12-53) | 25 | + | RBPF degraded median | 817.7 km | 664.6 km | + + Set `BENCHMARK_ARM = "dedicated"` to switch. +- **Gravity norm.** The dissertation says "85% of samples within 1 mGal on the median trajectory". That is reproduced at 10 Hz (85%). At the **raw** rate, though, every sample of every recording except the SM-A146U lies within 1 mGal of the recording maximum (24 of 25 recordings). The text reports both; the 85% figure is an artefact of 0.1 s vector averaging. The dissertation's Pixel constant is 9.810002 m/s²; the median of the raw per-recording maxima here is 9.810004 m/s². The SM-A146U is **not** pinned: its deficit from its maximum has a median of 73 mGal and a 5th–95th percentile range of 22–156 mGal. +- **Cited from the dissertation, not recomputed:** + - the 56 µT body-fixed horizontal field + - the 57% of intensity variance explained by heading +- **Read from the pipeline, not recomputed:** the gravity and magnetic SNRs (0.13 and 0.01; best 0.38 and 0.04) come from `output_real2/geostats/geo_stats_pooled.json`. +- **Recomputed and matching the dissertation:** the hard-iron correction of 67–325 µT, as the median uncalibrated minus calibrated field over the 20 processed recordings that have `MagnetometerUncalibrated`. +- **New finding, worth checking before release.** iPhone GNSS altitude is lower than the Pixel 9 Pro's on shared road cells. The median difference is -46 m with an interquartile range of -112 to 0 m (1,837 cells). Other Android phones agree with the Pixel 9 Pro to within 6 m. A pure MSL-versus-ellipsoid datum difference would have the opposite sign (geoid about -33 m here), so the cause is unknown. The text reports the difference without explaining it. + +Numbers written literally in the prose, and their sources: + +| Value | Source | +|---|---| +| 10 Hz, 0.1 s bins, 5 s gap, 300 s minimum | `analysis/src/analysis/preprocess.py` | +| 10 ms request; 0 for barometer and location | `Metadata.csv` | +| Sensor Logger 1.18.0–1.48.0 | `Metadata.csv` | +| 147 s | `segments.json` | +| 17 trajectories at 1 Hz | `mems-nav-dataset/data/input` | +| 1 and 3 arc-min (about 1.9 and 5.6 km); 15 arc-sec | `preprocess.download_maps` | +| 60 s, 35 m / 500 s, 1.5 m/s / 100 s, ×5 (×25), seed 42 | `conf/real/*_degraded.toml` | +| 2,000 particles | `conf/real/rbpf_*.toml` | +| 13 of 27 trajectories | `tables/devices.tex` | +| 999 m sentinel threshold | chosen by me | +| 0.002° cells, 15 m/s | chosen by me, defined in `build.py` | +| 56 and 60 Hz | `tables/channels.tex` | + +## 6. References to verify + +These were added from memory or from the brief, and need their details checked: + +- `fu2020android`: ION GNSS+ 2020 pages and DOI +- `herath2020ronin`: ICRA 2020 pages and DOI +- `tozer2019srtm15` +- `wessel2019gmt` +- `sensorlogger`: author name, URL and year; the bib key in the old draft cited the awesome-sensor-logger GitHub repository +- `memsnav-preprint`: title, authors and year of the Zenodo record were **not** checked against Zenodo +- `strapdown-rs`: year; the note says "submitted to JOSS (under review)". Update when accepted, and do not cite it as a published 1.0. +- `brodovsky2026dissertation`: the title and the 2026 date come from `~/Code/dissertation/0-dissertation.tex`. Confirm the defence and acceptance status. +- The characterizations of other datasets in Background need confirming: which use navigation-grade references, the "last minutes" claim for the aerial and handheld sets, and the "dedicated inertial units" wording for ANSFL and the Yampolsky et al. dataset. +- Carried-over entries had abstracts, local file paths and URL-form DOIs stripped. `groves` was corrected to the 2nd edition (2013). + +## 7. Venue notes + +- **Data in Brief.** + - **APC: not verified.** Check the current fee and Temple's open-access agreements before submitting. + - DiB articles describe data and should not draw conclusions. The baseline subsection is written as validation and reference values, with no claims of superiority. A handling editor may still ask for it to be cut down. + - DiB normally expects a "Related research article". The ITM 2026 UKF paper is listed. Confirm that it is acceptable, or use "None". + - I did not verify DiB's word limits. The draft has about 4,100 words of text, within the 3,000–4,500 target set for this revision. +- **MDPI *Data* (fallback).** A Data Descriptor uses Summary, Data Description, Methods and User Notes. The content maps over directly: Specifications and Value become the Summary, and Limitations becomes User Notes. +- **Problems in the IJRR draft that this draft no longer has:** + - the "truth" framing (now "reference", with an explicit no-independent-reference limitation) + - the "education" framing + - "It's primary contribution it to" + - "available upon request" + - the attitude-update sign error. The new article does not restate the mechanization equations; it cites Groves (2013) and the software. + +## 8. Housekeeping + +- `scripts/build.py` imports `papers/anom_combined/scripts/{stats,build_figures}.py` unmodified and sets `sys.dont_write_bytecode`. An earlier run, before that flag was added, may have written `papers/anom_combined/scripts/__pycache__/`, which is git-ignored there. +- `scripts/raw_inventory.csv` and `scripts/trajectory_stats.csv` are build by-products (per-file rates and spans, and per-trajectory statistics). `device_id` is dropped from the latter. + +- **Benchmark provenance.** The benchmark table reads `data/output_real2`, whose run configurations were not archived (see `papers/anom_combined/NOTES.md`, item 6). The RBPF particle count is therefore a TODO in the text rather than the 2,000 that `conf/real/` lists. diff --git a/papers/mems_nav_data/README.md b/papers/mems_nav_data/README.md new file mode 100644 index 00000000..33cd6453 --- /dev/null +++ b/papers/mems_nav_data/README.md @@ -0,0 +1,32 @@ +# MEMS-Nav data article (Data in Brief) + +The revised MEMS-Nav data paper, retargeted from IJRR to Elsevier *Data in Brief* (fallback: MDPI *Data*). + +## Layout + +- `main.tex`: `elsarticle` preprint (12pt, author-year natbib), which `\input`s `sections/*.tex` in Data in Brief order +- `sections/`: abstract, specifications table, value of the data, background, data description, methods, limitations, statements +- `tables/`: **generated**, do not edit. `numbers.tex` holds one `\num...` macro for every number quoted in the prose +- `figures/`: **generated**, do not edit +- `scripts/build.py`: builds `tables/`, `figures/`, `scripts/raw_inventory.csv` and `scripts/trajectory_stats.csv` +- `references.bib`, `NOTES.md` (open items for the authors) + +## Rebuild + +```bash +# 1. tables, figures and in-text numbers (about a minute; reads ~23 GB of raw CSV once) +/home/james/Code/strapdown-rs/.venv/bin/python papers/mems_nav_data/scripts/build.py + +# 2. the PDF +cd papers/mems_nav_data && latexmk -pdf main.tex +``` + +`build.py` needs pandas, numpy, matplotlib and netCDF4, plus scipy (imported by the shared helper). It reads, and never writes: + +- `$STRAPDOWN_DATA/raw/*/`: the Sensor Logger recordings (read-only) +- `$STRAPDOWN_DATA/input_real/`: the released 10 Hz trajectories and map tiles. `input/` is **not** used for sensor statistics because its `grav_*`/`mag_*` columns are simulated +- `$STRAPDOWN_DATA/input/segments.json` +- `$STRAPDOWN_DATA/output/dataset_summary/dataset_summary.csv` +- `$STRAPDOWN_DATA/output_real2/{ekf,ukf,rbpf}/{truth,degraded}/performance/performance_summary.csv` and `output_real2/geostats/geo_stats_pooled.json` + +`STRAPDOWN_DATA` defaults to `/home/james/Code/strapdown-rs/data`. The loaders, the matplotlib style and the data root are imported unmodified from `papers/anom_combined/scripts/{stats,build_figures}.py`. The build is deterministic: two runs give byte-identical tables and figures. diff --git a/papers/mems_nav_data/figures/fig_gnss_accuracy.pdf b/papers/mems_nav_data/figures/fig_gnss_accuracy.pdf new file mode 100644 index 00000000..08471301 Binary files /dev/null and b/papers/mems_nav_data/figures/fig_gnss_accuracy.pdf differ diff --git a/papers/mems_nav_data/figures/fig_gravity_norm.pdf b/papers/mems_nav_data/figures/fig_gravity_norm.pdf new file mode 100644 index 00000000..ed3fdc4b Binary files /dev/null and b/papers/mems_nav_data/figures/fig_gravity_norm.pdf differ diff --git a/papers/mems_nav_data/figures/fig_tracks.pdf b/papers/mems_nav_data/figures/fig_tracks.pdf new file mode 100644 index 00000000..e0bc3d4e Binary files /dev/null and b/papers/mems_nav_data/figures/fig_tracks.pdf differ diff --git a/papers/mems_nav_data/main.tex b/papers/mems_nav_data/main.tex new file mode 100644 index 00000000..1f166cc5 --- /dev/null +++ b/papers/mems_nav_data/main.tex @@ -0,0 +1,61 @@ +\documentclass[preprint,12pt,authoryear]{elsarticle} + +\usepackage[T1]{fontenc} +\usepackage{amsmath} +\usepackage{graphicx} +\usepackage{booktabs} +\usepackage{makecell} +\usepackage{tabularx} +\usepackage{array} +\usepackage{longtable} +\usepackage{microtype} +\usepackage{xcolor} +\usepackage{url} +\usepackage[hidelinks]{hyperref} +\usepackage[capitalise,noabbrev]{cleveref} +\pdfstringdefDisableCommands{\def\corref#1{}} +\emergencystretch=2em + +\input{tables/numbers.tex} + +% Visible placeholder for anything the authors still have to supply. Every use is listed in +% NOTES.md; a submission must not contain one. +\newcommand{\todo}[1]{\textbf{\textcolor{red}{[TODO: #1]}}} + +\journal{Data in Brief} + +\begin{document} + +\begin{frontmatter} + +\title{MEMS-Nav: \numTotalHours\texorpdfstring{~}{ }hours of synchronized smartphone inertial, GNSS, barometric and magnetic recordings from road vehicles for research on GNSS-degraded navigation} + +\author[tu]{James Brodovsky\corref{cor1}} +\ead{jbrodovsky@temple.edu} +\author[tu]{Philip Dames} +\cortext[cor1]{Corresponding author.} +\affiliation[tu]{organization={Temple University}, addressline={[TODO: department]}, + city={Philadelphia}, state={PA}, postcode={19122}, country={USA}} + +\begin{abstract} +\input{sections/abstract} +\end{abstract} + +\begin{keyword} +Inertial navigation \sep MEMS inertial measurement unit \sep Smartphone sensors \sep GNSS degradation \sep Sensor fusion \sep Kalman filter \sep Geophysical navigation \sep Magnetometer +\end{keyword} + +\end{frontmatter} + +\input{sections/specifications} +\input{sections/value} +\input{sections/background} +\input{sections/description} +\input{sections/methods} +\input{sections/limitations} +\input{sections/statements} + +\bibliographystyle{elsarticle-harv} +\bibliography{references} + +\end{document} diff --git a/papers/mems_nav_data/references.bib b/papers/mems_nav_data/references.bib new file mode 100644 index 00000000..2965ad34 --- /dev/null +++ b/papers/mems_nav_data/references.bib @@ -0,0 +1,373 @@ +% references.bib for the MEMS-Nav Data in Brief article. +% Entries below the first block are carried over from papers/data_paper/references.bib with +% abstracts, local file paths and URL-form DOIs removed. Entries marked VERIFY in NOTES.md were +% added from memory and need their bibliographic details checked before submission. + +@book{groves, + author = {Groves, Paul D.}, + title = {Principles of {GNSS}, Inertial, and Multisensor Integrated Navigation Systems}, + edition = {2}, + publisher = {Artech House}, + address = {Boston}, + year = {2013}, + isbn = {978-1-60807-005-3} +} + +@misc{strapdown-rs, + author = {Brodovsky, James}, + title = {strapdown-rs: Strapdown inertial navigation and {GNSS}-degradation simulation in {Rust}}, + year = {2026}, + howpublished = {Software, \url{https://github.com/jbrodovsky/strapdown-rs}}, + note = {Submitted to the Journal of Open Source Software (under review)} +} + +@phdthesis{brodovsky2026dissertation, + author = {Brodovsky, James Alexander}, + title = {Robust Inertial Navigation in {GNSS}-Denied Environments Using {MEMS} Grade Sensors and Passive Geophysical Aiding}, + school = {Temple University}, + address = {Philadelphia, PA}, + year = {2026} +} + +@misc{memsnav-preprint, + author = {Brodovsky, James and Dames, Philip}, + title = {{MEMS-Nav}: A {MEMS}-Grade Dataset for Navigation Research}, + year = {2025}, + howpublished = {Zenodo}, + doi = {10.5281/zenodo.17582434} +} + +@misc{sensorlogger, + author = {Choi, Tsz Hei}, + title = {Sensor Logger}, + year = {2025}, + howpublished = {Mobile application for Android and {iOS}, \url{https://www.tszheichoi.com/sensorlogger}}, + note = {Versions 1.18.0--1.48.0 were used; companion resources at \url{https://github.com/tszheichoi/awesome-sensor-logger}} +} + +@misc{wmm, + author = {{NOAA NCEI Geomagnetic Modeling Team and British Geological Survey}}, + title = {World Magnetic Model 2025}, + year = {2024}, + publisher = {NOAA National Centers for Environmental Information}, + doi = {10.25921/aqfd-sd83}, + url = {https://www.ncei.noaa.gov/products/world-magnetic-model} +} + +@inproceedings{anom-ukf, + author = {Brodovsky, James and Dames, Philip}, + title = {Navigation in {GNSS}-denied environments using {MEMS}-grade sensors and geophysical anomalies: A {UKF} approach}, + booktitle = {Proceedings of the 2026 International Technical Meeting of the Institute of Navigation}, + address = {Anaheim, California}, + publisher = {Institute of Navigation}, + pages = {155--164}, + year = {2026}, + doi = {10.33012/2026.20508} +} + +@inproceedings{anom-pf, + author = {Brodovsky, James and Dames, Philip}, + title = {Navigation in {GNSS}-Denied Environments Using {MEMS}-Grade Sensors and Geophysical Anomalies: A Particle Filter Approach}, + booktitle = {Proceedings of the {ION} 2026 Pacific {PNT} Meeting}, + address = {Honolulu, Hawaii}, + publisher = {Institute of Navigation}, + pages = {399--410}, + year = {2026}, + doi = {10.33012/2026.20618} +} + +@article{wessel2019gmt, + author = {Wessel, Paul and Luis, Joaquim F. and Uieda, Leonardo and Scharroo, Remko and Wobbe, Florian and Smith, Walter H. F. and Tian, Dongdong}, + title = {The {Generic Mapping Tools} Version 6}, + journal = {Geochemistry, Geophysics, Geosystems}, + volume = {20}, + number = {11}, + pages = {5556--5564}, + year = {2019}, + doi = {10.1029/2019GC008515} +} + +@article{tozer2019srtm15, + author = {Tozer, Brook and Sandwell, David T. and Smith, Walter H. F. and Olson, Christopher and Beale, James R. and Wessel, Paul}, + title = {Global Bathymetry and Topography at 15 Arc Sec: {SRTM15+}}, + journal = {Earth and Space Science}, + volume = {6}, + number = {10}, + pages = {1847--1864}, + year = {2019}, + doi = {10.1029/2019EA000658} +} + +@inproceedings{fu2020android, + author = {Fu, Guoyu Michael and Khider, Mohammed and van Diggelen, Frank}, + title = {Android Raw {GNSS} Measurement Datasets for Precise Positioning}, + booktitle = {Proceedings of the 33rd International Technical Meeting of the Satellite Division of the Institute of Navigation ({ION} {GNSS+} 2020)}, + pages = {1925--1937}, + year = {2020}, + doi = {10.33012/2020.17628} +} + +@inproceedings{herath2020ronin, + author = {Herath, Sachini and Yan, Hang and Furukawa, Yasutaka}, + title = {{RoNIN}: Robust Neural Inertial Navigation in the Wild: Benchmark, Evaluations, \& New Methods}, + booktitle = {2020 IEEE International Conference on Robotics and Automation (ICRA)}, + pages = {3146--3152}, + year = {2020}, + doi = {10.1109/ICRA40945.2020.9196860} +} + +@article{9112619, + author = {Miralles, Damian and Bornot, Aurelie and Rouquette, Paul and Levigne, Nathan and Akos, Dennis M. and Chen, Yu-Hsuan and Lo, Sherman and Walter, Todd}, + journal = {IEEE Intelligent Transportation Systems Magazine}, + title = {An Assessment of GPS Spoofing Detection Via Radio Power and Signal Quality Monitoring for Aviation Safety Operations}, + year = {2020}, + volume = {12}, + number = {3}, + pages = {136-146}, + doi = {10.1109/MITS.2020.2994117} +} + +@article{ansfl, + author = {Shurin, Artur and Saraev, Alex and Yona, Mor and Gutnik, Yivgeni and Faber, Sharon and Etzion, Aviad and Klein, Itzik}, + journal = {IEEE Access}, + title = {The Autonomous Platforms Inertial Dataset}, + year = {2022}, + doi = {10.1109/ACCESS.2022.3144076} +} + +@article{burri2016euroc, + title = {The {EuRoC} micro aerial vehicle datasets}, + author = {Burri, Michael and Nikolic, Janosch and Gohl, Pascal and Schneider, Thomas and Rehder, Joern and Omari, Sammy and Achtelik, Markus W and Siegwart, Roland}, + journal = {The International Journal of Robotics Research}, + volume = {35}, + number = {10}, + pages = {1157--1163}, + year = {2016}, + publisher = {SAGE Publications Sage UK: London, England} +} + +@article{canciani2016absolute, + title = {Absolute positioning using the Earth's magnetic anomaly field}, + author = {Canciani, Aaron and Raquet, John}, + journal = {NAVIGATION: Journal of the Institute of Navigation}, + volume = {63}, + number = {2}, + pages = {111--126}, + year = {2016}, + publisher = {Wiley Online Library} +} + +@article{canciani2017airborne, + title = {Airborne magnetic anomaly navigation}, + author = {Canciani, Aaron and Raquet, John}, + journal = {IEEE Transactions on aerospace and electronic systems}, + volume = {53}, + number = {1}, + pages = {67--80}, + year = {2017}, + publisher = {IEEE} +} + +@article{EGM2008, + author = {Pavlis, Nikolaos K. and Holmes, Simon A. and Kenyon, Steve C. and Factor, John K.}, + title = {The development and evaluation of the Earth Gravitational Model 2008 (EGM2008)}, + journal = {Journal of Geophysical Research: Solid Earth}, + volume = {117}, + number = {B4}, + pages = {}, + doi = {10.1029/2011JB008916}, + url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2011JB008916}, + year = {2012} +} + +@article{ford-campus, + title = {Ford campus vision and lidar data set}, + author = {Pandey, Gaurav and McBride, James R and Eustice, Ryan M}, + journal = {The International Journal of Robotics Research}, + volume = {30}, + number = {13}, + pages = {1543--1552}, + year = {2011}, + publisher = {SAGE Publications Sage UK: London, England} +} + +@article{gravnav, + author = {Wu, Lin and Wang, Hubiao and Chai, Hua and Zhang, Lu and Hsu, Houtse and Wang, Yong}, + title = {Performance Evaluation and Analysis for Gravity Matching Aided Navigation}, + journal = {Sensors}, + volume = {17}, + year = {2017}, + number = {4}, + article-number = {769}, + url = {https://www.mdpi.com/1424-8220/17/4/769}, + issn = {1424-8220}, + doi = {10.3390/s17040769} +} + +@article{kaist-urban, + title = {Complex urban dataset with multi-level sensors from highly diverse urban environments}, + author = {Jeong, Jinyong and Cho, Younggun and Shin, Young-Sik and Roh, Hyunchul and Kim, Ayoung}, + journal = {The International Journal of Robotics Research}, + volume = {38}, + number = {6}, + pages = {642--657}, + year = {2019}, + publisher = {SAGE Publications Sage UK: London, England} +} + +@article{kitti, + title = {Vision meets robotics: The {KITTI} dataset}, + author = {Geiger, Andreas and Lenz, Philip and Stiller, Christoph and Urtasun, Raquel}, + journal = {The international journal of robotics research}, + volume = {32}, + number = {11}, + pages = {1231--1237}, + year = {2013}, + publisher = {Sage Publications Sage UK: London, England} +} + +@article{mit-darpa, + title = {A high-rate, heterogeneous data set from the {DARPA} urban challenge}, + author = {Huang, Albert S and Antone, Matthew and Olson, Edwin and Fletcher, Luke and Moore, David and Teller, Seth and Leonard, John}, + journal = {The International Journal of Robotics Research}, + volume = {29}, + number = {13}, + pages = {1595--1601}, + year = {2010}, + publisher = {Sage Publications Sage UK: London, England} +} + +@article{nclt, + title = {University of Michigan North Campus long-term vision and lidar dataset}, + author = {Carlevaris-Bianco, Nicholas and Ushani, Arash K and Eustice, Ryan M}, + journal = {The International Journal of Robotics Research}, + volume = {35}, + number = {9}, + pages = {1023--1035}, + year = {2016}, + publisher = {Sage Publications Sage UK: London, England} +} + +@inproceedings{newer-college, + title = {The newer college dataset: Handheld lidar, inertial and vision with ground truth}, + author = {Ramezani, Milad and Wang, Yiduo and Camurri, Marco and Wisth, David and Mattamala, Matias and Fallon, Maurice}, + booktitle = {2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)}, + pages = {4353--4360}, + year = {2020}, + organization = {IEEE} +} + +@article{nguyen2022ntu, + title = {Ntu viral: A visual-inertial-ranging-lidar dataset, from an aerial vehicle viewpoint}, + author = {Nguyen, Thien-Minh and Yuan, Shenghai and Cao, Muqing and Lyu, Yang and Nguyen, Thien H and Xie, Lihua}, + journal = {The International Journal of Robotics Research}, + volume = {41}, + number = {3}, + pages = {270--280}, + year = {2022}, + publisher = {SAGE Publications Sage UK: London, England} +} + +@article{oxford-robotcar, + title = {1 Year, 1000 km: The {Oxford RobotCar} Dataset}, + author = {Maddern, Will and Pascoe, Geoffrey and Linegar, Chris and Newman, Paul}, + journal = {The International Journal of Robotics Research}, + volume = {36}, + number = {1}, + pages = {3--15}, + year = {2017}, + publisher = {SAGE Publications Sage UK: London, England} +} + +# Maps + +@article{SANDWELL20211059, + title = {Gravity field recovery from geodetic altimeter missions}, + journal = {Advances in Space Research}, + volume = {68}, + number = {2}, + pages = {1059-1072}, + year = {2021}, + note = {25 Years of Progress in Radar Altimetry}, + issn = {0273-1177}, + doi = {10.1016/j.asr.2019.09.011}, + url = {https://www.sciencedirect.com/science/article/pii/S0273117719306593}, + author = {David T. Sandwell and Hugh Harper and Brook Tozer and Walter H.F. Smith}, +} + +@inproceedings{tum-vi, + title = {The TUM VI benchmark for evaluating visual-inertial odometry}, + author = {Schubert, David and Goll, Thore and Demmel, Nikolaus and Usenko, Vladyslav and St{\"u}ckler, J{\"o}rg and Cremers, Daniel}, + booktitle = {2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)}, + pages = {1680--1687}, + year = {2018}, + organization = {IEEE} +} + +@article{tyren1982magnetic, + title = {Magnetic anomalies as a reference for ground-speed and map-matching navigation}, + author = {Tyr{\'e}n, Carl}, + journal = {The Journal of navigation}, + volume = {35}, + number = {2}, + pages = {242--254}, + year = {1982}, + publisher = {Cambridge University Press} +} + +@inproceedings{uzh-fpv, + title = {Are we ready for autonomous drone racing? the UZH-FPV drone racing dataset}, + author = {Delmerico, Jeffrey and Cieslewski, Titus and Rebecq, Henri and Faessler, Matthias and Scaramuzza, Davide}, + booktitle = {2019 International Conference on Robotics and Automation (ICRA)}, + pages = {6713--6719}, + year = {2019}, + organization = {IEEE} +} + +@article{wdmam, + title = {Building the second version of the world digital magnetic anomaly map (WDMAM)}, + author = {Lesur, Vincent and Hamoudi, Mohamed and Choi, Yujin and Dyment, J{\'e}r{\^o}me and Th{\'e}bault, Erwan}, + journal = {Earth, Planets and Space}, + volume = {68}, + number = {1}, + pages = {27}, + year = {2016}, + publisher = {Springer} +} + +@article{yampolsky2024multiple, + title = {Multiple and Gyro-Free Inertial Datasets}, + author = {Yampolsky, Zeev and Stolero, Yair and Pri-Hadash, Nitsan and Solodar, Dan and Massas, Shira and Savin, Itai and Klein, Itzik}, + journal = {Scientific Data}, + volume = {11}, + number = {1}, + pages = {1080}, + year = {2024}, + publisher = {Nature Publishing Group UK London} +} + + +%%% Preprints + +@article{zhang_autonomous_2023, + title = {Autonomous Underwater Vehicle navigation: A review}, + volume = {273}, + issn = {0029-8018}, + url = {https://www.sciencedirect.com/science/article/pii/S0029801823002457}, + doi = {10.1016/j.oceaneng.2023.113861}, + pages = {113861}, + journal = {Ocean Engineering}, + author = {Zhang, Bingbing and Ji, Daxiong and Liu, Shuo and Zhu, Xinke and Xu, Wen}, + year = {2023}, +} + +@article{wang2022noise, + title={Noise content assessment in GNSS coordinate time-series with autoregressive and heteroscedastic random errors}, + author={Wang, Leyang and Wu, Qiwen and Wu, Fei and He, Xiaoxing}, + journal={Geophysical Journal International}, + volume={231}, + number={2}, + pages={856--876}, + year={2022}, + publisher={Oxford University Press} +} diff --git a/papers/mems_nav_data/scripts/build.py b/papers/mems_nav_data/scripts/build.py new file mode 100644 index 00000000..bd8d36fb --- /dev/null +++ b/papers/mems_nav_data/scripts/build.py @@ -0,0 +1,742 @@ +"""Build every table, figure and in-text number of the MEMS-Nav data article. + +Run from anywhere:: + + /home/james/Code/strapdown-rs/.venv/bin/python papers/mems_nav_data/scripts/build.py + +Inputs (all read-only) live under ``STRAPDOWN_DATA`` (default: the main checkout's ``data/``): + +- ``raw//``: the Sensor Logger exports, one directory per recording +- ``input_real/*.csv``: the 10 Hz trajectories with the phones' own gravity and magnetometer + channels -- the files this article describes. (``input/`` carries simulated + gravimeter/magnetometer norms and is *not* the released data.) +- ``input/segments.json``: which recording each trajectory was cut from +- ``output/dataset_summary/dataset_summary.csv``: per-trajectory distance and duration +- ``output_real2/{ekf,ukf,rbpf}/{truth,degraded}/performance/``: benchmark scores on the + phone data +- ``output_real2/geostats/geo_stats_pooled.json``: anomaly signal-to-noise ratios + +Outputs: ``tables/*.tex``, ``figures/*.pdf`` and ``tables/numbers.tex`` (one ``\\newcommand`` per +number quoted in the prose). Nothing is random; repeated runs give identical tables. + +Helpers are reused, unmodified, from ``papers/anom_combined/scripts`` (``stats.py`` for the +data root, the performance loader and the dataset summary; ``build_figures.py`` for the +matplotlib style and the great-circle distance). +""" + +from __future__ import annotations + +import datetime +import json +import os +import sys +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path + +import matplotlib.pyplot as plt +import netCDF4 +import numpy as np +import pandas as pd + +sys.dont_write_bytecode = True # leave no __pycache__ beside the borrowed anom_combined helpers + +HERE = Path(__file__).resolve().parent +PAPER = HERE.parent +sys.path.insert(0, str(PAPER.parent / "anom_combined" / "scripts")) +import build_figures as bf # noqa: E402 (sets the shared matplotlib style on import) +import stats # noqa: E402 + +DATA = stats.DATA +RAW = DATA / "raw" +RELEASE = DATA / "input_real" +SEGMENTS = DATA / "input" / "segments.json" +BENCHMARK_ARM = "phone" # output_real2: run on the phone channels that are released +TABLES = PAPER / "tables" +FIGURES = PAPER / "figures" +GNSS_COLUMNS = ("horizontalAccuracy", "verticalAccuracy", "speedAccuracy") +MGAL_PER_MPS2 = 1e5 +PINNED_TOLERANCE_MGAL = 1.0 +RATE_PROBE_ROWS = 200_000 + +# Device families, in a fixed order that also fixes their colour (validated categorical +# slots 1-5 of the reference palette; every series also carries its own marker/line style). +FAMILY_OF_MODEL = { + "Pixel 6a": "Pixel 6a", + "Pixel 9 Pro": "Pixel 9 Pro / Pro XL", + "Pixel 9 Pro XL": "Pixel 9 Pro / Pro XL", + "SM-S921U": "Samsung SM-S921U", + "SM-A146U": "Samsung SM-A146U", + "iPhone 12 mini": "iPhone 12/13 mini", + "iPhone 13 mini": "iPhone 12/13 mini", +} +FAMILIES = ( + "Pixel 6a", + "Pixel 9 Pro / Pro XL", + "Samsung SM-S921U", + "Samsung SM-A146U", + "iPhone 12/13 mini", +) +FAMILY_COLOR = dict( + zip(FAMILIES, ("#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4"), strict=True) +) +FAMILY_STYLE = dict(zip(FAMILIES, ("-", "--", "-.", ":", (0, (5, 1, 1, 1))), strict=True)) + + +# -------------------------------------------------------------------------------------------- +# Formatting + + +def thousands(value: float, digits: int = 0) -> str: + """Format with a LaTeX thousands separator.""" + return f"{value:,.{digits}f}".replace(",", "{,}") + + +def thousands_plain(value: float) -> str: + """Format an integer count with a comma separator (for figure text).""" + return f"{value:,.0f}" + + +def tex_escape(text: str) -> str: + """Escape the characters that appear in recording stems and model names.""" + return text.replace("_", r"\_").replace("&", r"\&") + + +def write(name: str, body: str) -> None: + """Write one generated LaTeX fragment.""" + TABLES.mkdir(exist_ok=True) + (TABLES / name).write_text(body) + print(f"wrote tables/{name}") + + +def save(fig: plt.Figure, name: str) -> None: + """Write one vector figure into this paper's directory (not anom_combined's).""" + FIGURES.mkdir(exist_ok=True) + fig.savefig(FIGURES / f"{name}.pdf", metadata={"CreationDate": None, "ModDate": None}) + plt.close(fig) + print(f"wrote figures/{name}.pdf") + + +# -------------------------------------------------------------------------------------------- +# Loading + + +def segments() -> pd.DataFrame: + """Every preprocessing outcome, one row per recording or segment.""" + frame = pd.DataFrame(json.loads(SEGMENTS.read_text())) + frame["stem"] = frame["output"].str.removesuffix(".csv") + return frame + + +def metadata(recording: str) -> dict[str, str]: + """Device and app fields of one recording's Metadata.csv.""" + row = pd.read_csv(RAW / recording / "Metadata.csv", dtype=str).iloc[0] + model = row["device name"] + return { + "recording": recording, + "model": model, + "family": FAMILY_OF_MODEL[model], + "platform": {"android": "Android", "ios": "iOS"}[row["platform"]], + "app": row["appVersion"], + "device_id": row["device id"], + "utc_named": datetime.datetime.fromtimestamp( + int(row["recording epoch time"]) / 1000, datetime.UTC + ).strftime("%Y-%m-%d_%H-%M-%S") + == row["recording time"], + } + + +def scan_file(path: Path) -> dict: + """Row count, span and median sampling interval of one raw sensor CSV.""" + rows = 0 + with path.open("rb") as handle: + handle.readline() + while chunk := handle.read(1 << 24): + rows += chunk.count(b"\n") + record = { + "recording": path.parent.name, + "file": path.stem, + "rows": rows, + "bytes": path.stat().st_size, + "span_s": np.nan, + "median_hz": np.nan, + } + if rows > 1: + probe = pd.read_csv(path, usecols=["seconds_elapsed"], nrows=RATE_PROBE_ROWS)[ + "seconds_elapsed" + ] + steps = probe.diff().dropna() + steps = steps[steps > 0] + record["median_hz"] = 1.0 / float(steps.median()) + last = pd.read_csv(path, usecols=["seconds_elapsed"], skiprows=range(1, max(rows - 1, 1))) + record["span_s"] = float(last["seconds_elapsed"].iloc[-1] - probe.iloc[0]) + return record + + +def raw_inventory() -> pd.DataFrame: + """One row per raw sensor file of every recording.""" + files = sorted( + p for p in RAW.glob("*/*.csv") if p.name not in ("Metadata.csv", "Annotation.csv") + ) + with ThreadPoolExecutor(max_workers=min(12, os.cpu_count() or 1)) as pool: + return pd.DataFrame(list(pool.map(scan_file, files))) + + +def trajectory_table(kept: pd.DataFrame) -> pd.DataFrame: + """Per-trajectory statistics of the released 10 Hz files.""" + summary = stats.dataset_summary() + rows = [] + for _, seg in kept.sort_values("stem").iterrows(): + frame = pd.read_csv(RELEASE / f"{seg['stem']}.csv") + gnss = frame.dropna(subset=["latitude", "longitude"]) + time = pd.to_datetime(frame["time"], utc=True, format="mixed") + span = (time.iloc[-1] - time.iloc[0]).total_seconds() + norm = np.sqrt(frame["grav_x"] ** 2 + frame["grav_y"] ** 2 + frame["grav_z"] ** 2).dropna() + meta = metadata(seg["source"]) + rows.append( + { + "stem": seg["stem"], + "source": seg["source"], + **meta, + "rows": len(frame), + "fixes": len(gnss), + "span_s": span, + "fix_rate_hz": len(gnss) / span, + "km": float(summary.loc[seg["stem"], "Distance Traversed (km)"]), + "hours": float(summary.loc[seg["stem"], "Duration (h)"]), + "h_acc": gnss["horizontalAccuracy"].median(), + "h_acc_p95": gnss["horizontalAccuracy"].quantile(0.95), + "v_acc": gnss["verticalAccuracy"].median(), + "s_acc": gnss["speedAccuracy"].median(), + "sentinels": int((gnss["horizontalAccuracy"] >= 999.0).sum()), + "speed_kmh": 3.6 * gnss["speed"].median(), + "lat_min": gnss["latitude"].min(), + "lat_max": gnss["latitude"].max(), + "lon_min": gnss["longitude"].min(), + "lon_max": gnss["longitude"].max(), + "alt_min": gnss["altitude"].min(), + "alt_max": gnss["altitude"].max(), + "baro_rows": int(frame["pressure"].notna().sum()), + "grav_10hz_pinned": float( + np.mean((norm.max() - norm) * MGAL_PER_MPS2 < PINNED_TOLERANCE_MGAL) + ), + } + ) + return pd.DataFrame(rows).set_index("stem") + + +def raw_gravity(recording: str) -> np.ndarray: + """Norm of the OS gravity vector at the raw rate, in m/s^2.""" + frame = pd.read_csv(RAW / recording / "Gravity.csv", usecols=["x", "y", "z"], dtype="float64") + return np.sqrt(frame["x"] ** 2 + frame["y"] ** 2 + frame["z"] ** 2).to_numpy() + + +def hard_iron_offset(recording: str) -> float | None: + """Magnitude (uT) of the OS hard-iron correction: median uncalibrated less median calibrated.""" + uncalibrated = RAW / recording / "MagnetometerUncalibrated.csv" + if not uncalibrated.exists() or uncalibrated.stat().st_size == 0: + return None + raw = pd.read_csv(uncalibrated, usecols=["x", "y", "z"]).median() + calibrated = pd.read_csv(RAW / recording / "Magnetometer.csv", usecols=["x", "y", "z"]).median() + return float(np.linalg.norm((raw - calibrated).to_numpy())) + + +def calibrated_intensity(stem: str) -> float: + """Median OS-calibrated magnetic intensity (uT) of one released trajectory.""" + frame = pd.read_csv(RELEASE / f"{stem}.csv", usecols=["mag_x", "mag_y", "mag_z"]).dropna() + return float(np.sqrt((frame**2).sum(axis=1)).median()) + + +ALTITUDE_CELL_DEG = 0.002 +ALTITUDE_MIN_SPEED_MPS = 15.0 + + +def altitude_offsets(traj: pd.DataFrame) -> dict[str, tuple[int, float, float, float]]: + """Median GNSS altitude of each family less the Pixel 9 Pro's, on shared road cells. + + Fixes above 15 m/s are binned into 0.002-degree cells; for every cell that both the + family and the Pixel 9 Pro / Pro XL family visited, the difference of their median + altitudes is taken. Returns (cells, median, lower quartile, upper quartile) per family. + """ + frames = [] + for stem, row in traj.iterrows(): + frame = pd.read_csv( + RELEASE / f"{stem}.csv", usecols=["latitude", "longitude", "altitude", "speed"] + ).dropna() + frame = frame[frame["speed"] > ALTITUDE_MIN_SPEED_MPS] + frame["cell_lat"] = np.round(frame["latitude"] / ALTITUDE_CELL_DEG).astype(int) + frame["cell_lon"] = np.round(frame["longitude"] / ALTITUDE_CELL_DEG).astype(int) + frame["family"] = row["family"] + frames.append(frame) + cells = ( + pd.concat(frames).groupby(["cell_lat", "cell_lon", "family"])["altitude"].median().unstack() + ) + reference = "Pixel 9 Pro / Pro XL" + result = {} + for family in FAMILIES: + if family == reference or family not in cells: + continue + diff = (cells[family] - cells[reference]).dropna() + if diff.size: + result[family] = ( + int(diff.size), + float(diff.median()), + float(diff.quantile(0.25)), + float(diff.quantile(0.75)), + ) + return result + + +# -------------------------------------------------------------------------------------------- +# Tables + + +def table_devices(traj: pd.DataFrame, recordings: pd.DataFrame) -> None: + """Device inventory: recordings, released trajectories, hours and distance.""" + lines = [ + r"\begin{tabular}{llrrrrl}", + r"\toprule", + r"Device (as logged) & OS & Rec. & Traj. & Hours & km & GNSS file \\", + r"\midrule", + ] + for model, group in recordings.groupby("model", sort=False): + sub = traj[traj["model"] == model] + gnss_file = ( + "LocationGps" + if group["has_location_gps"].all() + else ("Location" if not group["has_location_gps"].any() else "mixed") + ) + lines.append( + f"{tex_escape(model)} & {group['platform'].iloc[0]} & {len(group)} & {len(sub)} & " + f"{sub['hours'].sum():.1f} & {thousands(sub['km'].sum())} & \\texttt{{{gnss_file}}} \\\\" + ) + lines += [ + r"\midrule", + f"Total & & {len(recordings)} & {len(traj)} & {traj['hours'].sum():.1f} & " + f"{thousands(traj['km'].sum())} & \\\\", + r"\bottomrule", + r"\end{tabular}", + ] + write("devices.tex", "\n".join(lines) + "\n") + + +def rate_text( + inventory: pd.DataFrame, + used: list[str], + files: tuple[str, ...], + family: str, + families: dict[str, str], +) -> str: + """Median of the per-recording median sampling rates of a channel, for one family.""" + sub = inventory[inventory["recording"].isin([r for r in used if families[r] == family])] + for name in files: + values = sub[(sub["file"] == name) & (sub["rows"] > 1)]["median_hz"] + if not values.empty: + return f"{values.median():.0f}" + return "--" + + +def table_channels(inventory: pd.DataFrame, used: list[str], families: dict[str, str]) -> None: + """Sensor channels: raw file, released columns, unit and median raw rate per family.""" + channels = ( + ( + "Specific force", + ("TotalAcceleration", "Accelerometer"), + r"\texttt{acc\_*}", + r"m\,s\(^{-2}\)", + ), + ("Angular rate", ("Gyroscope",), r"\texttt{gyro\_*}", r"rad\,s\(^{-1}\)"), + ("Magnetic field", ("Magnetometer",), r"\texttt{mag\_*}", r"\(\mu\)T"), + ("Gravity (fused)", ("Gravity",), r"\texttt{grav\_*}", r"m\,s\(^{-2}\)"), + ("Attitude (fused)", ("Orientation",), r"\texttt{q*}, \texttt{roll}, \ldots", "--, rad"), + ("Pressure", ("Barometer",), r"\texttt{pressure}, \ldots", "hPa, m"), + ("GNSS fix", ("LocationGps", "Location"), r"\texttt{latitude}, \ldots", "see text"), + ) + header = " & ".join( + ["Channel", "Raw file", "Columns", "Unit"] + + [f"\\rotatebox{{90}}{{{tex_escape(f)}}}" for f in FAMILIES] + ) + lines = [ + r"\begin{tabular}{llll" + "r" * len(FAMILIES) + "}", + r"\toprule", + header + r" \\", + r"\midrule", + ] + for label, files, columns, unit in channels: + rates = [rate_text(inventory, used, files, f, families) for f in FAMILIES] + marker = {"TotalAcceleration": "a", "LocationGps": "b"}.get(files[0]) + raw_file = ( + r"\texttt{" + files[0] + "}" + (f"\\textsuperscript{{{marker}}}" if marker else "") + ) + lines.append(" & ".join([label, raw_file, columns, unit] + rates) + r" \\") + lines += [r"\bottomrule", r"\end{tabular}"] + write("channels.tex", "\n".join(lines) + "\n") + + +def table_trajectories(traj: pd.DataFrame) -> None: + """One row per released trajectory, with summary rows.""" + lines = [ + r"\begin{tabular}{llrrrrrrrr}", + r"\toprule", + r"Trajectory & Device & h & km & \makecell{Speed\\(km/h)} & Fixes & \makecell{Fix\\rate (Hz)} " + r"& \makecell{\(\sigma_h\)\\(m)} & \makecell{\(\sigma_v\)\\(m)} & \makecell{\(\sigma_s\)\\(m/s)} \\", + r"\midrule", + ] + for stem, row in traj.iterrows(): + lines.append( + f"{tex_escape(stem)} & {tex_escape(row['model'])} & {row['hours']:.2f} & {row['km']:.1f} & " + f"{row['speed_kmh']:.0f} & {thousands(row['fixes'])} & {row['fix_rate_hz']:.2f} & " + f"{row['h_acc']:.1f} & {row['v_acc']:.1f} & {row['s_acc']:.2f} \\\\" + ) + lines += [ + r"\midrule", + f"Total & & {traj['hours'].sum():.1f} & {thousands(traj['km'].sum())} & & " + f"{thousands(traj['fixes'].sum())} & & & & \\\\", + f"Median & & {traj['hours'].median():.2f} & {traj['km'].median():.1f} & " + f"{traj['speed_kmh'].median():.0f} & {thousands(traj['fixes'].median())} & " + f"{traj['fix_rate_hz'].median():.2f} & {traj['h_acc'].median():.1f} & " + f"{traj['v_acc'].median():.1f} & {traj['s_acc'].median():.2f} \\\\", + r"\bottomrule", + r"\end{tabular}", + ] + write("trajectories.tex", "\n".join(lines) + "\n") + + +def fmt_error(metres: float) -> str: + """Metres below 10 km, kilometres above.""" + if metres >= 10_000: + return f"{thousands(metres / 1000.0, 1)}~km" + return thousands(metres, 1) + + +def table_benchmark() -> dict[str, dict[str, float]]: + """Unaided EKF/UKF/RBPF horizontal RMSE with full and degraded GNSS.""" + lines = [ + r"\begin{tabular}{llrrrrr}", + r"\toprule", + r"Filter & GNSS & \(n\) & Median (m) & Mean (m) & Max (m) & Vert.\ median (m) \\", + r"\midrule", + ] + cells: dict[str, dict[str, float]] = {} + for index, filt in enumerate(stats.FILTERS): + if index: + lines.append(r"\midrule") + for scenario, label in (("truth", "Full"), ("degraded", "Degraded")): + b = stats.baseline(BENCHMARK_ARM, filt, scenario) + cells[f"{filt}{scenario}"] = b + name = stats.FILTER_LABEL[filt] if scenario == "truth" else "" + lines.append( + f"{name} & {label} & {b['n']} & {fmt_error(b['h_median'])} & {fmt_error(b['h_mean'])} & " + f"{fmt_error(b['h_max'])} & {fmt_error(b['v_median'])} \\\\" + ) + lines += [r"\bottomrule", r"\end{tabular}"] + write("benchmark.tex", "\n".join(lines) + "\n") + return cells + + +# -------------------------------------------------------------------------------------------- +# Figures + + +def figure_tracks(traj: pd.DataFrame) -> None: + """All 27 GNSS tracks over the shaded relief tiles shipped with them, by device family.""" + fig, ax = plt.subplots(figsize=(bf.WIDTH_IN, 3.3), constrained_layout=True) + for stem in traj.index: + with netCDF4.Dataset(RELEASE / f"{stem}_relief.nc") as data: + lat = data["lat"][::4].filled(np.nan) + lon = data["lon"][::4].filled(np.nan) + z = data["z"][::4, ::4].filled(np.nan) + ax.pcolormesh( + lon, lat, z, cmap="Greys", vmin=-400, vmax=1200, shading="nearest", rasterized=True + ) + for family in FAMILIES: + first = True + for stem in traj.index[traj["family"] == family]: + track = ( + pd.read_csv(RELEASE / f"{stem}.csv", usecols=["latitude", "longitude"]) + .dropna() + .iloc[::10] + ) + ax.plot( + track["longitude"], + track["latitude"], + color=FAMILY_COLOR[family], + linewidth=1.6, + label=family if first else None, + ) + first = False + ax.set_xlim(traj["lon_min"].min() - 0.3, traj["lon_max"].max() + 0.3) + ax.set_ylim(traj["lat_min"].min() - 0.3, traj["lat_max"].max() + 0.3) + ax.set_aspect(1.0 / np.cos(np.radians(40.3))) + ax.set_xlabel("Longitude (deg)") + ax.set_ylabel("Latitude (deg)") + ax.grid(False) + ax.legend(loc="lower right", frameon=True, framealpha=0.9, edgecolor=bf.GRID, title="Device") + save(fig, "fig_tracks") + + +def ecdf(values: np.ndarray) -> tuple[np.ndarray, np.ndarray]: + """Empirical CDF.""" + values = np.sort(values) + return values, np.arange(1, values.size + 1) / values.size + + +def figure_gnss(traj: pd.DataFrame) -> None: + """ECDFs of the receiver's advertised horizontal and vertical accuracy, by device family.""" + fig, axes = plt.subplots(1, 2, figsize=(bf.WIDTH_IN, 2.4), constrained_layout=True, sharey=True) + for family in FAMILIES: + stems = traj.index[traj["family"] == family] + frames = [ + pd.read_csv( + RELEASE / f"{s}.csv", usecols=["latitude", "horizontalAccuracy", "verticalAccuracy"] + ).dropna(subset=["latitude"]) + for s in stems + ] + pooled = pd.concat(frames) + for ax, column in zip(axes, ("horizontalAccuracy", "verticalAccuracy"), strict=True): + x, y = ecdf(pooled[column].dropna().to_numpy()) + ax.step( + x, + y, + where="post", + color=FAMILY_COLOR[family], + linestyle=FAMILY_STYLE[family], + linewidth=1.4, + label=f"{family} ({len(pooled):,} fixes)", + ) + for ax, title in zip( + axes, + ("(a) Advertised horizontal accuracy", "(b) Advertised vertical accuracy"), + strict=True, + ): + ax.set_xscale("log") + ax.set_xlim(0.5, 1200) + ax.set_xlabel("Reported accuracy (m)") + ax.set_title(title, loc="left") + axes[0].set_ylabel("Fraction of fixes") + axes[1].legend(loc="lower right", frameon=False, fontsize=6.5) + save(fig, "fig_gnss_accuracy") + + +def figure_gravity(norms: dict[str, np.ndarray], families: dict[str, str]) -> None: + """Raw-rate OS gravity norm less each recording's maximum, pooled by device family.""" + fig, ax = plt.subplots(figsize=(bf.WIDTH_IN, 2.4), constrained_layout=True) + bins = np.concatenate([[0.0], np.logspace(-2, 3, 51)]) + for family in FAMILIES: + deficits = np.concatenate( + [(n.max() - n) * MGAL_PER_MPS2 for r, n in norms.items() if families[r] == family] + ) + weights = np.full(deficits.size, 1.0 / deficits.size) + ax.hist( + np.clip(deficits, 1e-2, 999.0), + bins=bins[1:], + weights=weights, + histtype="step", + color=FAMILY_COLOR[family], + linestyle=FAMILY_STYLE[family], + linewidth=1.4, + label=f"{family} ({thousands_plain(deficits.size)} samples)", + ) + ax.axvline(PINNED_TOLERANCE_MGAL, color=bf.MUTED, linewidth=0.8) + ax.text( + PINNED_TOLERANCE_MGAL * 1.1, + 0.9, + "1 mGal", + transform=ax.get_xaxis_transform(), + color=bf.MUTED, + fontsize=7, + ) + ax.set_xscale("log") + ax.set_yscale("log") + ax.set_xlabel( + r"Recording maximum of $\|\mathbf{g}_\mathrm{OS}\|$ less $\|\mathbf{g}_\mathrm{OS}\|$ (mGal; clipped to [0.01, 1000])" + ) + ax.set_ylabel("Fraction of samples") + fig.legend( + *ax.get_legend_handles_labels(), + loc="outside lower center", + ncol=3, + frameon=False, + fontsize=6.5, + ) + save(fig, "fig_gravity_norm") + + +# -------------------------------------------------------------------------------------------- +# Numbers + + +def numbers(macros: dict[str, str]) -> None: + """Write every in-text number as a macro.""" + body = "% Generated by scripts/build.py -- do not edit.\n" + body += "".join( + f"\\newcommand{{\\num{key}}}{{{value}}}\n" for key, value in sorted(macros.items()) + ) + write("numbers.tex", body) + + +def main() -> None: + """Build everything.""" + seg = segments() + kept = seg[seg["status"] == "kept"] + recordings = pd.DataFrame([metadata(r.name) for r in sorted(RAW.iterdir()) if r.is_dir()]) + recordings["has_location_gps"] = [ + (RAW / r / "LocationGps.csv").exists() for r in recordings["recording"] + ] + used = sorted(kept["source"].unique()) + families = dict(zip(recordings["recording"], recordings["family"], strict=True)) + + inventory = raw_inventory() + traj = trajectory_table(kept) + norms = {r: raw_gravity(r) for r in used} + offsets = {r: hard_iron_offset(r) for r in used} + offsets = {r: v for r, v in offsets.items() if v is not None} + intensity = {s: calibrated_intensity(s) for s in traj.index} + + table_devices(traj, recordings) + table_channels(inventory, used, families) + table_trajectories(traj) + cells = table_benchmark() + + figure_tracks(traj) + figure_gnss(traj) + figure_gravity(norms, families) + + # ---- numbers quoted in the prose + excluded = seg[seg["status"] != "kept"] + span = inventory.groupby("recording")["span_s"].max() + recorded = recordings[recordings["recording"].isin(span.dropna().index)] + bad = traj.loc["2025-06-14_21-17-02"] + bad_raw = pd.read_csv(RAW / "2025-06-14_21-17-02" / "Location.csv") + bad_dt = bad_raw["seconds_elapsed"].diff().dropna() + pinned_raw = { + r: float(np.mean((n.max() - n) * MGAL_PER_MPS2 < PINNED_TOLERANCE_MGAL)) + for r, n in norms.items() + } + pinned_raw_pixel_apple_s24 = [ + v for r, v in pinned_raw.items() if families[r] != "Samsung SM-A146U" + ] + maxima = {f: [norms[r].max() for r in used if families[r] == f] for f in FAMILIES} + geo = stats.geostats(BENCHMARK_ARM) + no_baro = [ + r + for r in recordings["recording"] + if (RAW / r / "Gyroscope.csv").exists() + and ( + not (RAW / r / "Barometer.csv").exists() + or (RAW / r / "Barometer.csv").stat().st_size == 0 + ) + ] + no_baro_hours = sum(span[r] for r in no_baro) / 3600.0 + ios = traj[traj["platform"] == "iOS"] + android = traj[traj["platform"] == "Android"] + macros = { + "RawRecordings": str(len(recordings)), + "UtcNamed": str(int(recordings["utc_named"].sum())), + "RawNonEmpty": str(len(recorded)), + "RawGB": f"{inventory['bytes'].sum() / 1e9:.1f}", + "RawRowsMillion": f"{inventory['rows'].sum() / 1e6:.0f}", + "RawHours": f"{span.dropna().sum() / 3600.0:.1f}", + "RawFirst": recordings["recording"].min()[:7], + "RawLast": recordings["recording"].max()[:7], + "UsedRecordings": str(len(used)), + "ExcludedRecordings": str(len(recordings) - len(used)), + "NoBaroRecordings": str(len(no_baro)), + "NoBaroHours": f"{no_baro_hours:.1f}", + "Trajectories": str(len(traj)), + "SplitRecordings": str(int((kept.groupby("source").size() > 1).sum())), + "DroppedSegments": str(int(excluded["status"].str.startswith("shorter").sum())), + "Devices": str(recordings["model"].nunique()), + "DeviceIds": str(recordings["device_id"].nunique()), + "TotalKm": thousands(traj["km"].sum()), + "TotalHours": f"{traj['hours'].sum():.1f}", + "MedianKm": f"{traj['km'].median():.1f}", + "MedianHours": f"{traj['hours'].median():.2f}", + "MaxKm": f"{traj['km'].max():.1f}", + "MaxHours": f"{traj['hours'].max():.2f}", + "MinKm": f"{traj['km'].min():.1f}", + "MinHours": f"{traj['hours'].min():.2f}", + "Rows": thousands(traj["rows"].sum()), + "Fixes": thousands(traj["fixes"].sum()), + "MedianFixRate": f"{traj['fix_rate_hz'].median():.2f}", + "MedianSpeed": f"{traj['speed_kmh'].median():.0f}", + "MedianHacc": f"{traj['h_acc'].median():.1f}", + "MedianVacc": f"{traj['v_acc'].median():.1f}", + "MedianSacc": f"{traj['s_acc'].median():.2f}", + "HaccMin": f"{traj['h_acc'].min():.1f}", + "HaccMax": f"{traj['h_acc'].max():.1f}", + "LatMin": f"{traj['lat_min'].min():.2f}", + "LatMax": f"{traj['lat_max'].max():.2f}", + "LonMin": f"{-traj['lon_min'].min():.2f}", + "LonMax": f"{-traj['lon_max'].max():.2f}", + "AltMin": f"{traj['alt_min'].min():.0f}", + "AltMax": f"{traj['alt_max'].max():.0f}", + "IosBaroFraction": f"{100 * (ios['baro_rows'] / ios['rows']).median():.0f}", + "AndroidBaroFraction": f"{100 * (android['baro_rows'] / android['rows']).median():.0f}", + "BadFixes": str(int(bad["fixes"])), + "BadRawFixes": str(len(bad_raw)), + "BadSpan": f"{bad['span_s']:.0f}", + "BadFixRate": f"{bad['fix_rate_hz']:.2f}", + "BadHacc": f"{bad['h_acc']:.1f}", + "BadSentinels": str(int(bad["sentinels"])), + "BadHaccMax": thousands(bad_raw["horizontalAccuracy"].max()), + "BadMaxGap": f"{bad_dt.max():.1f}", + "SentinelTrajectories": str(int((traj["sentinels"] > 0).sum())), + "SentinelTotal": str(int(traj["sentinels"].sum())), + "GravPixel": f"{np.median(maxima['Pixel 6a'] + maxima['Pixel 9 Pro / Pro XL']):.6f}", + "GravSamsungApple": f"{np.median(maxima['Samsung SM-S921U'] + maxima['iPhone 12/13 mini']):.6f}", + "GravAfourteen": f"{np.median(maxima['Samsung SM-A146U']):.6f}", + "GravRawPinnedMin": f"{100 * min(pinned_raw_pixel_apple_s24):.1f}", + "GravRawPinnedRecordings": str(sum(v == 1.0 for v in pinned_raw.values())), + "GravAfourteenPinned": f"{100 * pinned_raw[[r for r in used if families[r] == 'Samsung SM-A146U'][0]]:.1f}", + "GravTenHzPinnedMedian": f"{100 * traj['grav_10hz_pinned'].median():.0f}", + "HardIronCount": str(len(offsets)), + "HardIronMin": f"{min(offsets.values()):.0f}", + "HardIronMax": f"{max(offsets.values()):.0f}", + "MagIntensityMin": f"{min(intensity.values()):.0f}", + "MagIntensityMax": f"{max(intensity.values()):.0f}", + "SnrGravity": f"{geo['gravity']['snr_median']:.2f}", + "SnrMagnetic": f"{geo['magnetic']['snr_median']:.2f}", + "SnrGravityBest": f"{geo['gravity']['snr_best']:.2f}", + "SnrMagneticBest": f"{geo['magnetic']['snr_best']:.2f}", + } + for key, cell in cells.items(): + tag = ( + key.replace("truth", "Full") + .replace("degraded", "Degraded") + .replace("ekf", "Ekf") + .replace("ukf", "Ukf") + .replace("rbpf", "Rbpf") + ) + macros[f"{tag}Median"] = fmt_error(cell["h_median"]).replace("~km", "~km") + macros[f"{tag}N"] = str(cell["n"]) + macros[f"{tag}VMedian"] = fmt_error(cell["v_median"]) + bad_stem = "2025-06-14_21-17-02" + for filt in ("ekf", "ukf"): + perf = stats.performance(BENCHMARK_ARM, filt, "truth")["RMSE Horizontal Error (m)"] + macros[f"{filt.capitalize()}FullBad"] = f"{perf[bad_stem]:.0f}" + macros[f"{filt.capitalize()}FullMaxOthers"] = f"{perf.drop(bad_stem).max():.1f}" + missing = sorted( + set(traj.index) - set(stats.performance(BENCHMARK_ARM, "rbpf", "degraded").index) + ) + macros["RbpfDegradedMissing"] = ", ".join(tex_escape(m) for m in missing) + a14 = [r for r in used if families[r] == "Samsung SM-A146U"][0] + a14_deficit = (norms[a14].max() - norms[a14]) * MGAL_PER_MPS2 + macros["GravAfourteenMedianDeficit"] = f"{np.median(a14_deficit):.0f}" + macros["GravAfourteenPfiveDeficit"] = f"{np.percentile(a14_deficit, 5):.0f}" + macros["GravAfourteenPninetyfiveDeficit"] = f"{np.percentile(a14_deficit, 95):.0f}" + altitude = altitude_offsets(traj) + ios_cells, ios_median, ios_low, ios_high = altitude["iPhone 12/13 mini"] + macros["AltIosCells"] = thousands(ios_cells) + macros["AltIosMedian"] = f"{ios_median:.0f}" + macros["AltIosLow"] = f"{ios_low:.0f}" + macros["AltIosHigh"] = f"{ios_high:.0f}" + android_offsets = [abs(v[1]) for f, v in altitude.items() if f != "iPhone 12/13 mini"] + macros["AltAndroidMaxOffset"] = f"{max(android_offsets):.0f}" + numbers(macros) + inventory.to_csv(HERE / "raw_inventory.csv", index=False) + traj.drop(columns=["device_id"]).to_csv(HERE / "trajectory_stats.csv") + print("wrote scripts/raw_inventory.csv, scripts/trajectory_stats.csv") + + +if __name__ == "__main__": + main() diff --git a/papers/mems_nav_data/scripts/raw_inventory.csv b/papers/mems_nav_data/scripts/raw_inventory.csv new file mode 100644 index 00000000..f5a5a7af --- /dev/null +++ b/papers/mems_nav_data/scripts/raw_inventory.csv @@ -0,0 +1,372 @@ +recording,file,rows,bytes,span_s,median_hz +2023-08-04_21-47-58,Accelerometer,490560,47866373,8809.854577392578,55.68470709787431 +2023-08-04_21-47-58,Barometer,440483,32443222,8809.7002109375,49.98108625921644 +2023-08-04_21-47-58,Gravity,490560,47209233,8809.854577392578,55.68470709787431 +2023-08-04_21-47-58,Gyroscope,490563,49184836,8809.526782714844,55.68470709787431 +2023-08-04_21-47-58,Location,8784,1563151,8810.124723876954,0.9999880372523422 +2023-08-04_21-47-58,LocationGps,8035,1617722,8809.124735839845,0.999985107643948 +2023-08-04_21-47-58,LocationNetwork,758,73433,8808.371,0.19833399444663355 +2023-08-04_21-47-58,Magnetometer,880952,83283565,8809.51099609375,100.00000000009095 +2023-08-04_21-47-58,Orientation,490560,85899808,8809.863579589844,55.68470709787431 +2023-08-04_21-47-58,TotalAcceleration,490560,46907631,8809.513314453125,55.68470709787431 +2023-08-06_14-48-05,Accelerometer,496665,48658349,8920.736580322266,55.67713784701483 +2023-08-06_14-48-05,Barometer,446013,33424251,8920.24000390625,49.96889143734561 +2023-08-06_14-48-05,Gravity,496665,47878031,8920.727624023437,55.67713784692673 +2023-08-06_14-48-05,Gyroscope,496666,50206101,8920.433508544922,55.67713784692673 +2023-08-06_14-48-05,Location,9207,1739002,8920.116466064454,0.9999880372523422 +2023-08-06_14-48-05,LocationGps,8921,1835111,8920.116466064454,0.9999865724459994 +2023-08-06_14-48-05,LocationNetwork,445,47069,8914.517,0.05072151321591691 +2023-08-06_14-48-05,Magnetometer,892066,84314549,8920.650041259767,100.00000000009095 +2023-08-06_14-48-05,Orientation,496665,86744550,8920.736600097656,55.67713784701483 +2023-08-06_14-48-05,TotalAcceleration,496665,47635755,8920.431252197264,55.67713784692673 +2023-08-09_12-47-42,Accelerometer,290192,28857463,5211.343953369141,55.68395008006217 +2023-08-09_12-47-42,Barometer,260573,19590784,5211.459892578125,49.99938965583342 +2023-08-09_12-47-42,Gravity,290192,27971129,5211.3349775390625,55.68395008006217 +2023-08-09_12-47-42,Gyroscope,290193,29279585,5211.240809326172,55.68395008006217 +2023-08-09_12-47-42,Location,5846,970197,5209.935643554688,1.0000009765627043 +2023-08-09_12-47-42,LocationGps,5174,1026531,5207.888728515625,0.9999851076434932 +2023-08-09_12-47-42,LocationNetwork,725,71651,5206.529000244141,0.19900497995871458 +2023-08-09_12-47-42,Magnetometer,521104,49589538,5211.0300024414055,100.00000000009095 +2023-08-09_12-47-42,Orientation,290192,51309848,5211.3349775390625,55.68395008006217 +2023-08-09_12-47-42,TotalAcceleration,290191,27869781,5211.253787841797,55.68395008006217 +2023-08-09_16-37-41,Accelerometer,143811,14069301,2583.0751171875,55.67562424310078 +2023-08-09_16-37-41,Barometer,129173,9766569,2583.4403051757813,49.989626176258554 +2023-08-09_16-37-41,Gravity,143811,13915267,2583.0840930175787,55.67562424310078 +2023-08-09_16-37-41,Gyroscope,143810,14527421,2582.9875578613282,55.67486747504365 +2023-08-09_16-37-41,Location,2724,504022,2616.3473583984373,0.9999931641094735 +2023-08-09_16-37-41,LocationGps,2580,531736,2579.3633225097656,0.9999868165801676 +2023-08-09_16-37-41,LocationNetwork,195,19440,2610.876,0.09080177870841769 +2023-08-09_16-37-41,Magnetometer,258372,24759701,2583.7100114746095,100.00000000009095 +2023-08-09_16-37-41,Orientation,143809,25083180,2583.0751074218756,55.67562424310078 +2023-08-09_16-37-41,TotalAcceleration,143811,13816085,2582.985296386719,55.67486747433886 +2024-06-20_16-55-50,Accelerometer,468517,45820288,8412.573093261719,55.69455020071534 +2024-06-20_16-55-50,Barometer,420628,31603770,8412.540581298828,49.99755871316718 +2024-06-20_16-55-50,Gravity,468517,45215957,8412.56410986328,55.69455020071534 +2024-06-20_16-55-50,Gyroscope,468518,47151839,8412.582071289062,55.694550201244304 +2024-06-20_16-55-50,Location,8744,1628583,8412.118896972655,0.999988037252797 +2024-06-20_16-55-50,LocationGps,8391,1725984,8412.118896972655,0.9999860841780205 +2024-06-20_16-55-50,LocationNetwork,572,55233,8442.47400024414,0.051907604464053105 +2024-06-20_16-55-50,Magnetometer,841258,79466027,8412.56999951172,100.00000000009095 +2024-06-20_16-55-50,Orientation,468513,81825655,8412.501269042968,55.69455020071534 +2024-06-20_16-55-50,TotalAcceleration,468517,44924257,8412.564092285156,55.69455020071534 +2025-03-01_15-04-26,Accelerometer,544996,53268928,5449.959998046876,100.00000000009095 +2025-03-01_15-04-26,AccelerometerUncalibrated,329215,31354129,5449.90468017578,60.403179424556434 +2025-03-01_15-04-26,Barometer,136247,10142517,5449.839987792969,24.999847413038417 +2025-03-01_15-04-26,Compass,544996,30990908,5449.949997802734,100.00000000009095 +2025-03-01_15-04-26,Gravity,544996,51973104,5449.959998046876,100.00000000009095 +2025-03-01_15-04-26,Gyroscope,329218,33169612,5449.954334960938,60.403179424556434 +2025-03-01_15-04-26,GyroscopeUncalibrated,329216,33048937,5449.921231933594,60.403179424556434 +2025-03-01_15-04-26,Location,5457,1025406,5447.979101806641,1.0 +2025-03-01_15-04-26,Magnetometer,544996,49820185,5449.949997802734,100.00000000009095 +2025-03-01_15-04-26,MagnetometerUncalibrated,544994,51325657,5449.929997802734,100.00000000009095 +2025-03-01_15-04-26,Orientation,544994,95162399,5449.939998046875,100.00000000009095 +2025-03-01_15-04-26,TotalAcceleration,329217,31355842,5449.937786621093,60.403179424556434 +2025-03-01_16-46-39,Accelerometer,536753,52393694,5367.519998291015,100.00000000009095 +2025-03-01_16-46-39,AccelerometerUncalibrated,324273,30895736,5367.476948486328,60.41476149743246 +2025-03-01_16-46-39,Barometer,134186,10024011,5367.399997802734,24.99984741289631 +2025-03-01_16-46-39,Compass,536751,30451253,5367.499998046876,100.00000000009095 +2025-03-01_16-46-39,Gravity,536753,51180852,5367.519998291015,100.00000000009095 +2025-03-01_16-46-39,Gyroscope,324275,32655457,5367.510053222656,60.41476149743246 +2025-03-01_16-46-39,GyroscopeUncalibrated,324273,32569259,5367.476946044922,60.41476149743246 +2025-03-01_16-46-39,Location,5387,1022487,5365.687265869141,1.0 +2025-03-01_16-46-39,Magnetometer,536751,49351960,5367.499998046876,100.00000000009095 +2025-03-01_16-46-39,MagnetometerUncalibrated,536750,49879550,5367.489998046875,100.00000000009095 +2025-03-01_16-46-39,Orientation,536750,93894574,5367.489998535157,100.00000000009095 +2025-03-01_16-46-39,TotalAcceleration,324274,30895830,5367.493500244141,60.41476149743246 +2025-06-08_20-39-13,Accelerometer,7429,729581,147.50192138671875,50.2046919814611 +2025-06-08_20-39-13,AccelerometerUncalibrated,14630,1388846,147.43217944335936,100.4093839629222 +2025-06-08_20-39-13,Barometer,5871,443413,147.43757348632815,39.816083909277914 +2025-06-08_20-39-13,Compass,14503,816442,147.48052734375,99.99999999994884 +2025-06-08_20-39-13,GameOrientation,14552,1447061,147.38236962890625,100.4093839629222 +2025-06-08_20-39-13,GeomagneticOrientation,14546,1470816,147.38236962890625,100.4093839629222 +2025-06-08_20-39-13,Gravity,14583,1381182,147.51184936523438,100.4093839629222 +2025-06-08_20-39-13,Gyroscope,14610,1484753,147.4919228515625,100.4093839629222 +2025-06-08_20-39-13,GyroscopeUncalibrated,13938,1410856,147.4371604003906,100.40692258666866 +2025-06-08_20-39-13,Location,2999,524896,2944.7908435058594,0.9999848635106141 +2025-06-08_20-39-13,LocationGps,2935,483592,2944.7908435058594,0.9999848635106141 +2025-06-08_20-39-13,LocationNetwork,195,17673,2942.4899997558596,0.050001250031250465 +2025-06-08_20-39-13,Magnetometer,14503,1365522,147.48052734375,99.99999999994884 +2025-06-08_20-39-13,MagnetometerUncalibrated,14475,1360479,147.44052929687498,99.99999999994884 +2025-06-08_20-39-13,Orientation,14569,2637117,147.43217944335936,100.4093839629222 +2025-06-08_20-39-13,TotalAcceleration,14614,1387629,147.46204956054686,100.4093839629222 +2025-06-11_20-34-24,Accelerometer,22176,2150269,1649.733283203125,50.207153538666496 +2025-06-11_20-34-24,AccelerometerUncalibrated,43853,4120801,1649.6635993652344,100.41430707733299 +2025-06-11_20-34-24,Barometer,17863,1347810,1649.6426630859376,39.8187933817113 +2025-06-11_20-34-24,Compass,43513,2475397,1649.7224863281251,100.0000000000199 +2025-06-11_20-34-24,GameOrientation,43577,4273535,1649.6337270507813,100.41430707704642 +2025-06-11_20-34-24,GeomagneticOrientation,43522,4240931,1649.6237429199218,100.41430707704642 +2025-06-11_20-34-24,Gravity,43677,4089448,1649.6735581054686,100.41430707704642 +2025-06-11_20-34-24,Gyroscope,43668,4362463,1649.7432478027342,100.41184546071482 +2025-06-11_20-34-24,GyroscopeUncalibrated,43739,4366883,1649.6835288085936,100.41184546071482 +2025-06-11_20-34-24,Location,1737,305897,1646.9986105957032,1.0000009765633864 +2025-06-11_20-34-24,LocationGps,1648,268857,1646.9986105957032,1.0000007324225315 +2025-06-11_20-34-24,LocationNetwork,95,10393,1649.0471491699218,0.1758705668197592 +2025-06-11_20-34-24,Magnetometer,43513,4175728,1649.7224863281251,100.0000000000199 +2025-06-11_20-34-24,MagnetometerUncalibrated,43563,4130787,1649.6824787597657,100.0000000000199 +2025-06-11_20-34-24,Orientation,43627,7697217,1649.6735581054686,100.41430707704642 +2025-06-11_20-34-24,TotalAcceleration,43807,4117011,1649.7133901367188,100.4143070771897 +2025-06-14_21-17-02,Accelerometer,48053,4690607,586.0598020019531,99.71274161356548 +2025-06-14_21-17-02,AccelerometerUncalibrated,43858,4108648,586.1050146484374,99.71274161300032 +2025-06-14_21-17-02,Barometer,5861,442160,585.9999934082031,10.000341808557659 +2025-06-14_21-17-02,Compass,48336,2736268,586.1201286621093,99.99755865304398 +2025-06-14_21-17-02,Gravity,48210,4482210,586.0698312988281,99.71274161356548 +2025-06-14_21-17-02,Gyroscope,48659,4893204,586.0648166503906,99.71274161356548 +2025-06-14_21-17-02,GyroscopeUncalibrated,48166,4838894,586.0648166503906,99.71274161356548 +2025-06-14_21-17-02,Location,200,33094,582.2890000000001,0.9711769569298614 +2025-06-14_21-17-02,Magnetometer,48336,4461243,586.1201286621093,99.99755865304398 +2025-06-14_21-17-02,MagnetometerUncalibrated,47782,4321230,586.1101176757812,99.99511742633436 +2025-06-14_21-17-02,Orientation,47437,8319553,586.0598020019531,99.71274161356548 +2025-06-14_21-17-02,TotalAcceleration,44845,4201113,586.1050146484374,99.71274161300032 +2025-06-18_15-09-25,Accelerometer,295392,29001739,5342.767409423828,50.0134313413974 +2025-06-18_15-09-25,AccelerometerUncalibrated,526979,50541226,5342.707433837891,100.02197748898146 +2025-06-18_15-09-25,Barometer,212715,16121076,5342.6897009277345,39.81221387494636 +2025-06-18_15-09-25,Compass,525195,29898677,5342.729839111328,100.00000000009095 +2025-06-18_15-09-25,Gravity,524344,50228376,5342.757412353516,100.02197748670673 +2025-06-18_15-09-25,Gyroscope,525622,53769083,5342.757412353516,100.02197748670673 +2025-06-18_15-09-25,GyroscopeUncalibrated,499644,50993738,5342.707427978516,100.01953507101075 +2025-06-18_15-09-25,Location,5241,580367,5340.927180664064,0.9995845232787319 +2025-06-18_15-09-25,LocationGps,5248,878307,5341.082856201173,0.9999843752443042 +2025-06-18_15-09-25,LocationNetwork,828,65045,5343.133,0.19944157333302678 +2025-06-18_15-09-25,Magnetometer,525195,50068384,5342.729839111328,100.00000000009095 +2025-06-18_15-09-25,MagnetometerUncalibrated,524402,49411877,5342.699831542969,100.00000000009095 +2025-06-18_15-09-25,Orientation,523560,94047389,5342.687439697266,100.02197748670673 +2025-06-18_15-09-25,TotalAcceleration,525934,50444445,5342.717433105469,100.02197748670673 +2025-06-18_16-52-32,Accelerometer,439011,43266927,7916.464414550781,50.010988742216 +2025-06-18_16-52-32,AccelerometerUncalibrated,786804,75429558,7916.424433349609,100.01953506418688 +2025-06-18_16-52-32,Barometer,315183,23815125,7916.416416992188,39.81221387458597 +2025-06-18_16-52-32,Compass,785608,44620700,7916.455413085938,100.00000000009095 +2025-06-18_16-52-32,Gravity,785382,75258767,7916.484412841797,100.01953506418688 +2025-06-18_16-52-32,Gyroscope,786777,80846713,7916.47442163086,100.01953506418688 +2025-06-18_16-52-32,GyroscopeUncalibrated,752548,77218029,7916.434433105469,100.01709276521116 +2025-06-18_16-52-32,Location,8275,1000467,7915.431129394531,1.000303192483644 +2025-06-18_16-52-32,LocationGps,7916,1304204,7915.122644287109,0.9999843752443042 +2025-06-18_16-52-32,LocationNetwork,1064,93474,7912.664000000001,0.19936204146731967 +2025-06-18_16-52-32,Magnetometer,785608,74755880,7916.455413085938,100.00000000009095 +2025-06-18_16-52-32,MagnetometerUncalibrated,785099,73763129,7916.435384033203,100.00000000009095 +2025-06-18_16-52-32,Orientation,785067,141733282,7916.404400878906,100.01953506418688 +2025-06-18_16-52-32,TotalAcceleration,786099,75404390,7916.444424072266,100.01953506418688 +2025-06-25_10-24-35,Accelerometer,2285656,225890956,22714.033939697267,100.63634800271454 +2025-06-25_10-24-35,AccelerometerUncalibrated,2285657,216989027,22714.04387451172,100.63634800271454 +2025-06-25_10-24-35,Compass,2285656,130468268,22714.033939697267,100.63634800271454 +2025-06-25_10-24-35,Gravity,2285656,222184643,22714.033939697267,100.63634800271454 +2025-06-25_10-24-35,Gyroscope,2285656,234974362,22714.033939697267,100.63634800271454 +2025-06-25_10-24-35,GyroscopeUncalibrated,2285656,233690232,22714.056292968748,100.63634800271454 +2025-06-25_10-24-35,Location,22667,2849525,22715.14369848633,0.9992638479832926 +2025-06-25_10-24-35,Magnetometer,2285656,220063931,22714.033939697267,100.63634800271454 +2025-06-25_10-24-35,MagnetometerUncalibrated,2261645,216439975,22714.050229003904,99.64239667247891 +2025-06-25_10-24-35,Orientation,2285656,411553680,22714.033939697267,100.63634800271454 +2025-06-26_19-07-51,Accelerometer,917291,90312549,9121.218827392579,100.56222533284765 +2025-06-26_19-07-51,AccelerometerUncalibrated,917293,86527744,9121.238716552734,100.56222533284765 +2025-06-26_19-07-51,Barometer,0,0,, +2025-06-26_19-07-51,Compass,917291,51769077,9121.218827392579,100.56222533284765 +2025-06-26_19-07-51,Gravity,917291,86639110,9121.218827392579,100.56222533284765 +2025-06-26_19-07-51,Gyroscope,917291,93940269,9121.218827392579,100.56222533284765 +2025-06-26_19-07-51,GyroscopeUncalibrated,917292,93001303,9121.228772216797,100.56222533284765 +2025-06-26_19-07-51,Location,9064,1885400,9140.592699707031,1.0000080567054914 +2025-06-26_19-07-51,Magnetometer,917291,86353393,9121.218827392579,100.56222533284765 +2025-06-26_19-07-51,MagnetometerUncalibrated,905578,87056174,9121.24000024414,99.2945625556647 +2025-06-26_19-07-51,Orientation,917291,162659217,9121.218827392579,100.56222533284765 +2025-06-27_11-54-35,Accelerometer,1792714,176900205,17815.04243286133,100.62645866582736 +2025-06-27_11-54-35,AccelerometerUncalibrated,1792715,170459919,17815.04988793945,100.62645866582736 +2025-06-27_11-54-35,Barometer,16690,1278844,17812.830494628906,0.9368487117414716 +2025-06-27_11-54-35,Compass,1792714,101870943,17815.04243286133,100.62645866582736 +2025-06-27_11-54-35,Gravity,1792714,170588437,17815.04243286133,100.62645866582736 +2025-06-27_11-54-35,Gyroscope,1792714,184034712,17815.04243286133,100.62645866582736 +2025-06-27_11-54-35,GyroscopeUncalibrated,1792709,182970478,17815.043678222657,100.62645866582736 +2025-06-27_11-54-35,Location,17768,2318979,17815.430898681643,0.999594890742485 +2025-06-27_11-54-35,Magnetometer,1792714,170106490,17815.04243286133,100.62645866582736 +2025-06-27_11-54-35,MagnetometerUncalibrated,1774063,169745375,17815.049634765623,99.5697304116306 +2025-06-27_11-54-35,Orientation,1792714,323145270,17815.04243286133,100.62645866582736 +2025-07-04_17-24-46,Accelerometer,315115,31103900,6270.241259765626,50.193002879736966 +2025-07-04_17-24-46,AccelerometerUncalibrated,615958,58938611,6270.550107666016,100.38723591945956 +2025-07-04_17-24-46,Barometer,249403,18875417,6270.064872558594,39.803702443540644 +2025-07-04_17-24-46,Compass,613037,34923290,6270.668410400391,100.00000000009095 +2025-07-04_17-24-46,GameOrientation,608848,60221908,6269.872683349609,100.38477563536522 +2025-07-04_17-24-46,GeomagneticOrientation,608045,60047123,6269.862722412109,100.38477563307394 +2025-07-04_17-24-46,Gravity,610917,58540669,6269.952349365235,100.38723591716818 +2025-07-04_17-24-46,Gyroscope,614620,63384585,6270.734342773438,100.38477563078268 +2025-07-04_17-24-46,GyroscopeUncalibrated,579675,59556600,6269.987240234374,100.37985541060938 +2025-07-04_17-24-46,Location,6342,1177130,6269.085270996094,0.999986328311723 +2025-07-04_17-24-46,LocationGps,6227,1041365,6269.085270996094,0.9999863283114956 +2025-07-04_17-24-46,LocationNetwork,436,37897,6268.594,0.04998750373426528 +2025-07-04_17-24-46,Magnetometer,613037,59041051,6270.668410400391,100.00000000009095 +2025-07-04_17-24-46,MagnetometerUncalibrated,612167,57961721,6270.248399414063,100.00000000009095 +2025-07-04_17-24-46,Orientation,609753,107716086,6269.9125058593745,100.3872359148768 +2025-07-04_17-24-46,TotalAcceleration,614915,58844077,6269.902564453126,100.38723591831388 +2025-07-05_20-59-22,Accelerometer,452489,44768314,9021.237731689453,50.19976959058959 +2025-07-05_20-59-22,AccelerometerUncalibrated,889552,84924989,9021.187947021484,100.39953918117918 +2025-07-05_20-59-22,Barometer,358955,26946579,9021.176790039062,39.815696871244086 +2025-07-05_20-59-22,Compass,885572,49721742,9021.218160644534,100.00000000009095 +2025-07-05_20-59-22,GameOrientation,882266,87558873,9021.187950927735,100.39953918117918 +2025-07-05_20-59-22,GeomagneticOrientation,881369,86986617,9021.187950927735,100.39953918117918 +2025-07-05_20-59-22,Gravity,884409,84490788,9021.237747558594,100.39953918117918 +2025-07-05_20-59-22,Gyroscope,887158,91856223,9021.242713867188,100.39953918117918 +2025-07-05_20-59-22,GyroscopeUncalibrated,864856,89097736,9021.187946044922,100.39953918117918 +2025-07-05_20-59-22,Location,9491,1708499,9018.977896972656,0.9999855959105185 +2025-07-05_20-59-22,LocationGps,9017,1449850,9018.12839404297,0.9999855959105185 +2025-07-05_20-59-22,LocationNetwork,968,97118,9017.131787109374,0.19794140934281143 +2025-07-05_20-59-22,Magnetometer,885572,84498944,9021.218160644534,100.00000000009095 +2025-07-05_20-59-22,MagnetometerUncalibrated,886613,83671932,9021.198131103518,100.00000000009095 +2025-07-05_20-59-22,Orientation,883275,156294688,9021.217828125,100.39953918117918 +2025-07-05_20-59-22,TotalAcceleration,888413,84827610,9021.207868164063,100.39953918117918 +2025-07-08_14-12-53,Accelerometer,665568,65408732,6659.057451416016,99.94387916939354 +2025-07-08_14-12-53,AccelerometerUncalibrated,665570,63555492,6659.077460449219,99.94387916939354 +2025-07-08_14-12-53,Barometer,6280,474085,6656.563337158203,0.9433479917694889 +2025-07-08_14-12-53,Compass,665568,37829173,6659.057451416016,99.94387916939354 +2025-07-08_14-12-53,Gravity,665568,63475078,6659.057451416016,99.94387916939354 +2025-07-08_14-12-53,Gyroscope,665568,66864518,6659.057451416016,99.94387916939354 +2025-07-08_14-12-53,GyroscopeUncalibrated,665557,66798142,6659.076213623047,99.94387916939354 +2025-07-08_14-12-53,Location,6659,1357599,6658.997969238281,1.0000041504077353 +2025-07-08_14-12-53,Magnetometer,665568,62823986,6659.057451416016,99.94387916939354 +2025-07-08_14-12-53,MagnetometerUncalibrated,657600,61558582,6659.081033691406,98.74400327937212 +2025-07-08_14-12-53,Orientation,665568,116396767,6659.057451416016,99.94387916939354 +2025-07-11_13-33-16,Accelerometer,300845,29610327,5978.7006062011715,50.200384837010176 +2025-07-11_13-33-16,AccelerometerUncalibrated,592533,56932043,5978.648356445312,100.39953918175216 +2025-07-11_13-33-16,Barometer,237852,18052586,5978.624551025391,39.811826912011824 +2025-07-11_13-33-16,Compass,590527,33264875,5978.669292236328,100.00000000009095 +2025-07-11_13-33-16,GameOrientation,587108,57265083,5978.640870849609,100.39953918160892 +2025-07-11_13-33-16,GeomagneticOrientation,586507,57295309,5978.630889404297,100.39953918146567 +2025-07-11_13-33-16,Gravity,588648,56658461,5978.7006062011715,100.39953918175216 +2025-07-11_13-33-16,Gyroscope,591634,60602599,5978.688171875,100.39953918175216 +2025-07-11_13-33-16,GyroscopeUncalibrated,585888,59929717,5978.643363525391,100.39707828941647 +2025-07-11_13-33-16,Location,6085,1112770,5977.084137451172,0.9999858400437551 +2025-07-11_13-33-16,LocationGps,5961,987869,5978.084151123047,0.9999858400437551 +2025-07-11_13-33-16,LocationNetwork,378,34751,5972.3460000000005,0.04998000799680175 +2025-07-11_13-33-16,Magnetometer,590527,55418164,5978.669292236328,100.00000000009095 +2025-07-11_13-33-16,MagnetometerUncalibrated,589871,56119713,5978.649307373047,100.00000000009095 +2025-07-11_13-33-16,Orientation,587760,103303430,5978.650814697266,100.39953918175216 +2025-07-11_13-33-16,TotalAcceleration,591857,56890571,5978.650814697266,100.39953918175216 +2025-07-18_23-13-43,Accelerometer,279897,27479128,5562.7343974609375,50.19730875685257 +2025-07-18_23-13-43,AccelerometerUncalibrated,552387,53143123,5562.632325927734,100.39461751370514 +2025-07-18_23-13-43,Barometer,221454,16511386,5562.6317485351565,39.81221387440577 +2025-07-18_23-13-43,Compass,548759,30851362,5562.686651123047,100.00000000009095 +2025-07-18_23-13-43,GameOrientation,549671,53210610,5562.659704589843,100.394617514851 +2025-07-18_23-13-43,GeomagneticOrientation,549244,53660959,5562.649739013672,100.394617514851 +2025-07-18_23-13-43,Gravity,550641,53080386,5562.719465576171,100.394617514851 +2025-07-18_23-13-43,Gyroscope,551713,56385091,5562.716979003906,100.394617514851 +2025-07-18_23-13-43,GyroscopeUncalibrated,520827,53054596,5562.642281005859,100.38969633331877 +2025-07-18_23-13-43,Location,5637,1028642,5561.078080322266,0.9999858400442099 +2025-07-18_23-13-43,LocationGps,5526,917555,5561.078080322266,0.9999858400442099 +2025-07-18_23-13-43,LocationNetwork,310,27474,5560.122,0.04996752111127787 +2025-07-18_23-13-43,Magnetometer,548759,52008838,5562.686651123047,100.00000000009095 +2025-07-18_23-13-43,MagnetometerUncalibrated,548244,51373191,5562.646637695313,100.00000000009095 +2025-07-18_23-13-43,Orientation,550061,96429346,5562.679624267578,100.394617514851 +2025-07-18_23-13-43,TotalAcceleration,551714,53091280,5562.6721545410155,100.39461751370514 +2025-07-31_23-36-03,Accelerometer,676605,66520436,13449.983067626952,50.2028459709299 +2025-07-31_23-36-03,AccelerometerUncalibrated,1334007,128472296,13449.893430175782,100.40446133094233 +2025-07-31_23-36-03,Barometer,535488,40529455,13449.887109375002,39.81337480672324 +2025-07-31_23-36-03,Compass,1325108,74469551,13449.95282128906,100.00000000009095 +2025-07-31_23-36-03,GameOrientation,1326988,129187476,13449.92332446289,100.4044613306558 +2025-07-31_23-36-03,GeomagneticOrientation,1325982,129019981,13449.913328369139,100.4044613306558 +2025-07-31_23-36-03,Gravity,1329309,128447335,13449.97309008789,100.4044613306558 +2025-07-31_23-36-03,Gyroscope,1331474,136153545,13449.963136718749,100.4044613306558 +2025-07-31_23-36-03,GyroscopeUncalibrated,1265701,128965647,13449.898425537109,100.39953918347112 +2025-07-31_23-36-03,Location,13843,2549802,13449.19786694336,0.9999851076444027 +2025-07-31_23-36-03,LocationGps,13450,2241462,13449.19786694336,0.9999851076444027 +2025-07-31_23-36-03,LocationNetwork,804,78780,13459.616,0.04998500388866515 +2025-07-31_23-36-03,Magnetometer,1325108,125392852,13449.95282128906,100.00000000009095 +2025-07-31_23-36-03,MagnetometerUncalibrated,1323725,125633582,13449.902819580077,100.00000000009095 +2025-07-31_23-36-03,Orientation,1327997,231809690,13449.943213867187,100.4044613306558 +2025-07-31_23-36-03,TotalAcceleration,1331933,128344898,13449.943217041016,100.40446133094233 +2025-08-03_18-15-59,Accelerometer,747131,73694023,14898.73956323242,50.18623799231225 +2025-08-03_18-15-59,AccelerometerUncalibrated,1457955,140584191,14898.64991064453,100.37001641821273 +2025-08-03_18-15-59,Barometer,592879,44781572,14898.648135742189,39.788622941296005 +2025-08-03_18-15-59,Compass,1445557,81602688,14898.699937744139,100.00000000009095 +2025-08-03_18-15-59,GameOrientation,1448733,140880018,14898.639943115233,100.37001641821273 +2025-08-03_18-15-59,GeomagneticOrientation,1447003,141527421,14898.639943115233,100.37001641821273 +2025-08-03_18-15-59,Gravity,1452789,140556545,14898.729598632812,100.37001641821273 +2025-08-03_18-15-59,Gyroscope,1453734,149124253,14898.727113037106,100.3700164179443 +2025-08-03_18-15-59,GyroscopeUncalibrated,1378729,140806627,14898.647418457029,100.36509764641995 +2025-08-03_18-15-59,Location,15300,2816507,14897.197526611326,0.9999868165788034 +2025-08-03_18-15-59,LocationGps,14893,2472115,14897.197526611326,0.9999865724469088 +2025-08-03_18-15-59,LocationNetwork,1067,101924,14893.957040771484,0.0533803073087093 +2025-08-03_18-15-59,Magnetometer,1445557,136893321,14898.699937744139,100.00000000009095 +2025-08-03_18-15-59,MagnetometerUncalibrated,1443374,137431997,14898.649941650388,100.00000000009095 +2025-08-03_18-15-59,Orientation,1450614,253937606,14898.689747070312,100.37001641821273 +2025-08-03_18-15-59,TotalAcceleration,1455069,140380692,14898.679788085936,100.37001641821273 +2025-09-26_19-03-38,Accelerometer,1662818,163719608,16522.29743457031,100.63387548856838 +2025-09-26_19-03-38,AccelerometerUncalibrated,1662819,158098327,16522.304883789064,100.63387548741706 +2025-09-26_19-03-38,Barometer,15487,1162166,16519.960600830076,0.9372151644429072 +2025-09-26_19-03-38,Compass,1662818,94505714,16522.29743457031,100.63387548856838 +2025-09-26_19-03-38,Gravity,1662818,158241898,16522.29743457031,100.63387548856838 +2025-09-26_19-03-38,Gyroscope,1662818,170534568,16522.29743457031,100.63387548856838 +2025-09-26_19-03-38,GyroscopeUncalibrated,1662818,169649944,16522.308610351563,100.63387548856838 +2025-09-26_19-03-38,Location,16506,2090951,16522.483274902344,0.9994039199755387 +2025-09-26_19-03-38,Magnetometer,1662818,157196388,16522.29743457031,100.63387548856838 +2025-09-26_19-03-38,MagnetometerUncalibrated,1646079,158720639,16522.318264648435,99.58909771760689 +2025-09-26_19-03-38,Orientation,1662818,300114001,16522.29743457031,100.63387548856838 +2025-09-27_12-54-35,Accelerometer,408425,40167674,8136.526665039063,50.196693587834126 +2025-09-27_12-54-35,AccelerometerUncalibrated,797951,76836120,8136.464422607422,100.39953918232514 +2025-09-27_12-54-35,Barometer,323822,24054999,8136.454832275391,39.80215530154268 +2025-09-27_12-54-35,Compass,789475,44448952,8136.49087133789,100.00000000009095 +2025-09-27_12-54-35,GameOrientation,790500,76478054,8136.466931152344,100.39953918175216 +2025-09-27_12-54-35,GeomagneticOrientation,789209,77115398,8136.466931152344,100.39953918117918 +2025-09-27_12-54-35,Gravity,793446,76625058,8136.526665039063,100.39953918182378 +2025-09-27_12-54-35,Gyroscope,794517,81276662,8136.506732421875,100.39953918232514 +2025-09-27_12-54-35,GyroscopeUncalibrated,750810,76438829,8136.471893066407,100.394617514851 +2025-09-27_12-54-35,Location,10800,1800547,10540.1420234375,0.9999865724455447 +2025-09-27_12-54-35,LocationGps,10541,1758975,10540.1420234375,0.9999865724441804 +2025-09-27_12-54-35,LocationNetwork,601,56461,10532.805999999999,0.046905415767327714 +2025-09-27_12-54-35,Magnetometer,789475,74830116,8136.49087133789,100.00000000009095 +2025-09-27_12-54-35,MagnetometerUncalibrated,787841,74383329,8136.4608828125,100.00000000009095 +2025-09-27_12-54-35,Orientation,791903,138278650,8136.496796142578,100.39953918175216 +2025-09-27_12-54-35,TotalAcceleration,795858,76663349,8136.489320800782,100.39953918232514 +2025-09-27_18-10-16,Accelerometer,275298,27065519,2735.6870834960937,100.63387548482658 +2025-09-27_18-10-16,AccelerometerUncalibrated,275302,26183527,2735.726823486328,100.63387548453873 +2025-09-27_18-10-16,Barometer,2562,195461,2732.7176020507814,0.9367199479500223 +2025-09-27_18-10-16,Compass,275298,15623268,2735.6870834960937,100.63387548482658 +2025-09-27_18-10-16,Gravity,275298,26237711,2735.6870834960937,100.63387548482658 +2025-09-27_18-10-16,Gyroscope,275298,28182604,2735.6870834960937,100.63387548482658 +2025-09-27_18-10-16,GyroscopeUncalibrated,275301,28042311,2735.7168903808597,100.63387548453873 +2025-09-27_18-10-16,Location,2733,365941,2736.6287258300777,0.9999370156859878 +2025-09-27_18-10-16,Magnetometer,275298,26038628,2735.6870834960937,100.63387548482658 +2025-09-27_18-10-16,MagnetometerUncalibrated,272402,26282756,2735.7309631347657,99.56488976405207 +2025-09-27_18-10-16,Orientation,275298,49373982,2735.6870834960937,100.63387548482658 +2025-09-28_20-23-16,Accelerometer,601414,59278216,11998.016105957031,50.19607843160171 +2025-09-28_20-23-16,AccelerometerUncalibrated,1179458,113198901,11997.93144604492,100.38969633102728 +2025-09-28_20-23-16,Barometer,477594,35883552,11997.954165039064,39.80176853555601 +2025-09-28_20-23-16,Compass,1168911,65651529,11997.991733886718,100.00000000009095 +2025-09-28_20-23-16,GameOrientation,1171096,113195714,11997.916497314452,100.38969633074083 +2025-09-28_20-23-16,GeomagneticOrientation,1169563,113834709,11997.916497314452,100.3896963304544 +2025-09-28_20-23-16,Gravity,1174352,112808312,11998.01610961914,100.38969633102728 +2025-09-28_20-23-16,Gyroscope,1176194,120548656,11998.013618652345,100.38969633102728 +2025-09-28_20-23-16,GyroscopeUncalibrated,1126007,114800759,11997.933935546875,100.38231546040511 +2025-09-28_20-23-16,Location,12338,2080571,11997.03084472656,0.9999855959105185 +2025-09-28_20-23-16,LocationGps,11996,1966581,11997.171693115231,0.9999855959105185 +2025-09-28_20-23-16,LocationNetwork,708,67150,11994.511999999999,0.04705660910074775 +2025-09-28_20-23-16,Magnetometer,1168911,110476006,11997.991733886718,100.00000000009095 +2025-09-28_20-23-16,MagnetometerUncalibrated,1166962,109784558,11997.941716064452,100.00000000009095 +2025-09-28_20-23-16,Orientation,1172679,205274041,11997.946381347656,100.38969633102728 +2025-09-28_20-23-16,TotalAcceleration,1176978,113001293,11997.981248046874,100.38969633102728 +2025-11-09_17-34-01,Accelerometer,473922,46652787,11090.057815673828,50.19730875685257 +2025-11-09_17-34-01,AccelerometerUncalibrated,931597,89762325,11089.968198242188,100.38969633102728 +2025-11-09_17-34-01,Barometer,375883,28174754,11089.962955566405,39.79790128329863 +2025-11-09_17-34-01,Compass,923781,51784406,11090.02134350586,100.00000000009095 +2025-11-09_17-34-01,GameOrientation,925752,89792903,11089.993095214844,100.38969633102728 +2025-11-09_17-34-01,GeomagneticOrientation,924692,90076197,11089.973166503905,100.38969633102728 +2025-11-09_17-34-01,Gravity,928072,89575518,11090.042887695312,100.38969633102728 +2025-11-09_17-34-01,Gyroscope,929764,95142322,11090.032930175781,100.38969633102728 +2025-11-09_17-34-01,GyroscopeUncalibrated,879013,89503332,11089.978157714844,100.37985541060938 +2025-11-09_17-34-01,Location,11353,1889487,11089.098576171875,1.000001708987121 +2025-11-09_17-34-01,LocationGps,11086,1840408,11089.098576171875,1.000001708987121 +2025-11-09_17-34-01,LocationNetwork,599,56682,11087.292842041015,0.046945050818016434 +2025-11-09_17-34-01,Magnetometer,923781,87018814,11090.02134350586,100.00000000009095 +2025-11-09_17-34-01,MagnetometerUncalibrated,922508,88167993,11089.981323974609,100.00000000009095 +2025-11-09_17-34-01,Orientation,926862,161534752,11090.003055908202,100.38969633102728 +2025-11-09_17-34-01,TotalAcceleration,929951,89632149,11090.008034912109,100.38969633102728 +2025-11-16_16-08-14,Accelerometer,584822,57731014,11642.744678466797,50.20407663024953 +2025-11-16_16-08-14,AccelerometerUncalibrated,1153405,111127530,11642.627680664062,100.40446133352101 +2025-11-16_16-08-14,Barometer,463410,34219656,11642.64328881836,39.80486287897342 +2025-11-16_16-08-14,Compass,1142380,64064564,11642.701070312498,100.00000000009095 +2025-11-16_16-08-14,GameOrientation,1147522,110984546,11642.665017578125,100.40446133122884 +2025-11-16_16-08-14,GeomagneticOrientation,1146758,111192278,11642.655060058594,100.40446133122884 +2025-11-16_16-08-14,Gravity,1149369,110806406,11642.724767822267,100.40446133151536 +2025-11-16_16-08-14,Gyroscope,1151126,118142779,11642.72723876953,100.40446133180188 +2025-11-16_16-08-14,GyroscopeUncalibrated,1097328,111918332,11642.637635498048,100.40200019587762 +2025-11-16_16-08-14,Location,11744,1998604,11640.459094726562,1.00000122070527 +2025-11-16_16-08-14,LocationGps,11510,1900937,11624.083102783203,1.00000122070527 +2025-11-16_16-08-14,LocationNetwork,767,64445,11639.10962890625,0.0499675211112773 +2025-11-16_16-08-14,Magnetometer,1142380,108129259,11642.701070312498,100.00000000009095 +2025-11-16_16-08-14,MagnetometerUncalibrated,1143523,109263450,11642.641061523436,100.00000000009095 +2025-11-16_16-08-14,Orientation,1148384,200329098,11642.704838378906,100.40446133122884 +2025-11-16_16-08-14,TotalAcceleration,1151829,111006414,11642.67746875,100.40446133180188 diff --git a/papers/mems_nav_data/scripts/trajectory_stats.csv b/papers/mems_nav_data/scripts/trajectory_stats.csv new file mode 100644 index 00000000..5391bcc4 --- /dev/null +++ b/papers/mems_nav_data/scripts/trajectory_stats.csv @@ -0,0 +1,28 @@ +stem,source,recording,model,family,platform,app,utc_named,rows,fixes,span_s,fix_rate_hz,km,hours,h_acc,h_acc_p95,v_acc,s_acc,sentinels,speed_kmh,lat_min,lat_max,lon_min,lon_max,alt_min,alt_max,baro_rows,grav_10hz_pinned +2023-08-04_21-47-58,2023-08-04_21-47-58,2023-08-04_21-47-58,Pixel 6a,Pixel 6a,Android,1.18.0,True,88087,8034,8808.6,0.9120632109529323,158.34638966600735,2.4468333333333336,1.9512464404106145,18.596710681915283,2.480944156646729,0.17747519910335535,0,87.34988136291504,40.10249502354231,41.16373623912393,-75.67862077187267,-75.27507562910971,9.447891079612385,581.8424577211116,88087,0.5662015961492616 +2023-08-06_14-48-05,2023-08-06_14-48-05,2023-08-06_14-48-05,Pixel 6a,Pixel 6a,Android,1.18.0,True,89196,8920,8919.5,1.0000560569538652,169.11762002376645,2.477638888888889,1.9509601593017578,2.553737390041351,2.4382548332214355,0.17327515780925745,0,77.08649482727051,40.02514068740483,41.163737115601016,-75.57339005497924,-75.22048236384347,-21.08163588064772,584.0593549081555,89194,0.8349926005650478 +2023-08-09_12-47-42,2023-08-09_12-47-42,2023-08-09_12-47-42,Pixel 6a,Pixel 6a,Android,1.18.0,True,52083,5174,5208.2,0.9934334318958565,32.146061949004945,1.4467222222222222,2.580578565597534,5.542469453811645,3.099028706550598,0.2287389636039734,0,3.273687279224396,40.04060437085198,40.19791660175547,-75.24111626682719,-75.05969335792592,5.792908992404018,97.77631546659931,52083,0.6203751704010906 +2023-08-09_16-37-41,2023-08-09_16-37-41,2023-08-09_16-37-41,Pixel 6a,Pixel 6a,Android,1.18.0,True,25791,2579,2579.0,1.0,40.98770706520589,0.7163888888888889,2.1977267265319824,4.59014286994934,2.7048285007476807,0.2023708373308181,0,62.79438400268555,40.025148874747465,40.19224800029078,-75.32389119315377,-75.08315780740286,-25.32761930878324,71.0898922402189,25791,0.5002132526850451 +2024-06-20_16-55-50,2024-06-20_16-55-50,2024-06-20_16-55-50,Pixel 6a,Pixel 6a,Android,1.35.0,True,84126,8391,8412.5,0.997444279346211,192.3154820775407,2.336805555555556,7.7870635986328125,9.937775135040283,3.004232168197632,0.2303473204374313,0,98.58538970947266,40.02515332821833,41.3097462448218,-76.0943311659498,-75.22048311308416,-19.80557406965764,559.3931780726654,84126,0.5804745263057794 +2025-03-01_15-04-26,2025-03-01_15-04-26,2025-03-01_15-04-26,SM-S921U,Samsung SM-S921U,Android,1.41.1,True,54484,5457,5448.3,1.001596828368482,114.17840457771442,1.5134166666666666,3.799000024795532,3.816999912261963,1.320585012435913,0.0770527049899101,0,83.91612167358399,40.0255889,40.3656893,-76.1784814,-75.2205269,-18.700000762939453,257.8983249017243,54484,0.6770428015564203 +2025-03-01_16-46-39,2025-03-01_16-46-39,2025-03-01_16-46-39,SM-S921U,Samsung SM-S921U,Android,1.41.1,True,53665,5386,5366.4,1.0036523553965415,113.61984094595442,1.4906666666666666,3.79800009727478,3.816999912261963,1.2999999523162842,0.08040166273713105,0,82.87109184265138,40.0251302,40.3658185,-76.1803025,-75.220475,-27.473553679344008,276.4058498227532,53665,0.6291810304667846 +2025-06-11_20-34-24_A,2025-06-11_20-34-24,2025-06-11_20-34-24,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.43.3,True,4109,411,410.8,1.0004868549172345,2.0763890428796734,0.1141111111111111,6.63265323638916,14.540816307067871,3.0,0.4600000083446502,0,15.659999656677247,39.98105300590396,39.9863385502249,-75.16874478198588,-75.15131193213165,-12.0,53.0,4109,0.151375030421027 +2025-06-14_21-17-02,2025-06-14_21-17-02,2025-06-14_21-17-02,SM-A146U,Samsung SM-A146U,Android,1.43.3,True,5860,197,585.9,0.3362348523638846,12.67159202962098,0.16275,12.208999633789062,899.9990234375,0.7165302038192749,0.3900353610515594,9,2.0591792821884156,40.0720701,40.0938614,-75.2881901,-75.2397738,10.8490464108283,76.07688670441934,5860,0.00017064846416382253 +2025-06-18_15-09-25,2025-06-18_15-09-25,2025-06-18_15-09-25,Pixel 9 Pro XL,Pixel 9 Pro / Pro XL,Android,1.43.3,True,53421,5248,5342.0,0.9824035941594909,148.8931244118919,1.4838888888888888,8.163265228271484,15.816326141357422,3.0,0.3799999952316284,0,111.38399505615234,39.0174815710634,39.66234928462654,-76.97820036672056,-75.69031557999551,-39.0,85.0,53421,0.9054304486999495 +2025-06-18_16-52-32,2025-06-18_16-52-32,2025-06-18_16-52-32,Pixel 9 Pro XL,Pixel 9 Pro / Pro XL,Android,1.43.3,True,79163,7916,7916.2,0.9999747353528208,144.8980091993545,2.1989444444444444,5.102040767669678,11.352041006088257,2.0,0.2000000029802322,0,74.23199615478516,38.930604946799576,39.70147123094648,-75.69064666517079,-74.81598601676524,-47.0,30.0,79162,0.9026312797645365 +2025-06-27_11-54-35,2025-06-27_11-54-35,2025-06-27_11-54-35,iPhone 12 mini,iPhone 12/13 mini,iOS,1.43.3,True,178149,17767,17814.8,0.9973168376855199,402.28725856853214,4.948555555555555,10.0,13.912626481548227,19.0,0.2,0,99.08200000000001,40.09443333333334,42.07036666666666,-75.2904471860304,-72.10640000000001,-30.106072074733675,172.57909624651074,16689,0.9270329892393446 +2025-07-04_17-24-46,2025-07-04_17-24-46,2025-07-04_17-24-46,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.43.3,True,62692,6227,6269.1,0.9932845224992423,137.43895285908468,1.7414166666666668,6.63265323638916,14.285714149475098,2.0,0.25,0,93.56399917602539,39.15655272547156,40.04069896414876,-75.22906724363565,-74.5555882807821,-49.0,61.0,62692,0.9074071119761339 +2025-07-05_20-59-22,2025-07-05_20-59-22,2025-07-05_20-59-22,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.43.3,True,90186,9017,9018.5,0.9998336752231524,138.536261337398,2.505138888888889,7.142857074737549,14.285714149475098,3.0,0.3100000023841858,5,55.11599807739258,39.155701040290296,40.03215902019292,-75.22859467193484,-74.54917956143618,-48.0,48.0,90186,0.9387800361487199 +2025-07-08_14-12-53,2025-07-08_14-12-53,2025-07-08_14-12-53,iPhone 13 mini,iPhone 12/13 mini,iOS,1.44,True,66592,6658,6659.1,0.9998348125122013,96.20028265855925,1.84975,2.4566302269628424,8.526837310743755,3.0,1.5564999749157795,0,54.79240839255656,39.98268690576317,40.08505987856388,-76.22198153513169,-75.21726250461194,-20.89727809652686,222.17354706767944,6279,0.23339139836617012 +2025-07-11_13-33-16,2025-07-11_13-33-16,2025-07-11_13-33-16,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.43.3,True,59786,5961,5978.5,0.9970728443589529,136.18874879164596,1.6606944444444445,1.530612230300903,3.061224460601806,1.0,0.1199999973177909,0,97.91999588012696,39.155573886819184,40.03219426609576,-75.22906875237823,-74.55556045286357,-34.0,48.0,59786,0.886863145217944 +2025-07-18_23-13-43,2025-07-18_23-13-43,2025-07-18_23-13-43,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.44.0,True,55622,5526,5562.1,0.993509645637439,152.14599039244283,1.545027777777778,1.530612230300903,3.5714285373687744,1.0,0.1299999952316284,0,109.43999862670901,40.02557423897088,41.11126388423145,-75.67857831716537,-75.2215635124594,-22.0,538.0,55622,0.8232354104491029 +2025-07-31_23-36-03,2025-07-31_23-36-03,2025-07-31_23-36-03,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.44.0,True,134496,13450,13449.5,1.0000371761032008,304.64528210037804,3.7359722222222222,1.530612230300903,4.591836929321289,1.0,0.1299999952316284,0,88.48799972534178,40.04056200385094,40.99571251776069,-75.24112494662404,-72.55279806442559,-33.0,97.0,134496,0.8409097668332144 +2025-08-03_18-15-59,2025-08-03_18-15-59,2025-08-03_18-15-59,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.44.0,True,148973,14892,14897.2,0.9996509411164514,298.2285254822921,4.138111111111112,1.530612230300903,3.5714285373687744,1.0,0.1400000005960464,0,84.16799697875977,40.04079661332071,40.96805688925088,-75.24123701266944,-72.63360950164497,-38.0,95.0,148973,0.8380903794001557 +2025-09-26_19-03-38,2025-09-26_19-03-38,2025-09-26_19-03-38,iPhone 12 mini,iPhone 12/13 mini,iOS,1.46,True,165223,16505,16522.2,0.9989589764075002,497.1551664653962,4.5895,5.0,10.0,9.5,0.2,0,122.97280000000005,39.95471666666666,40.68018333333333,-80.10602151864487,-75.27476698590077,0.0,687.092601172626,15486,0.976377380873123 +2025-09-27_12-54-35,2025-09-27_12-54-35,2025-09-27_12-54-35,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.46.0,True,81361,8136,8136.0,1.0,213.01934383531807,2.26,2.040816307067871,4.081632614135742,1.0,0.1400000005960464,0,108.86399917602539,40.0255756219849,40.275240456685424,-77.39760498516262,-75.21744824945927,-18.0,195.0,81361,0.8539718046730006 +2025-09-27_18-10-16,2025-09-27_18-10-16,2025-09-27_18-10-16,iPhone 12 mini,iPhone 12/13 mini,iOS,1.46,True,27348,2731,2734.7,0.9986470179544374,56.33387481503218,0.7596388888888889,10.0,10.0,19.0,0.2,0,89.08120000000001,40.13121666666667,40.25538937893573,-75.22209229847498,-74.70168511135618,-13.63050482608378,0.0,2560,0.9255521427526693 +2025-09-28_20-23-16,2025-09-28_20-23-16,2025-09-28_20-23-16,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.46.0,True,119979,11996,11997.8,0.9998499724949574,286.2860920465528,3.332722222222222,2.040816307067871,3.061224460601806,1.0,0.1299999952316284,0,99.07199478149414,39.65419838670641,40.24592994712293,-77.70860770717263,-75.22050269879401,-19.0,373.0,119979,0.8735695413364005 +2025-11-09_17-34-01_A,2025-11-09_17-34-01,2025-11-09_17-34-01,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.48.0,True,38535,3854,3853.4,1.000155706648674,107.97260843201944,1.0703888888888888,1.530612230300903,3.061224460601806,1.0,0.1199999973177909,0,106.12799835205078,40.43352113105357,40.798675222322345,-77.81854550354183,-77.01199938543141,81.0,526.0,38535,0.8945114830673414 +2025-11-09_17-34-01_B,2025-11-09_17-34-01,2025-11-09_17-34-01,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.48.0,True,5582,559,558.1,1.0016126142268411,1.1264224857536234,0.1550277777777778,2.040816307067871,3.061224460601806,1.0,0.0099999997764825,0,0.0,40.209876364097,40.21080424077809,-76.75521525554359,-76.74273904412985,78.0,86.0,5582,0.9605876030096739 +2025-11-09_17-34-01_C,2025-11-09_17-34-01,2025-11-09_17-34-01,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.48.0,True,50237,5020,5023.6,0.9992833824349072,141.8180689628249,1.3954444444444445,2.040816307067871,3.061224460601806,1.0,0.3100000023841858,0,114.6240005493164,40.025126603432,40.24593204259872,-76.74273728393018,-75.22737259045243,-21.0,185.0,50237,0.8723848955948803 +2025-11-16_16-08-14,2025-11-16_16-08-14,2025-11-16_16-08-14,Pixel 9 Pro,Pixel 9 Pro / Pro XL,Android,1.48.0,True,116252,11510,11625.1,0.9900990099009901,239.051040746172,3.2291944444444445,2.040816307067871,4.591836929321289,1.0,0.1400000005960464,0,89.58599739074707,38.870161031372845,40.07165270391852,-77.02617435716093,-75.2273083012551,-39.0,90.0,116252,0.8876062347314455 diff --git a/papers/mems_nav_data/sections/abstract.tex b/papers/mems_nav_data/sections/abstract.tex new file mode 100644 index 00000000..5d215608 --- /dev/null +++ b/papers/mems_nav_data/sections/abstract.tex @@ -0,0 +1 @@ +Research on navigation without, or with degraded, satellite positioning needs long recordings from low-cost inertial sensors, because the errors that matter grow over minutes to hours rather than seconds. Most public navigation datasets are instead short, collected on a campus or in a city, and built around cameras or lidar. MEMS-Nav contains \numRawRecordings{} drives recorded with the Sensor Logger application on \numDevices{} smartphone models (Google Pixel, Samsung Galaxy and Apple iPhone) between \numRawFirst{} and \numRawLast{} in the north-eastern United States, mostly at highway speed. The raw release keeps every sensor stream at the rate the phone delivered it, typically about 100~Hz for the accelerometer, gyroscope, magnetometer, operating-system gravity and attitude, and about 1~Hz for GNSS. The processed release cuts the recordings at inertial dropouts into \numTrajectories{} synchronized trajectories at 10~Hz, totalling \numTotalHours~h and \numTotalKm~km (median \numMedianHours~h and \numMedianKm~km), with \numFixes{} GNSS fixes left at their native rate and never interpolated. Each trajectory ships with cropped relief, free-air gravity anomaly and magnetic anomaly grids. The data are described per device, per channel and per trajectory, together with three properties of phone sensors that matter to anyone attempting map-based aiding: the receiver's advertised accuracies, a gravity vector whose norm the operating system holds at a device constant, and a magnetometer dominated by the vehicle's own field. The open-source simulator strapdown-rs replays every trajectory and can withhold or corrupt the GNSS fixes, and reference baselines are reported for an extended Kalman filter, an unscented Kalman filter and a Rao--Blackwellized particle filter. With every fix, the two Kalman filters agree with the recorded GNSS track to a median horizontal RMSE of \numEkfFullMedian~m and \numUkfFullMedian~m. With one corrupted fix per minute, the median grows to \numEkfDegradedMedian~m and \numUkfDegradedMedian~m. The reference position is the phone's own GNSS solution, not an independent ground truth. diff --git a/papers/mems_nav_data/sections/background.tex b/papers/mems_nav_data/sections/background.tex new file mode 100644 index 00000000..a29576f5 --- /dev/null +++ b/papers/mems_nav_data/sections/background.tex @@ -0,0 +1,8 @@ +\section{Background} +\label{sec:background} + +An inertial navigation system integrates angular rate and specific force to propagate position, velocity and attitude, and its error grows without bound unless an external measurement corrects it \citep{groves}. In most vehicles that correction is GNSS. Interference, spoofing and plain unavailability can remove or corrupt it \citep{9112619}, which has driven interest in alternative position sources such as gravity and magnetic anomaly maps \citep{canciani2016absolute,canciani2017airborne,gravnav}. Developing and comparing such methods requires recordings in which the inertial error has time to grow. With consumer MEMS sensors that means drives of tens of minutes to hours, and for map-based aiding it also means distances long enough to cross map features. The public grids used here have cells of 1 arc-minute for the free-air gravity anomaly and 3 arc-minutes for the magnetic anomaly, about 1.9 and 5.6~km \citep{SANDWELL20211059,wdmam}. + +Existing datasets fit this need poorly. Vehicle and robot datasets such as KITTI \citep{kitti}, Oxford RobotCar \citep{oxford-robotcar}, the Ford campus set \citep{ford-campus}, the DARPA Urban Challenge set \citep{mit-darpa}, KAIST Urban \citep{kaist-urban} and NCLT \citep{nclt} pair navigation-grade inertial or GNSS/INS references with cameras and lidar, and they are recorded on campuses or in cities. Aerial and handheld visual--inertial sets \citep{burri2016euroc,tum-vi,uzh-fpv,nguyen2022ntu,newer-college} last minutes. Smartphone datasets exist, but they target other problems: raw GNSS measurements for precise positioning \citep{fu2020android}, or pedestrian inertial odometry \citep{herath2020ronin}. Inertial datasets for autonomous platforms \citep{ansfl,yampolsky2024multiple} are built around dedicated inertial units. To our knowledge, no public dataset combines hours-long road drives, consumer phone inertial sensors from several manufacturers, barometer and magnetometer streams, and a ready-made way to impose controlled GNSS degradation. + +An earlier version of MEMS-Nav was released as a preprint and a GitHub repository with 17 trajectories at about 1~Hz \citep{memsnav-preprint}, and parts of it were used to evaluate anomaly-aided filters \citep{anom-ukf,anom-pf}. This article supersedes that release. It adds the raw recordings at their delivered rates, \numTrajectories{} trajectories in place of 17, a 10~Hz processed form, per-device and per-channel documentation, map tiles for every trajectory, reference baselines under a specified degradation scenario, and a characterization of the phone channels that explains why they bring no measurable benefit when used as anomaly measurements \citep{brodovsky2026dissertation}. diff --git a/papers/mems_nav_data/sections/description.tex b/papers/mems_nav_data/sections/description.tex new file mode 100644 index 00000000..01077778 --- /dev/null +++ b/papers/mems_nav_data/sections/description.tex @@ -0,0 +1,78 @@ +\section{Data description} +\label{sec:description} + +The dataset has three tiers: the raw recordings exactly as the phones exported them, the processed trajectories that most users will start from, and the map tiles and benchmark material that accompany the processed trajectories. \Cref{tab:devices} summarizes the recordings by device and \Cref{fig:tracks} shows where they were made. + +\subsection{Repository layout} +\label{sec:layout} + +The Zenodo record \todo{new Zenodo DOI} is organized as follows. \todo{confirm the final directory names once the record is assembled; the layout below is the one proposed for it.} + +\begin{itemize} +\item \texttt{raw//}: one directory per recording, named by its UTC start time as \texttt{YYYY-MM-DD\_hh-mm-ss}. All \numUtcNamed{} directory names match the epoch timestamp stored in their \texttt{Metadata.csv}. Each directory holds the Sensor Logger CSV exports (\Cref{sec:raw}). +\item \texttt{processed/.csv}: the \numTrajectories{} synchronized 10~Hz trajectories (\Cref{sec:processed}). A trajectory cut from a recording that had to be split carries a suffix \texttt{\_A}, \texttt{\_B}, \ldots{} in time order. +\item \texttt{processed/segments.json}: the segmentation manifest. It has one entry per recording or segment, giving the source recording, the start and end time in seconds from the start of the recording, the row count, and whether the segment was kept or why it was rejected. +\item \texttt{maps/\_\{relief,gravity,magnetic\}.nc}: map tiles cropped to each trajectory (\Cref{sec:maps}). +\item \texttt{benchmark/}: the scenario configurations and the per-trajectory error summaries behind \Cref{tab:benchmark}. +\end{itemize} + +\begin{table}[t] +\centering +\caption{Recordings by device, as identified in each recording's \texttt{Metadata.csv}. \emph{Rec.}\ counts raw recordings and \emph{Traj.}\ counts processed trajectories; hours and distance are those of the processed trajectories. \emph{GNSS file} is the raw file that the processed GNSS columns are taken from: \texttt{LocationGps} is Android's GNSS-only provider and \texttt{Location} is the platform's fused location service.} +\label{tab:devices} +\small +\input{tables/devices.tex} +\end{table} + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{figures/fig_tracks.pdf} +\caption{GNSS tracks of the \numTrajectories{} processed trajectories, colored by device family, over the 15 arc-second relief tiles that accompany them (darker is higher). The single Samsung SM-A146U trajectory is short and lies under other tracks near 40.1\textdegree{}N, 75.3\textdegree{}W.} +\label{fig:tracks} +\end{figure} + +\subsection{Raw recordings} +\label{sec:raw} + +There are \numRawRecordings{} raw recordings, made between \numRawFirst{} and \numRawLast{} with Sensor Logger versions 1.18.0 to 1.48.0 \citep{sensorlogger}. Together they hold \numRawGB~GB in about \numRawRowsMillion{} million rows and span \numRawHours~h of wall-clock time. One recording (\texttt{2025-06-13\_14-55-15}) contains no sensor data. Every sensor file has the columns \texttt{time}, the UTC epoch time in nanoseconds, and \texttt{seconds\_elapsed}, the time since the recording started, followed by its measured quantities. Three-axis sensors give \texttt{x}, \texttt{y} and \texttt{z} in the phone's body frame as reported by the operating system. \texttt{Metadata.csv} records the device model, platform, application version, the list of enabled sensors, their requested sampling interval in milliseconds, and whether Sensor Logger's cross-platform unit standardization was on. + +The files present depend on the platform and the application version. All recordings with data have \texttt{Gyroscope}, \texttt{Accelerometer}, \texttt{Gravity}, \texttt{Magnetometer}, \texttt{Orientation} and \texttt{Location}. Android recordings add \texttt{TotalAcceleration} (specific force including gravity). Recordings from 2025 onward add \texttt{GyroscopeUncalibrated}, \texttt{AccelerometerUncalibrated}, \texttt{MagnetometerUncalibrated} and \texttt{Compass}. Pixel recordings add the separate GNSS (\texttt{LocationGps}) and network (\texttt{LocationNetwork}) location providers, and Pixel 9 Pro recordings also add \texttt{GameOrientation} and \texttt{GeomagneticOrientation}. On both platforms \texttt{Accelerometer} is linear acceleration, with gravity removed. \numNoBaroRecordings{} iPhone recordings (\numNoBaroHours~h) have no barometer data and are released in raw form only. \Cref{tab:channels} lists the median sampling rate of each channel by device family, measured from the timestamps. + +\begin{table}[t] +\centering +\caption{Sensor channels. Rates are the median, over the recordings of each device family that enter the processed set, of each recording's median sampling rate (Hz) in the raw files; every channel is resampled to 10~Hz in the processed files. Sensor Logger requested a 10~ms interval for all inertial channels and left the barometer and location at their defaults. (a)~On iOS, where there is no \texttt{TotalAcceleration}, specific force is formed as \texttt{Accelerometer} plus \texttt{Gravity}. (b)~\texttt{Location} where \texttt{LocationGps} is absent (\Cref{tab:devices}). Processed column names are abbreviated; \Cref{sec:processed} lists them in full with their units.} +\label{tab:channels} +\footnotesize +\setlength{\tabcolsep}{2.5pt} +\input{tables/channels.tex} +\end{table} + +\subsection{Processed trajectories} +\label{sec:processed} + +The \numTrajectories{} processed trajectories hold \numRows{} rows at 10~Hz. \Cref{tab:trajectories} lists them. They last from \numMinHours~h to \numMaxHours~h and cover \numMinKm~km to \numMaxKm~km, for \numTotalHours~h and \numTotalKm~km in total. The median GNSS speed is \numMedianSpeed~km/h, so most of the driving is on highways. Each file has the following columns. +\begin{itemize} +\item \texttt{time}: ISO 8601 timestamp in UTC, at the start of each 0.1~s bin. +\item \texttt{latitude}, \texttt{longitude} (degrees, WGS84), \texttt{altitude} (m, as reported by the location service), \texttt{speed} (m/s), \texttt{bearing} (degrees from north), and the receiver's reported \texttt{horizontalAccuracy} (m), \texttt{verticalAccuracy} (m), \texttt{speedAccuracy} (m/s) and \texttt{bearingAccuracy} (degrees). These columns are filled only in rows that contain a GNSS fix and are empty elsewhere. +\item \texttt{acc\_x}, \texttt{acc\_y}, \texttt{acc\_z}: specific force in the body frame (m/s\(^2\)), including gravity, so that a phone at rest reads about \(+9.8\)~m/s\(^2\) along its upward axis. +\item \texttt{gyro\_x}, \texttt{gyro\_y}, \texttt{gyro\_z}: angular rate (rad/s), as calibrated by the operating system. +\item \texttt{mag\_x}, \texttt{mag\_y}, \texttt{mag\_z}: magnetic flux density (\(\mu\)T), with the operating system's hard-iron correction applied (\Cref{sec:magnetometer}). +\item \texttt{grav\_x}, \texttt{grav\_y}, \texttt{grav\_z}: the operating system's fused gravity estimate (m/s\(^2\); \Cref{sec:gravity}). +\item \texttt{qw}, \texttt{qx}, \texttt{qy}, \texttt{qz} and \texttt{roll}, \texttt{pitch}, \texttt{yaw} (rad): the operating system's fused attitude. +\item \texttt{pressure} (hPa) and \texttt{relativeAltitude} (m, change since the recording began, derived from pressure). +\end{itemize} +The GNSS columns hold \numFixes{} fixes, a median of \numMedianFixRate{} fixes per second per trajectory, and they are never interpolated: in about nine rows out of ten they are empty. The inertial columns are complete in every row. iOS phones deliver pressure at about 1~Hz, so on those trajectories only a median of \numIosBaroFraction\% of rows carry a pressure value. + +\begin{table}[p] +\centering +\caption{The processed trajectories. \emph{Speed} is the median GNSS speed, \emph{Fixes} the number of rows with a GNSS fix, and \emph{Fix rate} the fixes per second of trajectory. \(\sigma_h\), \(\sigma_v\) and \(\sigma_s\) are the medians of the receiver's reported horizontal, vertical and speed accuracy over those fixes. Distance is the summed great-circle distance between successive fixes.} +\label{tab:trajectories} +\scriptsize +\setlength{\tabcolsep}{3pt} +\input{tables/trajectories.tex} +\end{table} + +\subsection{Map tiles} +\label{sec:maps} + +Each processed trajectory comes with three NetCDF grids cropped to its padded bounding box. Each grid has variables \texttt{lat}, \texttt{lon} (degrees) and \texttt{z}: relief at 15 arc-seconds (m; SRTM15+, \citealp{tozer2019srtm15}), free-air gravity anomaly at 1 arc-minute (mGal; \citealp{SANDWELL20211059}) and magnetic anomaly at 3 arc-minutes (nT; WDMAM, \citealp{wdmam}). They were fetched through the Generic Mapping Tools remote datasets \citep{wessel2019gmt}, are provided for convenience, and remain subject to their originators' terms. diff --git a/papers/mems_nav_data/sections/limitations.tex b/papers/mems_nav_data/sections/limitations.tex new file mode 100644 index 00000000..9c3661ce --- /dev/null +++ b/papers/mems_nav_data/sections/limitations.tex @@ -0,0 +1,12 @@ +\section{Limitations} +\label{sec:limitations} + +\begin{itemize} +\item \textbf{No independent reference.} The reference trajectory is the phone's own GNSS solution, with the accuracies of \Cref{sec:gnss}. Nothing in the dataset measures position more accurately than that. Errors computed against it, including those in \Cref{tab:benchmark}, measure agreement with the recorded GNSS track, not absolute error. They are meaningful when the estimate under test is substantially worse than the GNSS, as in GNSS-outage and degradation studies, and lose meaning as the estimate approaches metre level. Attitude and velocity have no reference beyond the operating system's own estimates and the GNSS velocity. +\item \textbf{Unknown installation.} \todo{state what is known about phone placement.} Lever arms, mounting orientation and any movement of the phone within the vehicle were not recorded, and the body axes are the phone's, not the vehicle's. +\item \textbf{Opaque on-device processing.} The calibrated inertial streams, the gravity and attitude estimates, the hard-iron correction and the location fixes are all produced by proprietary operating-system and chipset software that differs between devices and changes with software updates. \Cref{sec:gravity,sec:magnetometer} show two consequences: the gravity norm is fixed at a constant, and the calibrated magnetic field still contains the vehicle's field. +\item \textbf{Uneven coverage.} One phone family, the Pixel 9 Pro, contributes 13 of the \numTrajectories{} trajectories. All drives are in one region of the north-eastern United States and most are on highways. Urban canyons, tunnels and genuinely jammed or spoofed GNSS are absent; degradation is simulated, not recorded. +\item \textbf{Platform differences.} Sampling rates differ between devices (\Cref{tab:channels}), iPhones deliver pressure at about 1~Hz, and GNSS comes from Android's GNSS-only provider on Pixel phones but from the fused location service elsewhere. Reported altitude is not consistent across platforms (\Cref{sec:gnss}). +\item \textbf{Processing choices.} The processed files are bin-averaged to 10~Hz and split at inertial dropouts. Two iPhone recordings without barometer data (\numNoBaroHours~h) appear only in the raw tier. The trajectory \texttt{2025-06-14\_21-17-02} has sparse, low-quality GNSS (\Cref{sec:gnss}). +\item \textbf{Baselines are reference points, not tuned results.} The filter configurations in \Cref{tab:benchmark} were not optimized per trajectory, and the RBPF configuration diverges under the degraded scenario. +\end{itemize} diff --git a/papers/mems_nav_data/sections/methods.tex b/papers/mems_nav_data/sections/methods.tex new file mode 100644 index 00000000..9dc53d57 --- /dev/null +++ b/papers/mems_nav_data/sections/methods.tex @@ -0,0 +1,71 @@ +\section{Experimental design, materials and methods} +\label{sec:methods} + +\subsection{Collection} +\label{sec:collection} + +The drives were recorded by the authors and by volunteers (see Acknowledgements) on public roads. The phones ran Sensor Logger \citep{sensorlogger} with the accelerometer, gyroscope, magnetometer, gravity, orientation and barometer sensors enabled, together with location and, where offered, the uncalibrated and compass streams. Every inertial channel was requested at a 10~ms interval. The barometer and location were left at the application's default, which \texttt{Metadata.csv} records as an interval of 0. The phones were \todo{state where and how the phones were held in the vehicle (mount, cradle, cup holder, loose), whether the mount changed during a drive, and which vehicles were used}. \todo{confirm that no additional hardware and no external reference receiver were used}. \Cref{tab:devices} lists the devices; \Cref{tab:channels} gives the rates the phones actually delivered, which fall short of the request on some devices (about 56~Hz for the Pixel 6a's inertial channels and about 60~Hz for the Samsung SM-S921U's gyroscope). + +\subsection{Processing} +\label{sec:processing} + +The raw recordings were converted to the processed trajectories by the \texttt{preprocess} command of the analysis package distributed with strapdown-rs \citep{strapdown-rs} (\texttt{analysis/src/analysis/preprocess.py}), run at 10~Hz. For each recording the steps are as follows. +\begin{enumerate} +\item Load the gyroscope, magnetometer, barometer, gravity, orientation and location files, and reject the recording if any is missing or the gyroscope covers less than 300~s. GNSS is taken from \texttt{LocationGps} when the recording has it and otherwise from \texttt{Location}. +\item Take specific force from \texttt{TotalAcceleration}. Where that file is absent (iOS), add \texttt{Gravity} to the linear acceleration in \texttt{Accelerometer}. +\item Outer-join all streams on their UTC timestamps, discard everything before the first GNSS fix, and average into 0.1~s bins. Because GNSS arrives at about 1~Hz, nearly every fix falls in a bin of its own, and bins without a fix keep empty GNSS columns. +\item Split the result wherever the inertial columns are empty for more than 5~s (the largest gap the strapdown-rs simulator accepts), trim incomplete rows from the ends, and drop any segment shorter than 300~s. +\item Download the three map tiles for the segment's bounding box, padded by a margin, through PyGMT \citep{wessel2019gmt}. +\end{enumerate} +Of the \numRawRecordings{} recordings, \numUsedRecordings{} yield processed trajectories. \texttt{segments.json} records the reasons for the other \numExcludedRecordings{}. One recording has no sensor data, one stops its inertial streams after 147~s, and \numNoBaroRecordings{} have no barometer. One recording was split at inertial dropouts into three kept trajectories (\texttt{2025-11-09\_17-34-01\_A}--\texttt{C}). In another, the two segments after a dropout were shorter than 300~s and were dropped, leaving \texttt{2025-06-11\_20-34-24\_A}. + +Bin averaging is a boxcar decimation. It slightly shortens vector quantities whose direction changes within a bin; \Cref{sec:gravity} shows the effect on the gravity norm. Users who need the full rate or a different filter should start from the raw files. + +\subsection{GNSS quality} +\label{sec:gnss} + +\Cref{fig:gnss} shows the distribution of the accuracies the receivers reported. Across trajectories, the median reported horizontal accuracy is \numMedianHacc~m (trajectory medians range from \numHaccMin{} to \numHaccMax~m), the median vertical accuracy is \numMedianVacc~m, and the median speed accuracy is \numMedianSacc~m/s (\Cref{tab:trajectories}). Some devices report accuracy in a few discrete values, visible as steps in \Cref{fig:gnss}, so these figures are better read as the receiver's own coarse quality flag than as calibrated error statistics. The two platforms' location services also disagree on altitude. On \numAltIosCells{} road cells of \(0.002^\circ\) traversed above 15~m/s by both an iPhone and a Pixel 9 Pro, the iPhone altitude is lower by a median of \(\numAltIosMedian\)~m (interquartile range \(\numAltIosLow\) to \(\numAltIosHigh\)~m). The two other Android families agree with the Pixel 9 Pro to within \numAltAndroidMaxOffset~m. Altitude should therefore not be compared across platforms without care. Over the whole set, \numSentinelTotal{} fixes in \numSentinelTrajectories{} trajectories report a horizontal accuracy of 999~m or more, which marks a fix with no usable accuracy estimate. + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{figures/fig_gnss_accuracy.pdf} +\caption{Empirical distribution of the horizontal (a) and vertical (b) accuracy reported with each GNSS fix in the processed trajectories, pooled by device family. Line styles distinguish families in addition to color.} +\label{fig:gnss} +\end{figure} + +One trajectory is markedly worse than the rest. \texttt{2025-06-14\_21-17-02}, the only Samsung SM-A146U recording with data, delivered \numBadRawFixes{} location fixes in its raw file and \numBadFixes{} in the processed trajectory over \numBadSpan~s, a rate of \numBadFixRate{} fixes per second with gaps of up to \numBadMaxGap~s. Its median reported horizontal accuracy is \numBadHacc~m, and \numBadSentinels{} of its fixes report 999~m or more (up to \numBadHaccMax~m). It is kept in the release as a realistic poor-reception case. It dominates any aggregate that includes it, however (\Cref{sec:benchmark}), and users may prefer to report results with and without it. + +\subsection{The operating-system gravity vector} +\label{sec:gravity} + +The \texttt{Gravity} stream is not an accelerometer measurement. It is the operating system's fused estimate of the gravity direction, and its norm carries no information about local gravity. \Cref{fig:gravity} shows, for every raw sample, how far the norm falls below the largest norm in its recording. In \numGravRawPinnedRecordings{} of the \numUsedRecordings{} recordings that enter the processed set, every raw sample lies within 1~mGal (\(10^{-5}\)~m/s\(^2\)) of the recording's maximum. That maximum is a device constant: a median of \numGravPixel~m/s\(^2\) on the Pixel phones and \numGravSamsungApple~m/s\(^2\), standard gravity, on the Samsung SM-S921U and the iPhones. The exception, the Samsung SM-A146U, varies by tens of mGal below \numGravAfourteen~m/s\(^2\) (5th to 95th percentile of the deficit: \numGravAfourteenPfiveDeficit{} to \numGravAfourteenPninetyfiveDeficit~mGal). That variation is far larger than the gravity anomaly signal along these tracks. The 10~Hz bin averaging spreads the pinned norm slightly. In the processed files a median trajectory has \numGravTenHzPinnedMedian\% of its rows within 1~mGal of its maximum, which matches the figure reported by \citet{brodovsky2026dissertation}. Against the free-air anomaly map, the median per-trajectory signal-to-noise ratio of the resulting anomaly measurement is \numSnrGravity{} (best trajectory \numSnrGravityBest), below one on every trajectory \citep{brodovsky2026dissertation}. The \texttt{grav\_*} columns are useful as the operating system's attitude reference, not as a gravimeter. + +\begin{figure}[t] +\centering +\includegraphics[width=\linewidth]{figures/fig_gravity_norm.pdf} +\caption{Norm of the operating-system gravity vector at the raw rate, expressed as its shortfall from the largest norm in the same recording and pooled by device family. Every family except the Samsung SM-A146U stays within 1~mGal (vertical line) of a fixed value throughout every recording.} +\label{fig:gravity} +\end{figure} + +\subsection{The magnetometer} +\label{sec:magnetometer} + +The \texttt{Magnetometer} stream is already hard-iron corrected by the operating system. In the \numHardIronCount{} processed recordings that also contain \texttt{MagnetometerUncalibrated}, the difference between the median uncalibrated and median calibrated field ranges from \numHardIronMin{} to \numHardIronMax~\(\mu\)T in magnitude. The calibrated field is still dominated by the vehicle. The median calibrated intensity of the processed trajectories ranges from \numMagIntensityMin{} to \numMagIntensityMax~\(\mu\)T, although all of them were recorded within a few hundred kilometres of each other and the geomagnetic field \citep{wmm} varies far less over that region. Fitting the heading-dependent pattern of the field leaves a body-fixed horizontal field of 56~\(\mu\)T at the median, larger than the Earth's horizontal field, and vehicle heading explains 57\% of the variance of the observed intensity \citep{brodovsky2026dissertation}. The median per-trajectory signal-to-noise ratio of the magnetic anomaly measurement against the WDMAM grid is \numSnrMagnetic{} (best \numSnrMagneticBest). The magnetometer direction can still support a heading measurement, but magnetic anomaly navigation from these phones would first need a vehicle calibration that the data do not provide. + +\subsection{Replay, degradation and baselines} +\label{sec:benchmark} + +Every processed trajectory can be replayed by the strapdown-rs simulator \citep{strapdown-rs}, which implements strapdown mechanization in the local-level frame after \citet{groves}. The recordings follow the east--north--up convention for specific force (\Cref{sec:processed}), so the simulator is run with \texttt{is\_enu = true}; it checks the declared frame against the data and refuses a mismatch. The simulator's GNSS degradation acts at two levels. A scheduler decides which recorded fixes the filter receives: all of them, one every fixed interval, or alternating on and off windows. A fault model then corrupts the delivered fixes, either with first-order autoregressive (AR(1)) noise on position and velocity together with inflated reported covariance \citep{wang2022noise}, with a slow drift, or with a step offset during a time window. Every random draw comes from a seeded generator, so a configuration file reproduces a run exactly. + +The baselines in \Cref{tab:benchmark} use two scenarios. With \emph{full} GNSS, every recorded fix is delivered unmodified. With \emph{degraded} GNSS, one fix every 60~s is delivered. It carries AR(1) position error with a steady-state standard deviation of 35~m and a correlation time of 500~s, and AR(1) velocity error of 1.5~m/s with a correlation time of 100~s. The reported standard deviations are scaled by 5, so the measurement covariance grows by 25, and the seed is 42. Three filters were run: a loosely coupled extended Kalman filter (EKF), an unscented Kalman filter (UKF), and a Rao--Blackwellized particle filter (RBPF) after \citet{canciani2017airborne} \todo{confirm the particle count used for these runs; their configurations were not archived}. The simulator also passes the barometric relative altitude and a magnetometer-derived heading to the filters at its default schedule of one per second \todo{confirm which of these each filter consumed, and the strapdown-rs commit that produced the benchmark files}. No geophysical measurement was used. Performance is the horizontal great-circle distance between the filter's position and the recorded GNSS fix, evaluated at every recorded fix, including the fixes withheld from the filter. It is summarized per trajectory as a root-mean-square error (RMSE) and then across trajectories. + +\begin{table}[t] +\centering +\caption{Reference baselines: horizontal RMSE against the recorded GNSS track, summarized over trajectories, and the median vertical RMSE. \(n\) is the number of trajectories on which the run completed. Errors of 10~km or more are given in kilometres.} +\label{tab:benchmark} +\small +\setlength{\tabcolsep}{4pt} +\input{tables/benchmark.tex} +\end{table} + +With full GNSS, the EKF and UKF follow the recorded track to a median horizontal RMSE of \numEkfFullMedian{} and \numUkfFullMedian~m. On every trajectory except \texttt{2025-06-14\_21-17-02} the RMSE is at most \numEkfFullMaxOthers~m, while on that trajectory it is \numEkfFullBad~m (EKF) and \numUkfFullBad~m (UKF). This agreement mainly shows that the replay and the column conventions are consistent; it is not a measure of absolute accuracy (\Cref{sec:limitations}). With degraded GNSS, the median grows to \numEkfDegradedMedian~m (EKF) and \numUkfDegradedMedian~m (UKF). That is the regime in which an alternative aiding source has to prove itself, and the baseline that such a source should be compared against. The RBPF configuration that was used tracks well with full GNSS (median \numRbpfFullMedian~m), but it diverges in the degraded scenario: its median RMSE is \numRbpfDegradedMedian{} on the \numRbpfDegradedN{} trajectories that completed, and \numRbpfDegradedMissing{} did not complete. It is reported as a configuration that fails, not as a usable baseline. The scenario files and the per-trajectory results are included in the release (\Cref{sec:layout}). diff --git a/papers/mems_nav_data/sections/specifications.tex b/papers/mems_nav_data/sections/specifications.tex new file mode 100644 index 00000000..ec22d589 --- /dev/null +++ b/papers/mems_nav_data/sections/specifications.tex @@ -0,0 +1,21 @@ +\section*{Specifications table} +\label{sec:specifications} + +\begin{longtable}{@{}>{\raggedright\arraybackslash}p{0.25\linewidth}>{\raggedright\arraybackslash}p{0.70\linewidth}@{}} +\toprule +Subject & Engineering \todo{choose from the Data in Brief subject list} \\ +\midrule +Specific subject area & Inertial and satellite navigation with consumer-grade MEMS sensors; sensor fusion and state estimation under degraded or denied GNSS; geophysical (gravity and magnetic) map-aided navigation. \\ +\midrule +Type of data & Time series in CSV tables (raw and processed); gridded map tiles in NetCDF; JSON segmentation manifest; TOML scenario configurations; tables and figures. \\ +\midrule +Data collection & Smartphones running the Sensor Logger application \citep{sensorlogger} recorded the accelerometer, gyroscope, magnetometer, barometer, the operating system's fused gravity and attitude estimates, and GNSS fixes during road drives. The \numDevices{} phone models used were Google Pixel 6a, Pixel 9 Pro and Pixel 9 Pro XL; Samsung SM-S921U and SM-A146U; and Apple iPhone 12 mini and iPhone 13 mini. The phones were \todo{describe placement and mounting in the vehicle, and the vehicles used}. Recordings were resampled to 10~Hz, split at inertial dropouts longer than 5~s, and accompanied by map tiles from the Generic Mapping Tools remote datasets \citep{wessel2019gmt}, with the open-source analysis package distributed with strapdown-rs \citep{strapdown-rs}. \\ +\midrule +Data source location & Public roads in the north-eastern United States, within latitudes \numLatMin--\numLatMax\,\textdegree{}N and longitudes \numLonMax--\numLonMin\,\textdegree{}W. Data were processed at Temple University, Philadelphia, Pennsylvania, USA. \\ +\midrule +Data accessibility & Repository name: Zenodo \newline Data identification number: \todo{new Zenodo DOI} \newline Direct URL to data: \todo{https://doi.org/new Zenodo DOI} \newline Instructions for accessing these data: open access, no registration. The processing and replay software is available at \url{https://github.com/jbrodovsky/strapdown-rs}. \\ +\midrule +Related research article & J.~Brodovsky, P.~Dames, Navigation in GNSS-denied environments using MEMS-grade sensors and geophysical anomalies: a UKF approach, in: Proceedings of the 2026 International Technical Meeting of the Institute of Navigation, Anaheim, California, 2026, pp.~155--164. \url{https://doi.org/10.33012/2026.20508} \\ +\bottomrule +\end{longtable} +\addtocounter{table}{-1} diff --git a/papers/mems_nav_data/sections/statements.tex b/papers/mems_nav_data/sections/statements.tex new file mode 100644 index 00000000..e24f23f6 --- /dev/null +++ b/papers/mems_nav_data/sections/statements.tex @@ -0,0 +1,15 @@ +\section*{Ethics statement} + +The data were recorded by the authors and by volunteers driving on public roads. No human-subject experiment was performed and no data on third parties were collected. The recordings contain no audio, images or personal identifiers beyond the location traces themselves and an application-generated device identifier in \texttt{Metadata.csv}. \todo{confirm the volunteers' written consent to publication; confirm whether Temple University's IRB determined this not to be human-subjects research; decide whether to trim the start and end of each trace near private residences and whether to remove or replace the \texttt{device id} field before release.} The authors have read and follow the ethical requirements for publication in Data in Brief and confirm that the current work does not involve human subjects, animal experiments, or any data collected from social media platforms. + +\section*{CRediT authorship contribution statement} + +\textbf{James Brodovsky:} Conceptualization, Methodology, Software, Investigation, Data curation, Formal analysis, Visualization, Writing -- original draft. \textbf{Philip Dames:} Supervision, Writing -- review \& editing. \todo{confirm roles, including any funding acquisition.} + +\section*{Acknowledgements} + +The authors thank Beth Brodovsky, Jeremy Brodovsky, Monica Brodovsky, Bill Siegl and Alkesh Kumar Srivastava for their help in recording the drives. \todo{funding statement, or ``This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.''} + +\section*{Declaration of competing interests} + +The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. \todo{confirm.} diff --git a/papers/mems_nav_data/sections/value.tex b/papers/mems_nav_data/sections/value.tex new file mode 100644 index 00000000..f417dfac --- /dev/null +++ b/papers/mems_nav_data/sections/value.tex @@ -0,0 +1,10 @@ +\section*{Value of the data} +\label{sec:value} + +\begin{itemize} +\item \textbf{Duration and distance at consumer grade.} The \numTrajectories{} trajectories cover \numTotalHours~h and \numTotalKm~km of driving, up to \numMaxHours~h and \numMaxKm~km in one trajectory. Inertial error over GNSS outages of minutes to hours can therefore be studied on consumer MEMS hardware, rather than inferred from the seconds-long sequences of most robotics datasets. +\item \textbf{Several devices and both mobile platforms.} Seven phone models from three manufacturers, on Android and iOS, were recorded with the same application and are processed into one column layout. Methods can be compared across inertial sensors, sampling rates and receivers, and their sensitivity to the device can be measured. +\item \textbf{Raw streams kept beside the processed files.} The raw recordings keep each sensor at its delivered rate (about 100~Hz for the inertial sensors on most devices), together with the uncalibrated accelerometer, gyroscope and magnetometer streams where the phone provided them. Users can therefore choose their own resampling, synchronization and calibration instead of inheriting ours. +\item \textbf{Ready for controlled GNSS degradation.} Every trajectory runs unmodified in the open-source simulator strapdown-rs \citep{strapdown-rs}. The simulator can withhold GNSS fixes on a schedule and corrupt them with correlated noise, slow drift or step offsets, all from a seeded configuration file. One recording can therefore be replayed under many repeatable outage and spoofing scenarios, and the baselines reported here give a starting point for comparing new methods. +\item \textbf{Documented sensor caveats for map-based aiding.} Cropped relief, gravity-anomaly and magnetic-anomaly grids are supplied for every trajectory. We also document that the phones' gravity vector carries no gravity-anomaly information and that their magnetometers are dominated by the vehicle's field. This saves geophysical and magnetic navigation studies from basing an aiding experiment on channels that cannot support it. +\end{itemize} diff --git a/papers/mems_nav_data/tables/benchmark.tex b/papers/mems_nav_data/tables/benchmark.tex new file mode 100644 index 00000000..46986c59 --- /dev/null +++ b/papers/mems_nav_data/tables/benchmark.tex @@ -0,0 +1,14 @@ +\begin{tabular}{llrrrrr} +\toprule +Filter & GNSS & \(n\) & Median (m) & Mean (m) & Max (m) & Vert.\ median (m) \\ +\midrule +EKF & Full & 27 & 4.1 & 24.0 & 539.2 & 1.6 \\ + & Degraded & 27 & 440.4 & 611.4 & 2{,}436.1 & 23.4 \\ +\midrule +UKF & Full & 27 & 4.0 & 24.0 & 542.8 & 1.6 \\ + & Degraded & 27 & 430.4 & 577.1 & 3{,}115.4 & 24.0 \\ +\midrule +RBPF & Full & 27 & 1.9 & 181.7 & 3{,}628.5 & 1.6 \\ + & Degraded & 26 & 817.7~km & 941.9~km & 2{,}704.3~km & 445.7 \\ +\bottomrule +\end{tabular} diff --git a/papers/mems_nav_data/tables/channels.tex b/papers/mems_nav_data/tables/channels.tex new file mode 100644 index 00000000..2ad201eb --- /dev/null +++ b/papers/mems_nav_data/tables/channels.tex @@ -0,0 +1,13 @@ +\begin{tabular}{llllrrrrr} +\toprule +Channel & Raw file & Columns & Unit & \rotatebox{90}{Pixel 6a} & \rotatebox{90}{Pixel 9 Pro / Pro XL} & \rotatebox{90}{Samsung SM-S921U} & \rotatebox{90}{Samsung SM-A146U} & \rotatebox{90}{iPhone 12/13 mini} \\ +\midrule +Specific force & \texttt{TotalAcceleration}\textsuperscript{a} & \texttt{acc\_*} & m\,s\(^{-2}\) & 56 & 100 & 60 & 100 & 101 \\ +Angular rate & \texttt{Gyroscope} & \texttt{gyro\_*} & rad\,s\(^{-1}\) & 56 & 100 & 60 & 100 & 101 \\ +Magnetic field & \texttt{Magnetometer} & \texttt{mag\_*} & \(\mu\)T & 100 & 100 & 100 & 100 & 101 \\ +Gravity (fused) & \texttt{Gravity} & \texttt{grav\_*} & m\,s\(^{-2}\) & 56 & 100 & 100 & 100 & 101 \\ +Attitude (fused) & \texttt{Orientation} & \texttt{q*}, \texttt{roll}, \ldots & --, rad & 56 & 100 & 100 & 100 & 101 \\ +Pressure & \texttt{Barometer} & \texttt{pressure}, \ldots & hPa, m & 50 & 40 & 25 & 10 & 1 \\ +GNSS fix & \texttt{LocationGps}\textsuperscript{b} & \texttt{latitude}, \ldots & see text & 1 & 1 & 1 & 1 & 1 \\ +\bottomrule +\end{tabular} diff --git a/papers/mems_nav_data/tables/devices.tex b/papers/mems_nav_data/tables/devices.tex new file mode 100644 index 00000000..c9b5e762 --- /dev/null +++ b/papers/mems_nav_data/tables/devices.tex @@ -0,0 +1,15 @@ +\begin{tabular}{llrrrrl} +\toprule +Device (as logged) & OS & Rec. & Traj. & Hours & km & GNSS file \\ +\midrule +Pixel 6a & Android & 5 & 5 & 9.4 & 593 & \texttt{LocationGps} \\ +SM-S921U & Android & 2 & 2 & 3.0 & 228 & \texttt{Location} \\ +Pixel 9 Pro & Android & 12 & 13 & 26.9 & 2{,}159 & \texttt{LocationGps} \\ +SM-A146U & Android & 2 & 1 & 0.2 & 13 & \texttt{Location} \\ +Pixel 9 Pro XL & Android & 2 & 2 & 3.7 & 294 & \texttt{LocationGps} \\ +iPhone 12 mini & iOS & 5 & 3 & 10.3 & 956 & \texttt{Location} \\ +iPhone 13 mini & iOS & 1 & 1 & 1.8 & 96 & \texttt{Location} \\ +\midrule +Total & & 29 & 27 & 55.3 & 4{,}338 & \\ +\bottomrule +\end{tabular} diff --git a/papers/mems_nav_data/tables/numbers.tex b/papers/mems_nav_data/tables/numbers.tex new file mode 100644 index 00000000..70c11d66 --- /dev/null +++ b/papers/mems_nav_data/tables/numbers.tex @@ -0,0 +1,100 @@ +% Generated by scripts/build.py -- do not edit. +\newcommand{\numAltAndroidMaxOffset}{6} +\newcommand{\numAltIosCells}{1{,}837} +\newcommand{\numAltIosHigh}{0} +\newcommand{\numAltIosLow}{-112} +\newcommand{\numAltIosMedian}{-46} +\newcommand{\numAltMax}{687} +\newcommand{\numAltMin}{-49} +\newcommand{\numAndroidBaroFraction}{100} +\newcommand{\numBadFixRate}{0.34} +\newcommand{\numBadFixes}{197} +\newcommand{\numBadHacc}{12.2} +\newcommand{\numBadHaccMax}{1{,}100} +\newcommand{\numBadMaxGap}{36.6} +\newcommand{\numBadRawFixes}{200} +\newcommand{\numBadSentinels}{9} +\newcommand{\numBadSpan}{586} +\newcommand{\numDeviceIds}{8} +\newcommand{\numDevices}{7} +\newcommand{\numDroppedSegments}{2} +\newcommand{\numEkfDegradedMedian}{440.4} +\newcommand{\numEkfDegradedN}{27} +\newcommand{\numEkfDegradedVMedian}{23.4} +\newcommand{\numEkfFullBad}{539} +\newcommand{\numEkfFullMaxOthers}{9.4} +\newcommand{\numEkfFullMedian}{4.1} +\newcommand{\numEkfFullN}{27} +\newcommand{\numEkfFullVMedian}{1.6} +\newcommand{\numExcludedRecordings}{4} +\newcommand{\numFixes}{197{,}522} +\newcommand{\numGravAfourteen}{9.806632} +\newcommand{\numGravAfourteenMedianDeficit}{73} +\newcommand{\numGravAfourteenPfiveDeficit}{22} +\newcommand{\numGravAfourteenPinned}{0.0} +\newcommand{\numGravAfourteenPninetyfiveDeficit}{156} +\newcommand{\numGravPixel}{9.810004} +\newcommand{\numGravRawPinnedMin}{100.0} +\newcommand{\numGravRawPinnedRecordings}{24} +\newcommand{\numGravSamsungApple}{9.806652} +\newcommand{\numGravTenHzPinnedMedian}{85} +\newcommand{\numHaccMax}{12.2} +\newcommand{\numHaccMin}{1.5} +\newcommand{\numHardIronCount}{20} +\newcommand{\numHardIronMax}{325} +\newcommand{\numHardIronMin}{67} +\newcommand{\numIosBaroFraction}{9} +\newcommand{\numLatMax}{42.07} +\newcommand{\numLatMin}{38.87} +\newcommand{\numLonMax}{72.11} +\newcommand{\numLonMin}{80.11} +\newcommand{\numMagIntensityMax}{240} +\newcommand{\numMagIntensityMin}{18} +\newcommand{\numMaxHours}{4.95} +\newcommand{\numMaxKm}{497.2} +\newcommand{\numMedianFixRate}{1.00} +\newcommand{\numMedianHacc}{2.5} +\newcommand{\numMedianHours}{1.74} +\newcommand{\numMedianKm}{141.8} +\newcommand{\numMedianSacc}{0.20} +\newcommand{\numMedianSpeed}{88} +\newcommand{\numMedianVacc}{2.0} +\newcommand{\numMinHours}{0.11} +\newcommand{\numMinKm}{1.1} +\newcommand{\numNoBaroHours}{8.8} +\newcommand{\numNoBaroRecordings}{2} +\newcommand{\numRawFirst}{2023-08} +\newcommand{\numRawGB}{22.2} +\newcommand{\numRawHours}{66.5} +\newcommand{\numRawLast}{2025-11} +\newcommand{\numRawNonEmpty}{28} +\newcommand{\numRawRecordings}{29} +\newcommand{\numRawRowsMillion}{219} +\newcommand{\numRbpfDegradedMedian}{817.7~km} +\newcommand{\numRbpfDegradedMissing}{2025-07-08\_14-12-53} +\newcommand{\numRbpfDegradedN}{26} +\newcommand{\numRbpfDegradedVMedian}{445.7} +\newcommand{\numRbpfFullMedian}{1.9} +\newcommand{\numRbpfFullN}{27} +\newcommand{\numRbpfFullVMedian}{1.6} +\newcommand{\numRows}{1{,}990{,}998} +\newcommand{\numSentinelTotal}{14} +\newcommand{\numSentinelTrajectories}{2} +\newcommand{\numSnrGravity}{0.13} +\newcommand{\numSnrGravityBest}{0.38} +\newcommand{\numSnrMagnetic}{0.01} +\newcommand{\numSnrMagneticBest}{0.04} +\newcommand{\numSplitRecordings}{1} +\newcommand{\numTotalHours}{55.3} +\newcommand{\numTotalKm}{4{,}338} +\newcommand{\numTrajectories}{27} +\newcommand{\numUkfDegradedMedian}{430.4} +\newcommand{\numUkfDegradedN}{27} +\newcommand{\numUkfDegradedVMedian}{24.0} +\newcommand{\numUkfFullBad}{543} +\newcommand{\numUkfFullMaxOthers}{9.3} +\newcommand{\numUkfFullMedian}{4.0} +\newcommand{\numUkfFullN}{27} +\newcommand{\numUkfFullVMedian}{1.6} +\newcommand{\numUsedRecordings}{25} +\newcommand{\numUtcNamed}{29} diff --git a/papers/mems_nav_data/tables/trajectories.tex b/papers/mems_nav_data/tables/trajectories.tex new file mode 100644 index 00000000..09f9b879 --- /dev/null +++ b/papers/mems_nav_data/tables/trajectories.tex @@ -0,0 +1,36 @@ +\begin{tabular}{llrrrrrrrr} +\toprule +Trajectory & Device & h & km & \makecell{Speed\\(km/h)} & Fixes & \makecell{Fix\\rate (Hz)} & \makecell{\(\sigma_h\)\\(m)} & \makecell{\(\sigma_v\)\\(m)} & \makecell{\(\sigma_s\)\\(m/s)} \\ +\midrule +2023-08-04\_21-47-58 & Pixel 6a & 2.45 & 158.3 & 87 & 8{,}034 & 0.91 & 2.0 & 2.5 & 0.18 \\ +2023-08-06\_14-48-05 & Pixel 6a & 2.48 & 169.1 & 77 & 8{,}920 & 1.00 & 2.0 & 2.4 & 0.17 \\ +2023-08-09\_12-47-42 & Pixel 6a & 1.45 & 32.1 & 3 & 5{,}174 & 0.99 & 2.6 & 3.1 & 0.23 \\ +2023-08-09\_16-37-41 & Pixel 6a & 0.72 & 41.0 & 63 & 2{,}579 & 1.00 & 2.2 & 2.7 & 0.20 \\ +2024-06-20\_16-55-50 & Pixel 6a & 2.34 & 192.3 & 99 & 8{,}391 & 1.00 & 7.8 & 3.0 & 0.23 \\ +2025-03-01\_15-04-26 & SM-S921U & 1.51 & 114.2 & 84 & 5{,}457 & 1.00 & 3.8 & 1.3 & 0.08 \\ +2025-03-01\_16-46-39 & SM-S921U & 1.49 & 113.6 & 83 & 5{,}386 & 1.00 & 3.8 & 1.3 & 0.08 \\ +2025-06-11\_20-34-24\_A & Pixel 9 Pro & 0.11 & 2.1 & 16 & 411 & 1.00 & 6.6 & 3.0 & 0.46 \\ +2025-06-14\_21-17-02 & SM-A146U & 0.16 & 12.7 & 2 & 197 & 0.34 & 12.2 & 0.7 & 0.39 \\ +2025-06-18\_15-09-25 & Pixel 9 Pro XL & 1.48 & 148.9 & 111 & 5{,}248 & 0.98 & 8.2 & 3.0 & 0.38 \\ +2025-06-18\_16-52-32 & Pixel 9 Pro XL & 2.20 & 144.9 & 74 & 7{,}916 & 1.00 & 5.1 & 2.0 & 0.20 \\ +2025-06-27\_11-54-35 & iPhone 12 mini & 4.95 & 402.3 & 99 & 17{,}767 & 1.00 & 10.0 & 19.0 & 0.20 \\ +2025-07-04\_17-24-46 & Pixel 9 Pro & 1.74 & 137.4 & 94 & 6{,}227 & 0.99 & 6.6 & 2.0 & 0.25 \\ +2025-07-05\_20-59-22 & Pixel 9 Pro & 2.51 & 138.5 & 55 & 9{,}017 & 1.00 & 7.1 & 3.0 & 0.31 \\ +2025-07-08\_14-12-53 & iPhone 13 mini & 1.85 & 96.2 & 55 & 6{,}658 & 1.00 & 2.5 & 3.0 & 1.56 \\ +2025-07-11\_13-33-16 & Pixel 9 Pro & 1.66 & 136.2 & 98 & 5{,}961 & 1.00 & 1.5 & 1.0 & 0.12 \\ +2025-07-18\_23-13-43 & Pixel 9 Pro & 1.55 & 152.1 & 109 & 5{,}526 & 0.99 & 1.5 & 1.0 & 0.13 \\ +2025-07-31\_23-36-03 & Pixel 9 Pro & 3.74 & 304.6 & 88 & 13{,}450 & 1.00 & 1.5 & 1.0 & 0.13 \\ +2025-08-03\_18-15-59 & Pixel 9 Pro & 4.14 & 298.2 & 84 & 14{,}892 & 1.00 & 1.5 & 1.0 & 0.14 \\ +2025-09-26\_19-03-38 & iPhone 12 mini & 4.59 & 497.2 & 123 & 16{,}505 & 1.00 & 5.0 & 9.5 & 0.20 \\ +2025-09-27\_12-54-35 & Pixel 9 Pro & 2.26 & 213.0 & 109 & 8{,}136 & 1.00 & 2.0 & 1.0 & 0.14 \\ +2025-09-27\_18-10-16 & iPhone 12 mini & 0.76 & 56.3 & 89 & 2{,}731 & 1.00 & 10.0 & 19.0 & 0.20 \\ +2025-09-28\_20-23-16 & Pixel 9 Pro & 3.33 & 286.3 & 99 & 11{,}996 & 1.00 & 2.0 & 1.0 & 0.13 \\ +2025-11-09\_17-34-01\_A & Pixel 9 Pro & 1.07 & 108.0 & 106 & 3{,}854 & 1.00 & 1.5 & 1.0 & 0.12 \\ +2025-11-09\_17-34-01\_B & Pixel 9 Pro & 0.16 & 1.1 & 0 & 559 & 1.00 & 2.0 & 1.0 & 0.01 \\ +2025-11-09\_17-34-01\_C & Pixel 9 Pro & 1.40 & 141.8 & 115 & 5{,}020 & 1.00 & 2.0 & 1.0 & 0.31 \\ +2025-11-16\_16-08-14 & Pixel 9 Pro & 3.23 & 239.1 & 90 & 11{,}510 & 0.99 & 2.0 & 1.0 & 0.14 \\ +\midrule +Total & & 55.3 & 4{,}338 & & 197{,}522 & & & & \\ +Median & & 1.74 & 141.8 & 88 & 6{,}227 & 1.00 & 2.5 & 2.0 & 0.20 \\ +\bottomrule +\end{tabular}