Skip to content

Commit

Permalink
So there was a situation where trajctories were found but the waitgro…
Browse files Browse the repository at this point in the history
…up stopped earlya dn data was not written.

I think I solved the issue, not too sure though. Also trying to reproduce the results I found two days ago
  • Loading branch information
ChristopherRabotin committed Apr 18, 2017
1 parent 391ce77 commit 7998246
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cmd/designer/conf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ enabled = true
directory = "../../cmd/refframes"
horizonDir = "../../data/horizon" # Files *must* be named to answer to fmt.Sprintf("%s-%04d", planetName, year) // TODO: Switch to a month too
horizonCSV = true # Set to False to compute each ephemeride separately
truncation = "12h" # Set to a Duration that can be parsed. Correspond to the truncation to use.
truncation = "2h" # Set to a Duration that can be parsed. Correspond to the truncation to use.
30 changes: 15 additions & 15 deletions cmd/designer/finalprj-neptune.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,41 @@
fileprefix = "prj-neptune"
outputdir = "outputs"
verbose = true
step = "6h"
step = "24h"
flybyplanets = "Venus Earth Jupiter"

[launch]
planet = "Earth"
from = "2026-07-15 00:00:00"
until = "2026-09-15 00:00:00"
from = "2026-08-17 00:00:00"
until = "2026-08-19 00:00:00"
resolution = 1
maxC3 = 13
maxC3 = 40

[arrival]
planet = "Neptune"
from = "2048-06-25 00:00:00"
until = "2051-07-01 00:00:00"
maxVinf = 7
from = "2046-06-29 00:00:00"
until = "2046-07-02 00:00:00"
maxVinf = 14

[flyby.Venus]
position = 1
from = "2027-02-15 00:00:00"
until = "2027-03-26 00:00:00"
deltaV = 0.91
from = "2027-03-04 00:00:00"
until = "2027-03-07 00:00:00"
#deltaV = 1.01
periapsis = 1.01

[flyby.Earth]
position = 2
deltaV = 1.0
from = "2027-12-04 00:00:00"
until = "2028-01-15 00:00:00"
from = "2027-12-20 00:00:00"
until = "2027-12-22 00:00:00"
periapsis = 1.01
resonant = true
resonance = 2

[flyby.Jupiter]
position = 3
deltaV = 0.6
from = "2031-12-01 00:00:00"
until = "2032-10-31 00:00:00"
deltaV = 1.0
from = "2032-04-14 00:00:00"
until = "2032-04-17 00:00:00"
periapsis = 2.5
2 changes: 1 addition & 1 deletion cmd/designer/galileo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
fileprefix = "galileo"
outputdir = "outputs"
verbose = true
step = "24h"
step = "2h"
flybyplanets = "Venus Earth"

[launch]
Expand Down
1 change: 1 addition & 0 deletions cmd/designer/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ func StreamResults(prefix string, planets []smd.CelestialObject, rsltChan <-chan
for rslt := range rsltChan {
f.WriteString(rslt.CSV() + "\n")
}
wg.Done() // Done writing everything.
}

type target struct {
Expand Down
3 changes: 3 additions & 0 deletions cmd/designer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ func main() {
f.Close()
return
}
wg.Add(1) // For the output writing.
for launchDT, c3PerDay := range c3Map {
for arrivalIdx, c3 := range c3PerDay {
if c3 > launch.maxC3 || c3 == 0 {
Expand Down Expand Up @@ -166,6 +167,7 @@ func main() {
}
}
log.Println("[info] All valid launches started")
//close(rsltChan)
wg.Wait()
log.Println("[info] Done")
}
Expand Down Expand Up @@ -306,6 +308,7 @@ func GAPCP(launchDT time.Time, inFlyby Flyby, planetNo int, vInfIn []float64, pr
}
// All done, let's free that CPU
<-cpuChan
wg.Done() // Call to release CPU
} else {
// Spawn the next flyby computation.
GAPCP(ga2DT, inFlyby.PostResonance(), planetNo, vInfOutGA2, result)
Expand Down

0 comments on commit 7998246

Please sign in to comment.