fix(input): correct lon mapping
This commit is contained in:
parent
19557f3a62
commit
84d1664b29
20 changed files with 1197 additions and 137 deletions
|
|
@ -1,7 +1,9 @@
|
|||
package engine
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"predictor-refactored/internal/numerics"
|
||||
"predictor-refactored/internal/weather"
|
||||
|
|
@ -84,6 +86,11 @@ func WindTransport(field weather.WindField, events *EventSink) Model {
|
|||
return func(t float64, s State) numerics.Rate {
|
||||
sample, err := field.Wind(t, s.Lat, s.Lng, s.Altitude)
|
||||
if err != nil {
|
||||
// Recorded, not swallowed. A zero rate here is indistinguishable
|
||||
// from calm air, so returning one turns "we have no data for this
|
||||
// time" into "the balloon did not move" — see EventSink.Fail.
|
||||
events.Fail(fmt.Errorf("no wind data at %s: %w",
|
||||
time.Unix(int64(t), 0).UTC().Format(time.RFC3339), err))
|
||||
return numerics.Rate{}
|
||||
}
|
||||
if sample.AboveModel && events != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue