Files
sjy01-preprocessing/cmd/parse.go
2024-05-16 10:14:32 +08:00

32 lines
694 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
"starwiz.cn/sjy01/preprocessing/extract"
)
var parseCmd = &cobra.Command{
Use: "parse",
Short: "Parse the data",
Long: `Parse the data`,
Run: func(cmd *cobra.Command, args []string) {
params := extract.Params{
InputData: "demo/051513.dat",
OutputPath: "demo/output",
TempPath: "demo/temp",
DataId: "051513",
}
p := extract.NewExtractor(&params)
// p.ParseAuxPlatform("demo/output/051513_S46_AUX1.dat")
fmt.Println("Reference Time: 2000-01-01 12:00:00 UTC, seconds:", extract.Time2000UTCSec())
p.SeprateAuxAndImgData("demo/temp/051513_S46.dat")
},
}
func init() {
rootCmd.AddCommand(parseCmd)
}