|
@@ -8,9 +8,9 @@ public class CSVMassageliege
|
|
{
|
|
{
|
|
public static void main(String[] args) throws Exception
|
|
public static void main(String[] args) throws Exception
|
|
{
|
|
{
|
|
- BufferedReader r = new BufferedReader(new FileReader("D:\\loa\\000028\\messungen2\\massagekandidat3.csv"));
|
|
|
|
|
|
+ BufferedReader r = new BufferedReader(new FileReader("D:\\loa\\000028\\004\\pico-tapes\\on_switchoff.csv"));
|
|
String line = r.readLine();
|
|
String line = r.readLine();
|
|
- RandomAccessFile f = new RandomAccessFile("D:\\loa\\000028\\messungen2\\massiert3b.raw","rw");
|
|
|
|
|
|
+ RandomAccessFile f = new RandomAccessFile("D:\\loa\\000028\\004\\pico-tapes\\on_switchoff.raw","rw");
|
|
line = r.readLine(); //LMAA header
|
|
line = r.readLine(); //LMAA header
|
|
line = r.readLine();
|
|
line = r.readLine();
|
|
line = r.readLine();
|
|
line = r.readLine();
|
|
@@ -23,13 +23,14 @@ public class CSVMassageliege
|
|
String sampleraw = linesplitted[linesplitted.length-1];
|
|
String sampleraw = linesplitted[linesplitted.length-1];
|
|
if(!sampleraw.equalsIgnoreCase("nan"))
|
|
if(!sampleraw.equalsIgnoreCase("nan"))
|
|
{
|
|
{
|
|
|
|
+ sampleraw = sampleraw.replace("∞","1000000.0");
|
|
double sample = Double.valueOf(sampleraw);
|
|
double sample = Double.valueOf(sampleraw);
|
|
- double sampleCrunch = (sample/5.0)*32768.0;
|
|
|
|
|
|
+ double sampleCrunch = (sample/1.0)*32768.0;
|
|
|
|
|
|
short intSample = (short)Math.max(-32768,(Math.min(32767,sampleCrunch)));
|
|
short intSample = (short)Math.max(-32768,(Math.min(32767,sampleCrunch)));
|
|
f.writeShort(Short.reverseBytes(intSample));
|
|
f.writeShort(Short.reverseBytes(intSample));
|
|
i++;
|
|
i++;
|
|
- if(i%1000==0)
|
|
|
|
|
|
+ if(i%100000==0)
|
|
{
|
|
{
|
|
System.out.println("i="+i);
|
|
System.out.println("i="+i);
|
|
}
|
|
}
|