xml report
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -198,7 +199,28 @@ func (e *Extractor) SeprateAuxAndImgData(dataFile string, segmentIndex int) erro
|
||||
lw.ws[AUX].w.Write(platAux[i*512 : (i+1)*512])
|
||||
}
|
||||
|
||||
e.ExtractAux(lw.ws[AUX].name, lw.ws[AUX].name+".xlsx")
|
||||
_, _, aps, err := e.ExtractAux(lw.ws[AUX].name, lw.ws[AUX].name+".xlsx")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
e.mutex.Lock()
|
||||
defer e.mutex.Unlock()
|
||||
seg := Segment{
|
||||
Pan: lw.ws[PAN_RAW].name,
|
||||
Mss: lw.ws[MSS_RAW].name,
|
||||
Aux: lw.ws[AUX].name,
|
||||
Id: strings.Split(filepath.Base(lw.ws[AUX].name), ".")[0],
|
||||
StartTime: XMLTime{
|
||||
TimeZone: "UTC",
|
||||
Value: time.Unix(int64(aps[0].UTCTimeSec)+int64(ReferenceTime2000), int64(aps[0].Microsecond)*1000).UTC().Format(time.RFC3339),
|
||||
},
|
||||
EndTime: XMLTime{
|
||||
TimeZone: "UTC",
|
||||
Value: time.Unix(int64(aps[len(aps)-1].UTCTimeSec)+int64(ReferenceTime2000), int64(aps[len(aps)-1].Microsecond)*1000).UTC().Format(time.RFC3339),
|
||||
},
|
||||
}
|
||||
e.report.Segments = append(e.report.Segments, seg)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user