diff options
-rw-r--r-- | metar/metar.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/metar/metar.go b/metar/metar.go index ef7a187..8af5d52 100644 --- a/metar/metar.go +++ b/metar/metar.go @@ -239,7 +239,7 @@ func TimeRange(from, to time.Time) func(*Request) { // HoursBeforeNow requests METARs observed during the previous h hours. func HoursBeforeNow(h float64) func(*Request) { return func(r *Request) { - r.v.Add("hoursBeforeNow", strconv.FormatFloat(h, 'f', 64, -1)) + r.v.Add("hoursBeforeNow", strconv.FormatFloat(h, 'f', -1, 64)) } } @@ -270,10 +270,10 @@ func MostRecentForEachStation(s string) func(*Request) { // Does not support bounding boxes that encompass a pole. func LonLatRect(minLat, minLon, maxLat, maxLon float64) func(*Request) { return func(r *Request) { - r.v.Add("minLat", strconv.FormatFloat(minLat, 'f', 64, -1)) - r.v.Add("minLon", strconv.FormatFloat(minLon, 'f', 64, -1)) - r.v.Add("maxLat", strconv.FormatFloat(maxLat, 'f', 64, -1)) - r.v.Add("maxLon", strconv.FormatFloat(maxLon, 'f', 64, -1)) + r.v.Add("minLat", strconv.FormatFloat(minLat, 'f', -1, 64)) + r.v.Add("minLon", strconv.FormatFloat(minLon, 'f', -1, 64)) + r.v.Add("maxLat", strconv.FormatFloat(maxLat, 'f', -1, 64)) + r.v.Add("maxLon", strconv.FormatFloat(maxLon, 'f', -1, 64)) } } @@ -310,7 +310,7 @@ func FlightPath(maxDist float64, waypoints ...string) func(*Request) { // are filtered and the most recent of duplicate stations is reported. func MinDegreeDistance(d float64) func(*Request) { return func(r *Request) { - r.v.Add("minDegreeDistance", strconv.FormatFloat(d, 'f', 64, -1)) + r.v.Add("minDegreeDistance", strconv.FormatFloat(d, 'f', -1, 64)) } } |