{"id":16569023,"url":"https://github.com/cfrpg/nickelbirddataprocessor","last_synced_at":"2026-06-10T14:31:08.226Z","repository":{"id":82777480,"uuid":"291052019","full_name":"cfrpg/NickelBirdDataProcessor","owner":"cfrpg","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-18T13:15:20.000Z","size":1806,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T11:50:41.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfrpg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-28T13:20:42.000Z","updated_at":"2023-02-08T01:46:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0bb718f-ac53-4534-9dea-d40b5ba442ab","html_url":"https://github.com/cfrpg/NickelBirdDataProcessor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cfrpg/NickelBirdDataProcessor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfrpg%2FNickelBirdDataProcessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfrpg%2FNickelBirdDataProcessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfrpg%2FNickelBirdDataProcessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfrpg%2FNickelBirdDataProcessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfrpg","download_url":"https://codeload.github.com/cfrpg/NickelBirdDataProcessor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfrpg%2FNickelBirdDataProcessor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34157453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T21:12:13.051Z","updated_at":"2026-06-10T14:31:08.205Z","avatar_url":"https://github.com/cfrpg.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NickelBirdDataProcessor\n\n[NickelBird](https://github.com/cfrpg/NickelBird)系列实验数据采集系统数据处理脚本合集。\n\n由于某些函数的兼容性问题，请使用R2016b及以后的版本。\n\n## 使用方法和注意事项\n\n### 实验中\n\n- 设定好tag，如需校准和坐标变换，tag中必须包含单位为deg的迎角\n- tag设好就不要换顺序了\n- 首先采集一组不同迎角下的无风静态数据，单独保存用于校准，每个迎角保存一个文件\n- 正常进行实验数据采集操作\n- 记录的数据可以不一样，但批处理用到的数据必须每个文件里都有记录\n\n假设tag分别设定为 `模型`，`空速`，`迎角`，`油门`。\n\n假设试验中采集`Fx`，`Fy`，`Fz`，`Mx`，`My`，`Mz`，且都设置了滤波，但这些数据前后都有若干列辅助数据。\n\n假设数据保存在`\\WindTunnel`文件夹，校准数据位于`\\WindTunnel\\cali`子文件夹。\n\n### 批量处理\n\n#### 自动生成校准文件\n\n如果生成校准文件使用的数据位于数据文件夹的一个子文件夹中，如本例中校准数据位于`\\cali`文件夹，则可以使用`NBAuto`自动生成校准文件，参考[这里](#autocali)。\n\n#### 手动生成校准文件\n\n首先使用`NBProcessCaliFile(dirpath,cols,alpha)`生成校准文件。\n\n- `dirpath`指定数据所在的目录：`'\\WindTunnel\\cali'`\n- `cols`指定需要校准的列，通常只有纵向数据会受俯仰角变化影响，即：`{'Fx_LPF','Fz_LPF','My_LPF'}`\n- `alpha`指定迎角是第几个tag，从1开始数：`3`\n\n运行\n\n`NBProcessCaliFile('\\WindTunnel\\cali',{'Fx_LPF','Fz_LPF','My_LPF'},3)`\n\n得到校准文件`\\WindTunnel\\cali\\rescali.csv`\n\n#### 批处理实验数据文件\n\n使用`NBAuto(dirpath,cols,p[,alpha,transcol,califile,calicol])`自动处理一个文件夹中的数据\n\n- `dirpath`指定数据所在的目录，子目录会被忽略：`'\\WindTunnel'`\n- `cols`指定要处理的列：`{'Fx_LPF','Fy_LPF','Fz_LPF','Mx_LPF','My_LPF','Mz_LPF'}`\n- `p`指定是否是周期性信号，如果全都不是周期性信号则设置为`0`，有周期性信号则设置为`1`，脚本会试图识别出其中的非周期性信号\n\n如果不用坐标变换和校准就不要输后面的参数了，直接运行\n\n`NBAuto('\\WindTunnel',{'Fx_LPF','Fy_LPF','Fz_LPF','Mx_LPF','My_LPF','Mz_LPF'},1)`\n\n如果要坐标变换的话\n\n- `alpha`指定迎角是第几个tag，跟上面类似：`3`\n- `transcol`指定坐标变换的列在**结果**中是第几个，把每两个写一行构成n*2的矩阵，这里变换`Fx,Fz`和`Mx,Mz`：`[1,3;4,6]`\n\n如果不需要校准就不要输后面的参数了，直接运行\n\n`NBAuto('\\WindTunnel',{'Fx_LPF','Fy_LPF','Fz_LPF','Mx_LPF','My_LPF','Mz_LPF'},1,3,[1,3;4,6])`\n\n如果要手动指定校准文件进行校准的话\n\n- `califile`指定校准文件，用前一步生成的：`'\\WindTunnel\\cali\\rescali.csv'`\n\n直接运行\n\n`NBAuto('\\WindTunnel',{'Fx_LPF','Fy_LPF','Fz_LPF','Mx_LPF','My_LPF','Mz_LPF'},1,3,[1,3;4,6],'\\WindTunnel\\cali\\rescali.csv')`\n\n如果要自动生成校准文件的话\u003ca name=\"autocali\"\u003e\u003c/a\u003e\n\n- `califile`指定校准数据子目录名，前面加`[auto]`标记：`'[auto]cali'`\n- `calicol`指定要校准的列，与手动生成校准文件中的`cols`相同：`{'Fx_LPF','Fz_LPF','My_LPF'}`\n\n直接运行\n\n`NBAuto('\\WindTunnel',{'Fx_LPF','Fy_LPF','Fz_LPF','Mx_LPF','My_LPF','Mz_LPF'},1,3,[1,3;4,6],'[auto]cali',{'Fx_LPF','Fz_LPF','My_LPF'})`\n\n脚本会处理所有csv文件，但会跳过开头是`res`的文件，最终生成`res.csv`。\n\n### 处理单个文件\n\n使用`[header,data,freq,ps]=NBLoadFile(path,cols,p)`载入文件\n\n- `path`指定文件路径\n- `cols`指定需要处理的列，与批处理相同\n- `p`指定是否是周期性数据，与批处理相同\n- `header`返回被处理的列的表头\n- `data`返回每一列的平均值或周期平均值\n- `freq`返回文件中数据的频率，若为非周期性数据则返回0\n- `ps`返回每一列中的平均周期，每一行为一列的平均周期\n\n注意处理单个文件时不会自动进行坐标变换和校准，也不会画出曲线图，需要手动进行后续处理。\n\n## 高级功能\n\n### 列号和表头\n指定列时可以使用列号或表头，假设`Fx,Fy,Fz`分别是第`12,15,18`列，则传递`cols`参数时以下两种方式等价\n\n- 使用列号：`[12,15,18]`\n- 使用表头：`{'Fx','Fy','Fz'}`\n\n脚本会在处理每一个文件时分别将表头翻译成列号，对于表头固定但列号不固定的数据集推荐使用表头指定。\n\n### 触发器\n\n对于周期性数据，如果其中一列数据全为`0`，但在每个周期开始时有一个数据是`1`，则可以将这一列设定为触发器列。\n脚本将根据触发器列中`1`的位置划分数据的周期。\n\n假设触发器列为第`10`列，表头为`Trig`，可以使用以下方式指定触发器列：\n\n- 使用列号：负列号表示这一列是触发器列：`-10`\n- 使用表头：名称前加`*`表示这一列是触发器列：`'*Trig'`\n\n触发器列不会被处理，也不会输出在结果文件中，在使用坐标变换指定要变换的列号时要注意跳过触发器列。\n\n一个数据中只能指定一个触发器列，若指定了多个触发器列，这些数据都不会被处理，只有最后一个触发器标识生效。\n\n### 参考数据\n对于周期性数据，可以指定一列数据作为参考，其他列数据将根据参考数据划分出与参考数据相同的周期。\n\n假设触发器列为第`10`列，表头为`Ref`，可以使用以下方式指定参考数据列：\n\n- 使用列号：列号+10000表示这一列是参考数据列：`10010`\n- 使用表头：名称前加`#`表示这一列是参考数据列：`'#Ref'`\n\n这个功能暂时没有实装，请不要指定参考数据列。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfrpg%2Fnickelbirddataprocessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfrpg%2Fnickelbirddataprocessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfrpg%2Fnickelbirddataprocessor/lists"}