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",

View File

@@ -24,12 +24,14 @@ var parseCmd = &cobra.Command{
e := extract.NewExtractor(&params)
// p.ParseAuxPlatformWithHead("demo/ref/辅助数据.dat")
fmt.Println("Reference Time: 2000-01-01 12:00:00 UTC, seconds:", extract.Time2000UTCSec())
_, err := e.ParseAuxPlatform("demo/output/051622/SJY01_PMS_20240516_101236_051622_096.AUX")
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")
// e.ParseAuxPlatform("demo/output/Q052100/SJY01_PMS_20240519_121433_Q052100_102.AUX")
},
}