38 lines
930 B
Go
38 lines
930 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/sirupsen/logrus"
|
|
"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/data/051513.dat",
|
|
OutputPath: "demo/output",
|
|
TempPath: "demo/temp",
|
|
DataId: "051513",
|
|
Satellite: "SJY01",
|
|
}
|
|
e := extract.NewExtractor(¶ms)
|
|
// p.ParseAuxPlatformWithHead("demo/ref/辅助数据.dat")
|
|
_, _, _, err := e.ExtractAux("demo/output/051622/SJY01_PMS_20240516_101236_051622_096.AUX",
|
|
"demo/temp/1.xlsx")
|
|
|
|
if err != nil {
|
|
logrus.Error(err)
|
|
}
|
|
// p.ParseAuxEBox("demo/output/SJY01_PMS_20240516_101236_051622_096_EB.AUX")
|
|
// e.ParseAuxPlatform("demo/output/Q052100/SJY01_PMS_20240519_121433_Q052100_102.AUX")
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(parseCmd)
|
|
}
|