Skip to content

Commit

Permalink
use cli settings in (all) cases
Browse files Browse the repository at this point in the history
  • Loading branch information
stronnag committed Jun 12, 2024
1 parent 0fa43f0 commit dabbafd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/kmlgen/kmlbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ func GenerateMissionOnly(outfn string, gv func() string) {
if len(options.Config.Cli) > 0 {
sfx = Generate_cli_kml(options.Config.Cli, fb)
}

kname := filepath.Base(options.Config.Mission)
desc := fmt.Sprintf("Generator: %s", gv())
d := kml.Folder(kml.Name(kname)).Add(kml.Description(desc)).Add(kml.Open(true))
Expand Down Expand Up @@ -569,7 +570,13 @@ func GenerateKML(hpos types.HomeRec, rec types.LogRec, outfn string,
d := kml.Folder(kml.Name(meta.LogName())).Add(kml.Description(desc)).Add(kml.Open(true))
d.Add(add_ground_track(rec))

var sfx []kml.Element

fb := geo.Getfrobnication()
if len(options.Config.Cli) > 0 {
sfx = Generate_cli_kml(options.Config.Cli, fb)
}

if len(options.Config.Mission) > 0 {
_, mm, err := mission.Read_Mission_File(options.Config.Mission)
if err == nil {
Expand Down Expand Up @@ -599,7 +606,6 @@ func GenerateKML(hpos types.HomeRec, rec types.LogRec, outfn string,
}

if len(options.Config.Cli) > 0 {
sfx := Generate_cli_kml(options.Config.Cli, fb)
for _, s := range sfx {
d.Add(s)
}
Expand Down

0 comments on commit dabbafd

Please sign in to comment.