polish #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "polish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +117,4 @@// verts[0] before testing, so a polygon spanning the antimeridian is// handled correctly as long as the polygon itself spans no more than 180°// in longitude.func pointInPolygon(lat, lng float64, verts []PolygonVertex) bool {Computationally expensive, should be moved into numerics
@ -0,0 +11,4 @@//// Useful for combining a vertical-rate model with a horizontal wind model// into a single propagator. Equivalent to Tawhiri's LinearModel.func Sum(models ...Model) Model {Move all computations into numerics
@ -0,0 +42,4 @@// v = -k / sqrt(rho(alt)), k = seaLevelRate * 1.1045,//// using the NASA atmosphere model for rho. Equivalent to Tawhiri's drag_descent.func ParachuteDescent(seaLevelRate float64) Model {Move into numerics
@ -0,0 +52,4 @@// nasaDensity returns air density (kg/m^3) for an altitude in metres,// using the NASA simple atmosphere model.// See https://www.grc.nasa.gov/WWW/K-12/airplane/atmosmet.html.func nasaDensity(alt float64) float64 {Move into numerics
@ -0,0 +102,4 @@//// If events is non-nil, an "above_model" event is emitted whenever the// wind field reports altitude above the highest pressure level.func WindTransport(field weather.WindField, events *EventSink) Model {Move into numerics
@ -0,0 +262,4 @@out := make([]RateSegment, 0, len(in))for _, s := range in {var until float64switch s.Reference {Clean up?
@ -0,0 +4,4 @@// pymod returns a % b with Python semantics: the result has the sign of b,// so for b > 0 the result is always in [0, b).func pymod(a, b float64) float64 {Move to numerics; is this still necessary?
@ -0,0 +17,4 @@//// Time is not stored in State — it is tracked separately by the integrator// and passed to Model.func stateAdd(y State, k float64, dy State) State {Move to numerics
@ -0,0 +27,4 @@// stateLerp computes the linear interpolation of two states by parameter l// in [0, 1]. Longitude uses lngLerp so that wrap-around is handled.func stateLerp(a, b State, l float64) State {Should be moved to numerics
@ -0,0 +37,4 @@// lngLerp interpolates between two longitudes in [0, 360), choosing the// shorter great-circle arc.func lngLerp(a, b, l float64) float64 {Should be moved to numerics library
lgtm👍