Skip to content

Commit

Permalink
2021-04-23
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgramTraveler committed Apr 23, 2021
1 parent 8d9c594 commit 15370ac
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -883,5 +883,6 @@
#### 对偏移量数据记录形式的修改

* 在最终文件的数据保存中,将之前记录的所有点改为记录一次测试的偏移量平均值
* 平均值保留两位小数

---
12 changes: 12 additions & 0 deletions information.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@ id,
1,,1,1,��ͳ����ģʽ,��ɫ,2.0,13:24:17:760,13:24:21:756,-1619155459404,-1619155461444,-3238310920848,5757,2428,1252,1487,0,1,1,2,0,0,0,0,0,0,0,0,0,7,
2,,1,2,��ͳ����ģʽ,��ɫ,4.0,13:24:17:760,13:24:21:756,-1619155500150,-1619155502424,-3238311002574,6182,2442,1782,1552,0,1,1,4,0,0,0,0,0,0,0,0,0,10,
3,,1,1,��ͳ����ģʽ,��ɫ,4.0,13:26:20:535,13:26:21:823,-1619155581091,-1619155581718,-3238311162809,1709,706,339,221,0,1,1,2,0,0,0,0,0,0,0,0,0,12,
4,,1,1,��ͳ����ģʽ,��ɫ,4.0,14:32:56:217,14:32:57:206,-1619159576496,-1619159577093,-3238319153589,1509,425,344,295,0,1,1,2,0,0,0,0,0,0,0,0,0,6,
5,,1,1,��ͳ����ģʽ,��ɫ,4.0,14:34:23:396,14:34:24:114,-1619159664161,-1619159664649,-3238319328810,2100,437,645,502,0,1,1,2,0,0,0,0,0,0,0,0,0,20,
6,,1,1,��ͳ����ģʽ,��ɫ,4.0,14:36:01:654,14:36:02:917,-1619159761936,-1619159762719,-3238319524655,3208,531,528,312,0,1,1,2,0,0,0,0,0,0,0,0,0,13,
7,,1,2,��ͳ����ģʽ,��ɫ,2.0,14:36:01:654,14:36:02:917,-1619159775465,-1619159777463,-3238319552928,5493,1723,1831,1534,0,1,1,4,0,0,0,0,0,0,0,0,0,11,
8,,1,1,��ͳ����ģʽ,��ɫ,4.0,14:37:14:895,14:37:19:611,-1619159837182,-1619159839516,-3238319676698,6922,2459,2022,1987,0,1,1,2,0,0,0,0,0,0,0,0,0,14,
9,,1,1,��ͳ����ģʽ,��ɫ,2.0,14:38:02:593,14:38:06:936,-1619159884424,-1619159886748,-3238319771172,6961,2147,1974,2446,0,1,1,2,0,0,0,0,0,0,0,0,0,15,
10,,1,1,��ͳ����ģʽ,��ɫ,4.0,14:38:42:418,14:38:48:89,-1619159925158,-1619159927870,-3238319853028,8411,2865,2570,2456,0,1,1,2,0,0,0,0,0,0,0,0,0,java.text.DecimalFormat@674dc,
11,,1,1,��ͳ����ģʽ,��ɫ,4.0,14:39:44:285,14:39:50:385,-1619159987196,-1619159990089,-3238319977285,8390,3066,2702,1974,0,1,1,2,0,0,0,0,0,0,0,0,0,20.47,
12,,1,2,��ͳ����ģʽ,��ɫ,3.0,14:39:44:285,14:39:50:385,-1619160015618,-1619160018199,-3238320033817,8490,3261,2427,2333,0,1,1,4,0,0,0,0,0,0,0,0,0,16.00,
13,,1,4,��ͳ����ģʽ,��ɫ,4.0,14:39:44:285,14:39:50:385,-1619160052317,-1619160054154,-3238320106471,5369,2087,1377,1303,0,1,1,8,0,0,0,0,0,0,0,0,0,13.17,
14,,1,1,��ͳ����ģʽ,��ɫ,3.0,14:42:15:430,14:42:19:87,-1619160136981,-1619160138645,-3238320275626,5632,2174,1146,1693,0,1,1,2,0,0,0,0,0,0,0,0,0,6.85,
15,,1,2,��ͳ����ģʽ,��ɫ,3.0,14:42:15:430,14:42:19:87,-1619160157324,-1619160159706,-3238320317030,5657,1505,1721,1380,0,1,1,4,0,0,0,0,0,0,0,0,0,2.04,
Binary file modified out/production/PenProject/PenData.class
Binary file not shown.
7 changes: 6 additions & 1 deletion src/PenData.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.*;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Timer;
Expand Down Expand Up @@ -330,11 +331,15 @@ public void SaveInformation() throws IOException {
aver += shift.get(i);
}
//System.out.println();
//格式控制,用来输出保留两位小数
DecimalFormat df = new DecimalFormat("#.00");
//System.out.println(df.format(((double)aver / (double)shift.size())));
//System.out.println(aver);
String SaveText = index + "," + saveText + aver / shift.size() + "," + "\n";
String SaveText = index + "," + saveText + (df.format(((double)aver / (double)shift.size()))) + "," + "\n";
csv.write(SaveText.getBytes("GBK"));
//System.out.println(shift.size());


csv.close();
}

Expand Down

0 comments on commit 15370ac

Please sign in to comment.