This commit is contained in:
nuknal
2024-05-21 16:16:54 +08:00
parent dd23760dbb
commit 84c8b5d23c
15 changed files with 989 additions and 513 deletions

View File

@@ -10,6 +10,7 @@ import (
var (
dataId string
batch bool
output string
)
var extractCmd = &cobra.Command{
@@ -31,7 +32,7 @@ var extractCmd = &cobra.Command{
} else {
p := &extract.Params{
InputData: fmt.Sprintf("demo/data/%s.dat", dataId),
OutputPath: fmt.Sprintf("demo/output/%s", dataId),
OutputPath: fmt.Sprintf("%s/%s", output, dataId),
TempPath: fmt.Sprintf("demo/temp/%s", dataId),
DataId: dataId,
Satellite: "SJY01",
@@ -51,16 +52,18 @@ func init() {
extractCmd.Flags().StringVarP(&dataId, "data-id", "d", "051622", "051622")
extractCmd.Flags().BoolVarP(&batch, "batch", "b", false, "true | false")
extractCmd.Flags().StringVarP(&output, "out", "o", "demo/output", "demo/output")
}
func params() []*extract.Params {
var params []*extract.Params
datas := []string{"051513", "051622",
"051712", "051721", "051821", "051823", "051921", "051922", "Q051723"}
datas := []string{"051622", "051712", "051721",
"051813", "051821", "051823",
"051921", "051922", "052022"}
for _, d := range datas {
params = append(params, &extract.Params{
InputData: fmt.Sprintf("demo/data/%s.dat", d),
OutputPath: fmt.Sprintf("demo/output/%s", d),
OutputPath: fmt.Sprintf("%s/%s", output, d),
TempPath: fmt.Sprintf("demo/temp/%s", d),
DataId: d,
Satellite: "SJY01",