暂时使用星下点坐标作为图像左上角坐标
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package config
|
||||
|
||||
import "github.com/sirupsen/logrus"
|
||||
|
||||
type Config struct {
|
||||
CRConfig CoRegistrationConfig `yaml:"cr_config" mapstructure:"cr_config"`
|
||||
LogLevel logrus.Level `yaml:"log_level" mapstructure:"log_level"`
|
||||
}
|
||||
|
||||
type CoRegistrationConfig struct {
|
||||
@@ -20,6 +23,7 @@ var GCONFIG Config
|
||||
|
||||
func init() {
|
||||
GCONFIG = Config{
|
||||
LogLevel: logrus.DebugLevel,
|
||||
CRConfig: CoRegistrationConfig{
|
||||
MssBands: 4,
|
||||
PixelBytes: 2,
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var viperInst *viper.Viper
|
||||
var GViper *viper.Viper
|
||||
|
||||
func InitViper(cfg string) *viper.Viper {
|
||||
v := viper.New()
|
||||
@@ -22,7 +22,7 @@ func InitViper(cfg string) *viper.Viper {
|
||||
v.SetConfigType("yaml")
|
||||
err := v.ReadInConfig()
|
||||
if err != nil {
|
||||
log.Println(fmt.Errorf("fatal error config file: %s", err.Error()))
|
||||
log.Println(fmt.Errorf("cannot read config file: %s, use default config", err.Error()))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user