34 lines
790 B
Go
34 lines
790 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/data/051513.dat",
|
|
OutputPath: "demo/output",
|
|
TempPath: "demo/temp",
|
|
DataId: "051513",
|
|
Satellite: "SJY01",
|
|
}
|
|
p := extract.NewExtractor(¶ms)
|
|
// p.ParseAuxPlatformWithHead("demo/ref/辅助数据.dat")
|
|
fmt.Println("Reference Time: 2000-01-01 12:00:00 UTC, seconds:", extract.Time2000UTCSec())
|
|
p.ParseAuxPlatform("demo/output/SJY01_051622_S96_PLAT.AUX")
|
|
p.ParseAuxEBox("demo/output/SJY01_051622_S96_EB.AUX")
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(parseCmd)
|
|
}
|