# FeatureExtraction_DataClean_BreakDataIntoLaps
<!--
The following template is based on:
Best-README-Template
Search for this, and you will find!
>
<!-- PROJECT LOGO -->
<br />
<p align="center">
<!-- <a href="https://github.com/ivsg-psu/FeatureExtraction_Association_PointToPointAssociation">
<img src="images/logo.png" alt="Logo" width="80" height="80">
</a> -->
<h2 align="center"> FeatureExtraction_DataClean_BreakDataIntoLaps
</h2>
<pre align="center">
<img src=".\Images\RaceTrack.jpg" alt="main laps picture" width="960" height="540">
<!--figcaption>Fig.1 - The typical progression of map generation.</figcaption -->
<!--font size="-2">Photo by <a href="https://unsplash.com/ko/@samuelchenard?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Samuel Chenard</a> on <a href="https://unsplash.com/photos/Bdc8uzY9EPw?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></font -->
</pre>
<p align="center">
The purpose of this code is to break data into "laps", e.g. segments of data that are defined by a clear start condition and end condition. The code finds when a given path meets the "start" condition, then meets the "end" condition, and returns every portion of the path that is inside both conditions. Advanced features of the code include the ability to return the row indices defining each lap's data, as well as the path portions prior and after the lap area in case the "run in" or "run out" areas are needed.
<br />
<!-- a href="https://github.com/ivsg-psu/FeatureExtraction_Association_PointToPointAssociation"><strong>Explore the docs »</strong></a>
<br />
<br />
<a href="https://github.com/ivsg-psu/FeatureExtraction_Association_PointToPointAssociation/tree/main/Documents">View Demo</a>
<a href="https://github.com/ivsg-psu/FeatureExtraction_Association_PointToPointAssociation/issues">Report Bug</a>
<a href="https://github.com/ivsg-psu/FeatureExtraction_Association_PointToPointAssociation/issues">Request Feature</a -->
</p>
</p>
***
<!-- TABLE OF CONTENTS -->
<details open="open">
<summary><h2 style="display: inline-block">Table of Contents</h2></summary>
<ol>
<li>
<a href="#about-the-project">About the Project</a>
</li>
<li>
<a href="#getting-started">Getting Started</a>
<ul>
<li><a href="#installation">Installation</a></li>
</ul>
</li>
<li><a href="structure">Repo Structure</a>
<ul>
<li><a href="#directories">Top-Level Directories</li>
<li><a href="#dependencies">Dependencies</li>
</ul>
</li>
<li><a href="#functions">Functions</li>
<ul>
<li><a href="#basic-support-functions">Basic Support Functions</li>
<ul>
<li><a href="#fcn_laps_plotlapsxy">fcn_Laps_plotLapsXY - Plotting utility for lap outputs</li>
<li><a href="#fcn_laps_fillsamplelaps">fcn_Laps_fillSampleLaps - Creates test datasets</li>
<li><a href="#fcn_laps_plotzonedefinition">fcn_Laps_plotZoneDefinition - Plots zone definitions</li>
<li><a href="#fcn_laps_fillsamplelaps">fcn_Laps_fillSampleLaps - Creates test datasets</li>
</ul>
<li><a href="#core-functions">Core Functions</li>
<ul>
<li><a href="#fcn_laps_breakdataintolaps">fcn_Laps_breakDataIntoLaps - Core function of the repo, breaks data into laps</li>
<li><a href="#fcn_laps_checkzonetype">fcn_Laps_checkZoneType - Checks inputs to determine if zone is a point or line segment type</li>
<li><a href="#fcn_laps_breakdataintolapindices">fcn_Laps_breakDataIntoLapIndices - A more advanced version of fcn_Laps_breakDataIntoLaps, where the outputs are the indices that apply to each lap.</li>
<li><a href="#fcn_laps_findsegmentzonestartstop">fcn_Laps_findSegmentZoneStartStop - Supporting function that finds the portions of a path that meet a segment zone criteria</li>
<li><a href="#fcn_laps_findpointzonestartstopandminimum">fcn_Laps_findPointZoneStartStopAndMinimum - Supporting function that finds the portions of a path that meet a point zone criteria</li>
</ul>
</ul>
<li><a href="#usage">Usage</a></li>
<ul>
<li><a href="#general-usage">General Usage</li>
<li><a href="#examples">Examples</li>
<li><a href="#definition-of-endpoints">Definition of Endpoints</li>
</ul>
<li><a href="#license">License</a></li>
<li><a href="#contact">Contact</a></li>
</ol>
</details>
***
<!-- ABOUT THE PROJECT -->
## About The Project
<!--[![Product Name Screen Shot][product-screenshot]](https://example.com)-->
The most common location of our testing is the Larson Test Track, and we regularly use “laps around the track” as replicates, hence the name of the library. And when not on the test track and on public roads, data often needs to be segmented from one keypoint to another. For example, it is a common task to seek a subset of path data that resides only from one intersection to the next. While one could segment this data during data collection by simply stopping the vehicle recordings at each segment, it is impractical and dangerous to stop data collection at each and every possible intersection or feature point. Rather, vehicle or robot data is often collected by repeated driving of an area over/over without stopping. So, the final data set may contain many replicates of the area of interest.
This "Laps" code assists in breaking recorded path data into paths by defining specific start and end locations, for example from intersection "A" to stop sign "B". Specifically, the purpose of this code is to break data into "laps", e.g. segments of data that are defined by a clear start condition and end condition. The code finds when a given path meets the "start" condition, then meets the "end" condition, and returns every portion of the path that is inside both conditions. There are many advanced features as well including the ability to define excursion points, the number of points that must be within a condition for it to activate, and the ability to extract the portions of the paths before and after each lap, in addition to the data for each lap.
* Inputs:
* either a "traversals" type, as explained in the Path library, or a path of XY points in N x 2 format
* the start, end, and optional excursions can be entered as either a line segment or a point and radius.
* Outputs
* Separate arrays of XY points, or of indices for the lap, with one array for each lap
* The function also can return the points that were not used for laps, e.g. the points before the first start and after the last end
<a href="#featureextraction_dataclean_breakdataintolaps">Back to top</a>
***
<!-- GETTING STARTED -->
## Getting Started
To get a local copy up and running follow these simple steps.
### Installation
1. Make sure to run MATLAB 2020b or higher. Why? The "digitspattern" command used in the DebugTools utilities was released late 2020 and this is used heavily in the Debug routines. If debugging is shut off, then earlier MATLAB versions will likely work, and this has been tested back to 2018 releases.
2. Clone the repo
```sh
git clone https://github.com/ivsg-psu/FeatureExtraction_DataClean_BreakDataIntoLaps
```
3. Run the main code in the root of the folder (script_demo_Laps.m), this will download the required utilities for this code, unzip the zip files into a Utilities folder (.\Utilities), and update the MATLAB path to include the Utility locations. This install process will only occur the first time. Note: to force the install to occur again, delete the Utilities directory and clear all global variables in MATLAB (type: "clear global *").
4. Confirm it works! Run script_demo_Laps. If the code works, the script should run without errors. This script produces numerous example images such as those in this README file.
<a href="#featureextraction_dataclean_breakdataintolaps"
没有合适的资源?快使用搜索试试~ 我知道了~
利用B+树实现Allan方差信号方差最小化附matlab代码.zip
共46个文件
eps:16个
svg:10个
m:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 7 浏览量
2024-01-23
10:02:46
上传
评论
收藏 19.87MB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a,内含运行结果,不会运行可私信 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
利用B+树实现Allan方差信号方差最小化附matlab代码.zip (46个子文件)
利用B+树实现Allan方差信号方差最小化附matlab代码
FeatureExtraction_AllanVariance_BplusTreeDatabaseImplementation-main
Images
bpTree_WNpRWAVAR.eps 148KB
BTree.eps 49KB
BplusTreeVSfavar.eps 282KB
bpTree_WNpRW.eps 94KB
BplusTree_insert1.svg 6KB
bpTree_RandomWalkAVAR.fig 49KB
Perfectly_Balanced_BinaryTree.svg 6KB
BplusTreeVSfavar.svg 292KB
Perfectly_Balanced_BinaryTree.eps 43KB
BplusTree_insert1.eps 45KB
bpTree_RandomWalk.fig 5.16MB
Unbalanced_BinaryTree.svg 4KB
AVAR_BplusTree.eps 110KB
BplusTree_insert3.svg 9KB
bpTree_WhiteNoise.eps 145KB
BplusTree.eps 51KB
BplusTree_insert2.svg 9KB
bpTree_WhiteNoiseAVAR.eps 153KB
bpTree_WhiteNoiseAVAR.fig 50KB
Balanced_BinaryTree.eps 39KB
BplusTree_insert2.eps 48KB
bpTree_RandomWalk.eps 165KB
AVAR_BplusTree.svg 71KB
bpTree_WhiteNoise.fig 5.3MB
Balanced_BinaryTree.svg 3KB
BplusTree.svg 12KB
bpTree_WNpRWAVAR.fig 49KB
BplusTree_insert3.eps 48KB
BTree.svg 11KB
bpTree_RandomWalkAVAR.eps 153KB
bpTree_WNpRW.fig 5.25MB
Unbalanced_BinaryTree.eps 41KB
README.md 26KB
Functions
fcn_AVAR_favar.m 6KB
fcn_AVAR_checkInputsToFunctions.m 13KB
bpTree_RWAVAR.csv 347B
script_synthesizeNoise2TestBptree.m 3KB
test_data.csv 16.32MB
fcn_AVAR_generateRandomWalk.m 5KB
fcn_AVAR_avarEmpiricalConfidenceCurves.m 7KB
bpTree_WNpRWAVAR.csv 342B
bpTree_WNAVAR.csv 352B
fcn_AVAR_generateWhiteNoise.m 5KB
script_compareBtreeWithFavar.m 7KB
BplusTree.py 16KB
fcn_AVAR_empiricalDOFofAVARofNoise.m 5KB
共 46 条
- 1
资源评论
Matlab科研辅导帮
- 粉丝: 2w+
- 资源: 7648
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功